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 void
bindWorkflowExternalProcess(WorkflowExternalProcess process)
boolean
canHandle(java.lang.String externalProcessName)
returns true if this proxy can execute requests on behalf of the specified processNamejava.io.Serializable
execute(java.lang.String externalProcessName, WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap)
Executes the external process step.void
handleResult(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.boolean
hasFinished(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.void
unbindWorkflowExternalProcess(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 WorkflowException
Description copied from interface:WorkflowExternalProcessProxy
Executes the external process step. In order to keep track of this asynchronous process, an identifier must be returned. One can returnnull
to indicate that nothing was executed. In this case, the step directly advances to the next step.- Specified by:
execute
in 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:WorkflowExternalProcessProxy
Tests the external process, given by the external process id, for completeness.- Specified by:
hasFinished
in 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:
true
if 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 WorkflowException
Description copied from interface:WorkflowExternalProcessProxy
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 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:WorkflowExternalProcessProxy
returns true if this proxy can execute requests on behalf of the specified processName- Specified by:
canHandle
in interfaceWorkflowExternalProcessProxy
- Parameters:
externalProcessName
- The name of the WorkflowExternalProcess service to proxy- Returns:
- true if this proxy can handle the request, false otherwise.
-
-