Package com.day.cq.dam.core.process
Class AssetOffloadingProcess
- java.lang.Object
-
- com.day.cq.dam.core.process.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
workflowModelargument.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAssetOffloadingProcess.ArgumentsThe available arguments to this process implementation.
-
Constructor Summary
Constructors Constructor Description AssetOffloadingProcess()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.Serializableexecute(WorkItem item, WorkflowSession wfSession, MetaDataMap arguments)Executes the external process step.voidhandleResult(java.io.Serializable externalProcessId, WorkItem workItem, WorkflowSession session, MetaDataMap arguments)Get and handle the result of the external process, given by the external process id.booleanhasFinished(java.io.Serializable externalProcessId, WorkItem item, WorkflowSession session, MetaDataMap arguments)Tests the external process, given by the external process id, for completeness.
-
-
-
Method Detail
-
execute
public java.io.Serializable execute(WorkItem item, WorkflowSession wfSession, MetaDataMap arguments) throws WorkflowException
Description copied from interface:WorkflowExternalProcessExecutes the external process step. In order to keep track of this asynchronous process, an identifier must be returned. One can returnnullto indicate that nothing was executed. In this case, the step directly advances to the next step.- Specified by:
executein interfaceWorkflowExternalProcess- Parameters:
item- The current work itemwfSession- The current workflow sessionarguments- 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:WorkflowExternalProcessTests the external process, given by the external process id, for completeness.- Specified by:
hasFinishedin interfaceWorkflowExternalProcess- Parameters:
externalProcessId- The external process to test for completenessitem- The current work itemsession- The current workflow sessionarguments- The current steps node arguments (aka as node meta data)- Returns:
trueif the specified external process has finished
-
handleResult
public void handleResult(java.io.Serializable externalProcessId, WorkItem workItem, WorkflowSession session, MetaDataMap arguments) throws WorkflowExceptionDescription copied from interface:WorkflowExternalProcessGet 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:
handleResultin interfaceWorkflowExternalProcess- Parameters:
externalProcessId- The external process to handle the results forworkItem- The current work itemsession- The current workflow sessionarguments- The current steps node arguments (aka as node meta data)- Throws:
WorkflowException- thrown in case something goes wrong during execution
-
-