Package org.opencastproject.workflow.api
Interface ResumableWorkflowOperationHandler
- All Superinterfaces:
WorkflowOperationHandler
- All Known Implementing Classes:
ConfigureByDublinCoreTermWOH,ErrorResolutionWorkflowOperationHandler,ResumableWorkflowOperationHandlerBase,TagByDublinCoreTermWOH,VideoEditorWorkflowOperationHandler
A
WorkflowOperationHandler that is allowed to return Action.PAUSE to pause (and later resume) a workflow.-
Method Summary
Modifier and TypeMethodDescriptionReturns the title for the link to this operations hold state UI.getHoldStateUserInterfaceURL(WorkflowInstance workflowInstance) Gets the URL for the user interface for resuming the workflow.booleanWhether this operation handler will always pause.resume(WorkflowInstance workflowInstance, JobContext context, Map<String, String> properties) Continues a suspendedWorkflowInstance.Methods inherited from interface org.opencastproject.workflow.api.WorkflowOperationHandler
destroy, getDescription, getId, skip, start
-
Method Details
-
resume
WorkflowOperationResult resume(WorkflowInstance workflowInstance, JobContext context, Map<String, String> properties) throws WorkflowOperationExceptionContinues a suspendedWorkflowInstance. If the execution fails for some reason, this must throw aWorkflowOperationExceptionin order to handle the problem gracefully. Runtime exceptions will cause the entire workflow instance to fail. If the workflow instance is not in a suspended state, this method should throw anIllegalStateException.- Parameters:
workflowInstance- The workflow instancecontext- the job contextproperties- The properties added while the operation was on hold- Returns:
- the result of this operation
- Throws:
WorkflowOperationException- If the workflow operation fails to execute properly.
-
isAlwaysPause
boolean isAlwaysPause()Whether this operation handler will always pause. The workflow service may give preferential dispatching to operations that are guaranteed to pause.- Returns:
- whether this handler always pauses
-
getHoldStateUserInterfaceURL
String getHoldStateUserInterfaceURL(WorkflowInstance workflowInstance) throws WorkflowOperationException Gets the URL for the user interface for resuming the workflow.- Parameters:
workflowInstance- The workflow instance- Returns:
- The URL for the user interface
- Throws:
WorkflowOperationException- If the url to the hold state ui can't be created
-
getHoldActionTitle
String getHoldActionTitle()Returns the title for the link to this operations hold state UI.- Returns:
- title to be displayed
-