ensure steps are executed in order
darwin67 opened this issue · 0 comments
darwin67 commented
A potential bug fix.
The executor will send a list of hash, which determines the order of steps ran.
The SDK currently ignore that stack entirely and just uses step/hash mapping, so if the order of a step
changed, there might be unintended consequences.
e.g.
this
step "step1" do
{:ok, %{ hello: "a" }}
end
step "step2" do
{:ok, %{ hello: "b" }}
end
changed to this:
step "test" do
{:ok, %{ yo: "lo" }}
end
step "step2" do
{:ok, %{ hello: "b" }}
end
Resolution
If the code was changed in a way that steps' order are different, the handler should discard the existing memorized data, and redo the execution