<@ULVA73B9P> I have a flow run that runs a subflow...
# ask-marvin
s
@Marvin I have a flow run that runs a subflow:
Copy code
def outer_flow():
   inner_flow.with_options(
        persist_result=True,
        on_cancellation=[cancellation_callback]
   )
If I cancel the outer flow from the Prefect UI, it seems like the on_cancellation hook for the inner_flow subflow does not run. Why is this? How can I ensure that a subflow's on_cancellation hook runs when it's parent flow is cancelled?
m
🔄 Researching your answer... this may take a while 🔧 Using tool:
research_prefect_topic
📊 Tools used: •
research_prefect_topic
(1x)
n
🤔