Class BackgroundJob

java.lang.Object
org.adempiere.webui.apps.BackgroundJob

public class BackgroundJob extends Object
Background job for process (AD_Process)
  • Method Details

    • create

      public static BackgroundJob create(ProcessInfo processInfo)
      Create new background job instance
      Parameters:
      processInfo -
      Returns:
      BackgroundJob
    • withContext

      public BackgroundJob withContext(Properties ctx)
      Set context. Optional, default is Env.getCtx()
      Parameters:
      ctx -
      Returns:
      BackgroundJob
    • withProcessUI

      public BackgroundJob withProcessUI(IProcessUI processUI)
      Set optional process UI.
      Parameters:
      processUI -
      Returns:
      BackgroundJob
    • withNotificationType

      public BackgroundJob withNotificationType(String notificationType)
      Set notification type. Optional, default is login user's notification type
      Parameters:
      notificationType -
      Returns:
      BackgroundJob
    • withInitialDelay

      public BackgroundJob withInitialDelay(int delay)
      Set initial delay in milliseconds (default is 1000)
      Parameters:
      delay - initial delay in milliseconds
      Returns:
      BackgroundJob
    • run

      public ScheduledFuture<ProcessInfo> run(Callback<Integer> createInstanceParaCallback)
      Run job
      Parameters:
      createInstanceParaCallback - callback to create process instance parameters (AD_PInstance_Para)
      Returns:
    • getRunningJobForUser

      public static List<MPInstance> getRunningJobForUser(int AD_User_ID)
      Parameters:
      AD_User_ID -
      Returns:
      List of running background jobs for AD_User_ID