Decision task API
The decider is executed for each new decision task.
We have two types of Helper methods :
- helpers to inspect the event history (to find the state we are in)
- helpers to make decisions : schedule activities / child workflows / and timer
Decision helpers integrate flow control using the history helpers.
Important : does NOT call the activity now, it just adds it to the decisions array !
The decisions will then be sent in the decisionTaskResponse ( automagically done by aws-swf if noresponse has been sent yet.)
schedule({ name: obligatoire activity: obligatoire, input: { optional } })
Stop()
Todo
Question : can it be recursive ? Of course !
Todo
Todo
An object which contains raw SWF attributes
{ completed: 'step1', failed: 'step2' }
{ completed: ['step1', step2] }
TODO
{ fn: function () { return completed('step1', 'step2') || completed('step3'); } }
You can also use results from a previous activity or the workflow input :
{ fn: function () { return completed('step1') && results('step1').questionA == 'yes'; } }
Input can be a function