public interface WorkflowExternalProcess
WorkflowNode.TYPE_EXTERNAL_PROCESS
.
They are typically used for asynchronous tasks to execute on external systems.
Flow:
execute(WorkItem, com.day.cq.workflow.WorkflowSession, com.day.cq.workflow.metadata.MetaDataMap)
method is called,
providing an identifier for the external processhasFinished(java.io.Serializable, WorkItem, com.day.cq.workflow.WorkflowSession, com.day.cq.workflow.metadata.MetaDataMap)
method is called periodically to check if the external process has finished. Interval and timeouts can be configured on the stephasFinished(java.io.Serializable, WorkItem, com.day.cq.workflow.WorkflowSession, com.day.cq.workflow.metadata.MetaDataMap)
returns true
the handleResult(java.io.Serializable, WorkItem, com.day.cq.workflow.WorkflowSession, com.day.cq.workflow.metadata.MetaDataMap)
method is called, to read the results, if anyexecute()
looks like. The engine does not make any assumptions about it, other than it
must be serializable. But of course the implementations of hasFinished()
and handleResult()
must know about it and handle it accordingly.Modifier and Type | Method and Description |
---|---|
java.io.Serializable |
execute(WorkItem item,
WorkflowSession session,
MetaDataMap arguments)
Executes the external process step.
|
void |
handleResult(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.
|
boolean |
hasFinished(java.io.Serializable externalProcessId,
WorkItem item,
WorkflowSession session,
MetaDataMap arguments)
Tests the external process, given by the external process id, for completeness.
|
java.io.Serializable execute(WorkItem item, WorkflowSession session, MetaDataMap arguments) throws WorkflowException
null
to indicate that nothing was executed. In this case, the step directly advances to the next step.item
- The current work itemsession
- The current workflow sessionarguments
- The current steps node arguments (aka as node meta data)null
WorkflowException
- When an error is encounteredboolean hasFinished(java.io.Serializable externalProcessId, WorkItem item, WorkflowSession session, MetaDataMap arguments)
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)void handleResult(java.io.Serializable externalProcessId, WorkItem workItem, WorkflowSession session, MetaDataMap arguments) throws WorkflowException
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)WorkflowException
- When an error is encounteredCopyright © 2010 - 2020 Adobe. All Rights Reserved