Comment 4 for bug 1524477

Revision history for this message
Moshe Elisha (melisha) wrote : Re: on-complete tasks are ran multiple times on workflow resume

Hi. Some more details about the flow regarding code flow:

1. Task1 in method on_action_complete – changes task1 state to RUNNING.
2. Task2 in method on_action_complete – changes task2 state to RUNNING (before task2 calls _on_task_state_change).
3. Task2 in “_on_task_state_change” > “continue_workflow” > “DirectWorkflowController ._find_next_commands” – it finds task1 because task1 is in SUCCESS and processed = False and “_find_next_commands_for_task(task1)” returns task4.
4. Task2 executes command to RunTask task4.
5. Task1 in “_on_task_state_change” > “continue_workflow” > “DirectWorkflowController ._find_next_commands” – it finds task1 because task1 is in SUCCESS and processed = False and “_find_next_commands_for_task(task1)” returns task4.
6. Task1 executes command to RunTask task4.