I think this is a less complicated version of
this.
TLDR: I believe it’s very hard to do. You might have some options.
1. Run the mapped elements in batches with create_flow_run. This way at least, you can end at a batch when one fails.
2. Use the GraphQL API to set the Flow as Failed in the state handler. This is so aggressive though, but the Flow will error out.
3. You can give up parallelism and use task looping to make it sequential, that way you can just exit the loop.
4. You can try persisting a flag in the KV store and the tasks can just look there and if the flag is up they just skip or raise FAIL