# Jython Script pipeline exit

**URL:** <https://forum.inductiveautomation.com/t/jython-script-pipeline-exit/29067>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [October 14, 2019, 12:50pm UTC](https://forum.inductiveautomation.com/t/jython-script-pipeline-exit/29067 "2019-10-14T12:50:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![michal.koblasa](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@michal.koblasa](https://forum.inductiveautomation.com/u/michal.koblasa)\
**Post date:** [October 14, 2019, 12:50pm UTC](https://forum.inductiveautomation.com/t/jython-script-pipeline-exit/29067/1 "2019-10-14T12:50:49Z")

</div>

Hello,  
i need to call return/exit out of whole script pipeline for event.  
I have three steps in script, and i want to call exit all folloving action (including curent line).  
Is there any posibility to exit script execution?

Thank you

![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/9a5ba041ebc78b4a689209f7bbc236b1e60fa72d.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 14, 2019, 2:43pm UTC](https://forum.inductiveautomation.com/t/jython-script-pipeline-exit/29067/3 "2019-10-14T14:43:48Z")

</div>

The actions are not in a pipeline. They run concurrently. If you want part of your action to be conditional, you must use a single script action.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 14, 2019, 3:07pm UTC](https://forum.inductiveautomation.com/t/jython-script-pipeline-exit/29067/4 "2019-10-14T15:07:33Z")

</div>

Yeah, this is something we need to clear up more in the UI. Technically, ordering does matter there - but only for actions that run entirely in the frontend/clientside - meaning, basically, everything _except_ scripts. The reason there’s (generally) a corresponding scripting function for every client-side action is so that you can do more advanced control flow yourself - but you _must_ do it all it one script block.

---

<div class="post-metadata">

**Author:** ![michal.koblasa](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@michal.koblasa](https://forum.inductiveautomation.com/u/michal.koblasa)\
**Post date:** [October 15, 2019, 6:55am UTC](https://forum.inductiveautomation.com/t/jython-script-pipeline-exit/29067/5 "2019-10-15T06:55:58Z")

</div>

Thank you for clarification.  
I was confused by UI, because, you can sort actions in script.  
So I deducted, that they run in sequence.  
By the way i liked idea to have multiple steps to logically divide action scripts into steps.  
For example:

1. Form validation
2. Confirmation
3. Clearing up form

I can do it all in one script, but it is not so nice solution. 🙂

Thank you
