Class ServerProcessCtl

java.lang.Object
org.compiere.process.ServerProcessCtl
All Implemented Interfaces:
Runnable

public class ServerProcessCtl extends Object implements Runnable
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Process Control - Get Instance ID - Get Parameters - execute (lock - start process - unlock) Creates a ProcessCtl instance, which calls lockUI and unlockUI if parent is a ASyncProcess
    Called from APanel.cmd_print, APanel.actionButton and VPaySelect.cmd_generate
    process(ProcessInfo pi, Trx trx, boolean managedTrxForJavaProcess)
    Process Control - Get Instance ID - Get Parameters - execute (lock - start process - unlock) Creates a ProcessCtl instance, which calls lockUI and unlockUI if parent is a ASyncProcess
    Called from APanel.cmd_print, APanel.actionButton and VPaySelect.cmd_generate
    void
    run()
    Execute Process Instance and Lock UI.
    void
    setManagedTrxForJavaProcess(boolean managedTrx)
    set whether java process call will commit/rollback trx (default is true)
    void
    Run this process in a new thread
    protected boolean
    startDBProcess(String ProcedureName)
    Start Database Process
    protected boolean
    Start Java Process Class.
    protected boolean
    startWorkflow(int AD_Workflow_ID)
    Start Workflow.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ServerProcessCtl

      public ServerProcessCtl(ProcessInfo pi, Trx trx)
      Constructor
      Parameters:
      pi - Process info
      trx - Transaction
  • Method Details

    • process

      public static ServerProcessCtl process(ProcessInfo pi, Trx trx)
      Process Control - Get Instance ID - Get Parameters - execute (lock - start process - unlock) Creates a ProcessCtl instance, which calls lockUI and unlockUI if parent is a ASyncProcess
      Called from APanel.cmd_print, APanel.actionButton and VPaySelect.cmd_generate
      Parameters:
      pi - ProcessInfo process info
      trx - Transaction
      Returns:
      worker started ProcessCtl instance or null for workflow
    • process

      public static ServerProcessCtl process(ProcessInfo pi, Trx trx, boolean managedTrxForJavaProcess)
      Process Control - Get Instance ID - Get Parameters - execute (lock - start process - unlock) Creates a ProcessCtl instance, which calls lockUI and unlockUI if parent is a ASyncProcess
      Called from APanel.cmd_print, APanel.actionButton and VPaySelect.cmd_generate
      Parameters:
      pi - ProcessInfo process info
      trx - Transaction
      managedTrxForJavaProcess -
      Returns:
      worker started ProcessCtl instance or null for workflow
    • start

      public void start()
      Run this process in a new thread
    • run

      public void run()
      Execute Process Instance and Lock UI. Calls lockUI and unlockUI if parent is a ASyncProcess
                      - Get Process Information
            - Call Class
                      - Submit SQL Procedure
                      - Run SQL Procedure
              
      Specified by:
      run in interface Runnable
    • startWorkflow

      protected boolean startWorkflow(int AD_Workflow_ID)
      Start Workflow.
      Parameters:
      AD_Workflow_ID - workflow
      Returns:
      true if started
    • startProcess

      protected boolean startProcess()
      Start Java Process Class. instantiate the class implementing the interface ProcessCall. The class can be a Server/Client class (when in Package org adempiere.process or org.compiere.model) or a client only class (e.g. in org.compiere.report)
      Returns:
      true if success
    • startDBProcess

      protected boolean startDBProcess(String ProcedureName)
      Start Database Process
      Parameters:
      ProcedureName - PL/SQL procedure name
      Returns:
      true if success
    • setManagedTrxForJavaProcess

      public void setManagedTrxForJavaProcess(boolean managedTrx)
      set whether java process call will commit/rollback trx (default is true)
      Parameters:
      managedTrx -
    • isManagedTrxForJavaProcess

      public boolean isManagedTrxForJavaProcess()
      Returns:
      true if java process call will commit/rollback trx