Class CQWorkflowExtProcessProxy
- java.lang.Object
-
- com.day.cq.workflow.compatibility.CQWorkflowExtProcessProxy
-
- All Implemented Interfaces:
WorkflowExternalProcessProxy
@Property(name="service.description", value="%cq.workflow.compat.extproxy.description") @Reference(name="WorkflowExternalProcess", cardinality=OPTIONAL_MULTIPLE, referenceInterface=WorkflowExternalProcess.class, policy=DYNAMIC) @Service public class CQWorkflowExtProcessProxy extends java.lang.Object implements WorkflowExternalProcessProxy
-
-
Constructor Summary
Constructors Constructor Description CQWorkflowExtProcessProxy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbindWorkflowExternalProcess(WorkflowExternalProcess process)booleancanHandle(java.lang.String externalProcessName)returns true if this proxy can execute requests on behalf of the specified processNamejava.io.Serializableexecute(java.lang.String externalProcessName, WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap)Executes the external process step.voidhandleResult(java.lang.String externalProcessName, java.io.Serializable serializable, WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap)Get and handle the result of the external process, given by the external process id.booleanhasFinished(java.lang.String externalProcessName, java.io.Serializable serializable, WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap)Tests the external process, given by the external process id, for completeness.voidunbindWorkflowExternalProcess(WorkflowExternalProcess process)
-
-
-
Method Detail
-
bindWorkflowExternalProcess
public void bindWorkflowExternalProcess(WorkflowExternalProcess process)
-
unbindWorkflowExternalProcess
public void unbindWorkflowExternalProcess(WorkflowExternalProcess process)
-
execute
public java.io.Serializable execute(java.lang.String externalProcessName, WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) throws WorkflowExceptionDescription copied from interface:WorkflowExternalProcessProxyExecutes 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 interfaceWorkflowExternalProcessProxy- Parameters:
externalProcessName- The name of the WorkflowExternalProcess service to proxyworkItem- The current work itemworkflowSession- The current workflow sessionmetaDataMap- 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- See Also:
WorkflowExternalProcess.execute(WorkItem, com.adobe.granite.workflow.WorkflowSession, com.adobe.granite.workflow.metadata.MetaDataMap)
-
hasFinished
public boolean hasFinished(java.lang.String externalProcessName, java.io.Serializable serializable, WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap)Description copied from interface:WorkflowExternalProcessProxyTests the external process, given by the external process id, for completeness.- Specified by:
hasFinishedin interfaceWorkflowExternalProcessProxy- Parameters:
externalProcessName- The name of the WorkflowExternalProcess service to proxyserializable- The external process to test for completenessworkItem- The current work itemworkflowSession- The current workflow sessionmetaDataMap- The current steps node arguments (aka as node meta data)- Returns:
trueif the specified external process has finished- See Also:
WorkflowExternalProcess.hasFinished(java.io.Serializable, WorkItem, com.adobe.granite.workflow.WorkflowSession, com.adobe.granite.workflow.metadata.MetaDataMap)
-
handleResult
public void handleResult(java.lang.String externalProcessName, java.io.Serializable serializable, WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) throws WorkflowExceptionDescription copied from interface:WorkflowExternalProcessProxyGet 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 interfaceWorkflowExternalProcessProxy- Parameters:
externalProcessName- The name of the WorkflowExternalProcess service to proxyserializable- The external process to handle the results forworkItem- The current work itemworkflowSession- The current workflow sessionmetaDataMap- The current steps node arguments (aka as node meta data)- Throws:
WorkflowException- thrown in case something goes wrong during execution- See Also:
WorkflowExternalProcess.handleResult(java.io.Serializable, WorkItem, com.adobe.granite.workflow.WorkflowSession, com.adobe.granite.workflow.metadata.MetaDataMap)
-
canHandle
public boolean canHandle(java.lang.String externalProcessName)
Description copied from interface:WorkflowExternalProcessProxyreturns true if this proxy can execute requests on behalf of the specified processName- Specified by:
canHandlein interfaceWorkflowExternalProcessProxy- Parameters:
externalProcessName- The name of the WorkflowExternalProcess service to proxy- Returns:
- true if this proxy can handle the request, false otherwise.
-
-