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
Given the context of a workflow execution, decide what needs to be done next.
Given the context of a workflow execution, decide what needs to be done next. A variety of exceptions are possible. Make sure your worker threads can't die without replacement.
The task from SWF. Must not be null!
The decision that we sent to SWF
Find out if any workflows in our domain/taskList need decisions made.
Find out if any workflows in our domain/taskList need decisions made. A variety of exceptions are possible. Make sure your poller threads can't die without replacement.
The decision task, if there is one. Null otherwise.
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 callmakeDecision()
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