The worker class responsible for executing workflow steps.
The worker class responsible for scheduling workflow actions.
The worker class responsible for scheduling workflow actions. The class is built so that you can plug it in to a scheduled service of your choice.
First, call pollForDecisionToMake()
to determine if a decision needs to be made, and then call makeDecision()
to make the decision.
You could obviously poll and work in the same thread, but remember that this worker can handle many concurrent workflows, so separating them lets you have one thread polling
and then a pool of threads simultaneously working on scheduling decisions.
Example:
runOne() {
task := worker.pollForDecisionToMake()
if (task != null) {
threadPool.submit(() -> { worker.makeDecision(task) })
}
The type of the parsed workflow input
The enum containing workflow step definitions
This is where you register and start workflows.
This is where you register and start workflows.
In SWF, there are domains, workflow types, activities that need to be registered. You provide all the config we need for activities in the StepEnum. You give the parameters for domain and
workflow type here.
This class is implemented so that you can call registerWorkflow() every time your app starts, and we will register anything that needs to be registered, so you should be able to manage your
whole workflow from this library.
The enum containing workflow step definitions
The worker class responsible for executing workflow steps. The class is built so that you can plug it in to a scheduled service of your choice. First, call
pollForWork()
to determine if a step needs to be executed, and then calldoWork()
to execute the step. The actual logic for the step is provided by yourWorkflowDefinition#act()
.You could obviously poll and work in the same thread, but remember that this worker can handle many concurrent workflows, so separating them lets you have one thread polling and then a pool of threads simultaneously working on actions.
Example:
runOne() { task := worker.pollForWork() if (task != null) { threadPool.submit(() -> { worker.doWork(task) }) }
The type of the parsed workflow input
The enum containing workflow step definitions