# Take a specific outgoing sequenceflow in flowable 6

**URL:** <https://forum.flowable.org/t/take-a-specific-outgoing-sequenceflow-in-flowable-6/9705>\
**Category:** Flowable Engine\
**Created:** [September 5, 2022, 10:16am UTC](https://forum.flowable.org/t/take-a-specific-outgoing-sequenceflow-in-flowable-6/9705 "2022-09-05T10:16:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thisolddave](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@thisolddave](https://forum.flowable.org/u/thisolddave)\
**Post date:** [September 5, 2022, 10:16am UTC](https://forum.flowable.org/t/take-a-specific-outgoing-sequenceflow-in-flowable-6/9705/1 "2022-09-05T10:16:42Z")

</div>

I am upgrading an app from 5.22 to 6.7.2 the app has several custom activities that use the concept of an optional error transition. That is, if an error occurs during the activity the execution should take a specific outgoing sequence flow otherwise it should take any flow other than the specific “error” flow.  
in flowable 5 the code used

```auto
PvmTransition transition = execution.getActivity().findOutgoingTransition(errorTransition);
execution.take(transition);

```

what would be the equivalent in version 6?  
My initial thought was to manipulate the condition expression on each flow and call leave(). However I am not comfortable manipulating the process as it is defined.

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [September 8, 2022, 4:41pm UTC](https://forum.flowable.org/t/take-a-specific-outgoing-sequenceflow-in-flowable-6/9705/2 "2022-09-08T16:41:40Z")

</div>

You can use org.flowable.engine.delegate.DelegateHelper#leaveDelegate(execution, sequenceFlowId)

---

<div class="post-metadata">

**Author:** ![thisolddave](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@thisolddave](https://forum.flowable.org/u/thisolddave)\
**Post date:** [September 13, 2022, 3:31pm UTC](https://forum.flowable.org/t/take-a-specific-outgoing-sequenceflow-in-flowable-6/9705/3 "2022-09-13T15:31:10Z")

</div>

Thanks Joram,  
I am getting there
