Mansour Zayer
04/04/2023, 8:44 PMCancelled
state in certain conditions (expected behavior). When any of them enters Cancelled
state and the rest complete, the main flow also enters Canceled
state. How can I make the main flow succeed? This is my code
@flow()
def main_flow():
subflows = (subflow1, subflow2, subflow3)
for subflow in subflows:
try:
subflow()
except CancelledRun:
continue
When the first flow cancels, I get something like this Finished in state Cancelled('1/3 states cancelled.')
and the main flow state becomes Cancelled too.
Thanks@task
def my_task():
if condition:
return Cancelled()
@flow
def subflow():
my_task()
Is there a better way to do it?for subflow in subflows:
try:
subflow()
except CancelledRun:
continue
except Exception as e:
...
else:
Completed()
Deceivious
04/05/2023, 8:30 AMMansour Zayer
04/05/2023, 6:29 PM