Closed agrare closed 7 months ago
I remember running into issues around wait and setting next. Think there may be a similar issue with Task.
Does this logic make sense:
^ think that logic is what you do here. looks good. Do we want to delay setting the output until after the state has completed?
@kbrock yeah exactly, Wait and Task are the only two currently which aren't ready?
immediately, and Task already set next_state in #finish
Would it make sense to put the next_state change into finish for Fail
, Pass
, and Succeed
even though they are ready immediately?
(maybe Choice
?)
I'm wondering if next_state
is correct with a Task
that has a retry. Doesn't seem like Choice
or Task
could set it in finish
since information would not be present at that time.
Would it make sense to put finish into everything and put the next_state change into fail, pass, and succeed even though they are ready immediately.
I think that's what I've done, every state that has Next
sets next_state in finish now. Task is a little different as you mentioned which is why I clear the next state in the failure case.
By setting the next_state in Wait#start we were bypassing the Wait#finish step because the next_state was already set. This caused missing entries in the context for the state completion.
Before:
Notice there is no
Running state: [WaitState] with input [{"foo"=>1}]...Complete
log line