Class AssetOffloadingProcess

  • All Implemented Interfaces:
    WorkflowExternalProcess

    @Service
    public class AssetOffloadingProcess
    extends java.lang.Object
    implements WorkflowExternalProcess
    This component implements an workflow external step, that allows offloading asset based workflows, means workflows that have an asset on the payload.

    The workflow (model) to offload must be set on the step metadata using the workflowModel argument.

    • Constructor Detail

      • AssetOffloadingProcess

        public AssetOffloadingProcess()
    • Method Detail

      • execute

        public java.io.Serializable execute​(WorkItem item,
                                            WorkflowSession wfSession,
                                            MetaDataMap arguments)
                                     throws WorkflowException
        Description copied from interface: WorkflowExternalProcess
        Executes the external process step. In order to keep track of this asynchronous process, an identifier must be returned. One can return null to indicate that nothing was executed. In this case, the step directly advances to the next step.
        Specified by:
        execute in interface WorkflowExternalProcess
        Parameters:
        item - The current work item
        wfSession - The current workflow session
        arguments - The current steps node arguments (aka as node meta data)
        Returns:
        Any serializable identifier for the external process executed, or null
        Throws:
        WorkflowException - thrown in case something goes wrong during execution
      • hasFinished

        public boolean hasFinished​(java.io.Serializable externalProcessId,
                                   WorkItem item,
                                   WorkflowSession session,
                                   MetaDataMap arguments)
        Description copied from interface: WorkflowExternalProcess
        Tests the external process, given by the external process id, for completeness.
        Specified by:
        hasFinished in interface WorkflowExternalProcess
        Parameters:
        externalProcessId - The external process to test for completeness
        item - The current work item
        session - The current workflow session
        arguments - The current steps node arguments (aka as node meta data)
        Returns:
        true if the specified external process has finished
      • handleResult

        public void handleResult​(java.io.Serializable externalProcessId,
                                 WorkItem workItem,
                                 WorkflowSession session,
                                 MetaDataMap arguments)
                          throws WorkflowException
        Description copied from interface: WorkflowExternalProcess
        Get and handle the result of the external process, given by the external process id. This would include storing any results where appropriate for further use.
        Specified by:
        handleResult in interface WorkflowExternalProcess
        Parameters:
        externalProcessId - The external process to handle the results for
        workItem - The current work item
        session - The current workflow session
        arguments - The current steps node arguments (aka as node meta data)
        Throws:
        WorkflowException - thrown in case something goes wrong during execution