In prep for Map, have State only modify its own data in Context. (Followup will pass context into State methods, so the caller (i.e.: Map, Parallel, or Workspace) will determine the context and act accordingly.
Don't modify the context in Workflow.new - instead modify it in the first step.
State#start only modifies Context#state and not Context#execute - instead Workflow is responsible for execute.
State#finish only modified Context#state and not Context#execute - instead Workflow is responsible for that.
In prep for
Map
, have State only modify its own data inContext
. (Followup will passcontext
intoState
methods, so the caller (i.e.:Map
,Parallel
, orWorkspace
) will determine the context and act accordingly.Workflow.new
- instead modify it in the first step.State#start
only modifiesContext#state
and notContext#execute
- insteadWorkflow
is responsible forexecute
.State#finish
only modifiedContext#state
and notContext#execute
- insteadWorkflow
is responsible for that.