The domain of the workflow: AWS docs as well as the README
If you execute the same workflow in different environments, use different task lists. Think of them as independent sets of actors working on the same logical workflow, but in different contexts (like production/qa/development/your machine). AWS docs as well as the README
The SWF service client
see InputParser
see StepsDefinition
Execute the action using the logic in the workflowDefinition.
Execute the action using the logic in the workflowDefinition. A variety of exceptions are possible. Make sure your poller threads can't die without replacement.
The task to execute
The ActivityTaskCompleted response we sent to SWF
Poll SWF for actions (steps) that need to be executed.
Poll SWF for actions (steps) that need to be executed. A variety of exceptions are possible. Make sure your poller threads can't die without replacement.
The action to be performed, if there is one. Null otherwise.
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