Class MWFProcess

    • Constructor Detail

      • 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
    • Method Detail

      • getActivities

        public MWFActivity[] getActivities​(boolean requery,
                                           boolean onlyActive)
        Get active Activities of Process
        Parameters:
        requery - if true requery
        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 - if true requery
        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
      • 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
      • setTextMsg

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

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

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

        public String getProcessMsg()
        Get Runtime (Error) Message
        Returns:
        msg