psdi.workflow

Class WorkFlowService

    • Constructor Detail

      • WorkFlowService

        public WorkFlowService()
                        throws java.rmi.RemoteException
        Constructor
        Throws:
        java.rmi.RemoteException
      • WorkFlowService

        public WorkFlowService(MXServer mxServer)
                        throws java.rmi.RemoteException
        Constructor
        Parameters:
        srvEnv - -- the "Server Environment" this Service is being created in.
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • destroy

        public void destroy()
        Description copied from interface: Service
        Release system resources. The object should release all system resources. This will be called only once and is called to prepare the object for finalization.
        Specified by:
        destroy in interface Service
        Overrides:
        destroy in class AppService
        See Also:
        Service
      • validateCondition

        public void validateCondition(MboRemote onBehalfOf,
                                      java.lang.String customAttr,
                                      java.lang.String condAttr)
                               throws java.rmi.RemoteException,
                                      MXException
        Checks the validity of the condition or condition class. Used during process validation. Assumes only one of customclass & condition will have a value. Will not throw an exception if both don't have a value.
        Parameters:
        onBehalfOf - The Mbo performing this validation test.
        customclass - The custom class name used for the condition.
        condition - The condition.
        Throws:
        java.rmi.RemoteException
        MXException
      • evaluateCondition

        public boolean evaluateCondition(Mbo onBehalfOf,
                                         java.lang.String customclass,
                                         java.lang.String condition,
                                         MboRemote mbo)
                                  throws MXException,
                                         java.rmi.RemoteException
        Evaulates a condition. Uses the customclass if provided, otherwise evaluates the condition. The condition is evaluated using the Parser Service.
        Parameters:
        onBehalfOf - The Mbo performing this evaluation. Need for error logging.
        customclass - If specified, an instance of the class is created and evaluated
        condition - The condition.
        mbo - This mbo is passed to the customclass or is the source of values for the condition.
        Returns:
        The result of the evaluation.
        Throws:
        MXException
        java.rmi.RemoteException
      • initiateWorkflow

        public void initiateWorkflow(java.lang.String processName,
                                     MboRemote target)
                              throws MXException,
                                     java.rmi.RemoteException
        Initiates a workflow process on the target Mbo. This method should only be used where there the process is written so that there is no user interaction before reaching a stopping point - either a stop or task node. Calling this method should be the last thing done to the Mbo. The Mbo will be saved by the workflow process, most likely.

        This method makes use of the InitiateWorkflow virtual set.
        If the process requires user interaction, like a manual input, then an error will be logged and an exception thrown.
        If the process name is not valid or any other MXException, then an error will be logged and an exception thrown.

        Specified by:
        initiateWorkflow in interface WorkFlowServiceRemote
        Parameters:
        processName - The name of the process to initiate.
        target - The Mbo to initiate workflow on.
        Throws:
        MXApplicationException - Thrown with "workflow", "BgInitFailure" if the workflow can't be initiated in the background. The nested exception will have additional details.
        MXException
        java.rmi.RemoteException
        See Also:
        Similar to this.
      • initiateWorkflow

        public void initiateWorkflow(java.lang.String processName,
                                     MboRemote target,
                                     java.lang.String memo)
                              throws MXException,
                                     java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • completeAssignment

        public void completeAssignment(WFAssignmentRemote assign,
                                       java.lang.String memo,
                                       boolean accepted)
                                throws MXException,
                                       java.rmi.RemoteException
        Completes a workflow assignment in the background. This method should only be used where there the process is written so that there is no user interaction before reaching a stopping point - either a stop or task node. Calling this method should be the last thing done to the Mbo. The Mbo will be saved by the workflow process, most likely.

        If the process requires user interaction, like a manual input, then an error will be logged and an exception thrown.
        If the process name is not valid or any other MXException, then an error will be logged and an exception thrown.

        Specified by:
        completeAssignment in interface WorkFlowServiceRemote
        Parameters:
        assign - The assignment to complete.
        memo - The memo for the assignment complete
        accepted - Determines whether the accept or reject action is used.
        Throws:
        MXApplicationException - Thrown with "workflow", "BgCompFailure" if the workflow can't be initiated in the background. The nested exception will have additional details.
        MXException
        java.rmi.RemoteException
        See Also:
        Similar to this.
      • isActiveProcess

        public boolean isActiveProcess(java.lang.String processName,
                                       java.lang.String mboName,
                                       UserInfo ui)
                                throws MXException,
                                       java.rmi.RemoteException
        Test that an active process exists with the given name.
        Specified by:
        isActiveProcess in interface WorkFlowServiceRemote
        Parameters:
        processName - Name of the process to check for
        mbo - The type of mbo is the type of process that should be active
        ui - Used to get data from the database.
        Returns:
        true if there is an active process with that name
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.workflow.WorkFlowService#isActiveProcess(String, String)