Package org.sterl.pmw
Interface WorkflowService<RegistryType>
- All Known Implementing Classes:
AbstractWorkflowService,PersistentWorkflowService
public interface WorkflowService<RegistryType>
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancel(RunningWorkflowId runningWorkflowId) voidClear all running and registered workflows, mainly used in testsexecute(String workflowId, Serializable state) execute(String workflowId, Serializable state, Duration delay) <T extends Serializable>
RunningWorkflowId<T extends Serializable>
RunningWorkflowId<T extends Serializable>
RunningWorkflowIdgetWorkflowId(Workflow<?> workflow) <T extends Serializable>
RegistryTypeShould register a new workflow or throw an exception if the workflow is already known.<T extends Serializable>
booleanResumes the waiting step of the an unknown workflow - ensure error handling in case of a wrong ID and so class cast exceptions<T extends Serializable>
booleanResumes the waiting step of the given workfloworg.sterl.spring.persistent_tasks.api.TriggerStatusstatus(RunningWorkflowId runningWorkflowId) intCount of known workflows
-
Method Details
-
listWorkflows
Collection<WorkflowInfo> listWorkflows() -
execute
-
execute
-
execute
-
execute
-
execute
-
execute
-
status
-
cancel
-
getWorkflowId
-
clearAllWorkflows
void clearAllWorkflows()Clear all running and registered workflows, mainly used in tests -
register
<T extends Serializable> RegistryType register(String id, Workflow<T> workflow) throws IllegalStateException Should register a new workflow or throw an exception if the workflow is already known.- Throws:
IllegalStateException- if the workflow is already known
-
workflowCount
int workflowCount()Count of known workflows -
resume
<T extends Serializable> boolean resume(Workflow<T> workflow, String runnngStepId, Function<T, T> stateModifier) Resumes the waiting step of the given workflow -
resume
Resumes the waiting step of the an unknown workflow - ensure error handling in case of a wrong ID and so class cast exceptions
-