ManageIQ / floe

Floe is a runner for Amazon States Language workflows
Apache License 2.0
0 stars 5 forks source link

State only modifies Context#state - prep for Map/Parallel #206

Closed kbrock closed 3 months ago

kbrock commented 3 months ago

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.

  1. Don't modify the context in Workflow.new - instead modify it in the first step.
  2. State#start only modifies Context#state and not Context#execute - instead Workflow is responsible for execute.
  3. State#finish only modified Context#state and not Context#execute - instead Workflow is responsible for that.
kbrock commented 3 months ago

update:

kbrock commented 3 months ago

update:

update:

miq-bot commented 3 months ago

Checked commits https://github.com/kbrock/floe/compare/f5cc75e628a0ce5e00dcb8a35687d255f5ba1ae1~...6db3e5953f8fd1bc02a01cee0a3194a889425aa9 with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint 11 files checked, 0 offenses detected Everything looks fine. :cookie:

kbrock commented 3 months ago

@agrare looking forward to seeing #208 leveraging this