Class MWFProcess

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_AD_WF_Process, I_Persistent, Evaluatee

public class MWFProcess extends X_AD_WF_Process
Extended Workflow Process model for AD_WF_Process
Version:
$Id: MWFProcess.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
Author:
Jorg Janke, Silvano Trinchero, www.freepath.it
  • IDEMPIERE-3209 changed fucntions to public to improve integration support
  • See Also:
    • Constructor Details

      • MWFProcess

        public MWFProcess(Properties ctx, String AD_WF_Process_UU, String trxName)
        UUID based Constructor
        Parameters:
        ctx - Context
        AD_WF_Process_UU - UUID key
        trxName - Transaction
      • MWFProcess

        public MWFProcess(Properties ctx, int AD_WF_Process_ID, String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        AD_WF_Process_ID - process
        trxName - transaction
      • MWFProcess

        public MWFProcess(Properties ctx, ResultSet rs, String trxName)
        Load Constructor
        Parameters:
        ctx - context
        rs - result set
        trxName - transaction
      • MWFProcess

        public MWFProcess(MWorkflow wf, ProcessInfo pi) throws Exception
        Deprecated.
        New Constructor
        Parameters:
        wf - workflow
        pi - Process Info (Record_ID)
        Throws:
        Exception
      • MWFProcess

        public MWFProcess(MWorkflow wf, ProcessInfo pi, String trxName) throws Exception
        New Constructor
        Parameters:
        wf - workflow
        pi - Process Info (Record_ID)
        trxName -
        Throws:
        Exception
    • Method Details

      • getActivities

        public MWFActivity[] getActivities(boolean requery, boolean onlyActive)
        Get active Activities of Process
        Parameters:
        requery - true to reload from DB
        onlyActive - only active activities
        Returns:
        array of activities
      • getActivities

        public MWFActivity[] getActivities(boolean requery, boolean onlyActive, String trxName)
        Get active Activities of Process
        Parameters:
        requery - true to reload from DB
        onlyActive - only active activities
        Returns:
        array of activities
      • getState

        public StateEngine getState()
        Get State
        Returns:
        state
      • getActionOptions

        public String[] getActionOptions()
        Get Action Options
        Returns:
        array of valid actions
      • setWFState

        public void setWFState(String WFState)
        Set Process State and update Actions
        Specified by:
        setWFState in interface I_AD_WF_Process
        Overrides:
        setWFState in class X_AD_WF_Process
        Parameters:
        WFState -
      • checkActivities

        public void checkActivities(String trxName, PO lastPO)
        Check Status of Activities.
        - start new activity
        Parameters:
        trxName - transaction
        lastPO - PO
      • checkCloseActivities

        public void checkCloseActivities(String trxName)
        Update process status based on status of activities.
        Parameters:
        trxName - transaction
      • setAD_WF_Responsible_ID

        public void setAD_WF_Responsible_ID()
        Set Workflow Responsible. Searches for a Invoker.
      • getWorkflow

        public MWorkflow getWorkflow()
        Get Workflow
        Returns:
        workflow
      • perform

        public boolean perform(String action)
        Perform Action
        Parameters:
        action - StateEngine.ACTION_*
        Returns:
        true if valid
      • startWork

        public boolean startWork()
        Start WF Execution
        Returns:
        true if success
      • getPO

        public PO getPO()
        Get Persistent Object
        Returns:
        po
      • getProcessInfo

        public ProcessInfo getProcessInfo()
        Get process info
        Returns:
        ProcessInfo
      • setTextMsg

        public void setTextMsg(PO po)
        Set Text Msg (add to existing)
        Parameters:
        po - base object
      • setTextMsg

        public void setTextMsg(String TextMsg)
        Set Text Msg (add to existing)
        Specified by:
        setTextMsg in interface I_AD_WF_Process
        Overrides:
        setTextMsg in class X_AD_WF_Process
        Parameters:
        TextMsg - msg
      • addTextMsg

        public void addTextMsg(Object obj)
        Add to Text Msg
        Parameters:
        obj - some object
      • setProcessMsg

        public void setProcessMsg(String msg)
        Set Process Execution (Error) Message
        Parameters:
        msg - message
      • getProcessMsg

        public String getProcessMsg()
        Get Process Execution (Error) Message
        Returns:
        msg