sometimes revert() is called on tasks but execute() isn't

Asked by Lajos Szombath

Hi,

Can you please let me know whether or not the below behavior is expected?

I have the following flow that should revert all sub-flows once an error occurs in any of the three:
unordered_flow.Flow().add(
  linear_flow.Flow(retry=AlwaysRevertAll()).add(A1, A2),
  linear_flow.Flow(retry=AlwaysRevertAll()).add(B1, B2, B3),
  linear_flow.Flow(retry=AlwaysRevertAll()).add(C1, C2, C3)
)

When I run it via the 'serial' engine, it seems to be working as expected, but when there's an Exception in e.g. A2, sometimes revert() of tasks in the B and C sub-flows get called but the actual execute() of these tasks have never been called.

As far as I can understand, revert() should only be called on tasks of which execute() was also called before - which isn't the case here. Is this a correct assumption?

I can provide the example code/output if needed.

Many thanks,
Lajos

Question information

Language:
English Edit question
Status:
Answered
For:
taskflow Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

Can you help with this problem?

Provide an answer of your own, or ask Lajos Szombath for more information if necessary.

To post a message you must log in.