<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How to terminate process in casemap by condition</title><link>https://answers.axonivy.com/questions/3138/how-to-terminate-process-in-casemap-by-condition</link><description>&lt;p&gt;Hi all&lt;/p&gt;
&lt;p&gt;I have a case map as below, that case map has only two stages, one process for each. Step 2 is terminated process. 
&lt;img alt="alt text" src="https://answers.axonivy.com/upfiles/Untitled_nIUFv7b.png"&gt;
In our business, there is a requirement that :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;User input data in step 1then submit, if that data need to be verified, then process will come to stage 2 (step 2). After that process can be terminated&lt;/li&gt;
&lt;li&gt;If in step 1 the data user enter is qualified enough then process can be terminated immediately. There is no need to go to stage 2 anymore&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;My question is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Can casemap support for this business?&lt;/li&gt;
&lt;li&gt;Can we terminate process programmatically? then i can use in step 1.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/3138/how-to-terminate-process-in-casemap-by-condition" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 23 Mar 2018 00:47:20 -0400</lastBuildDate><item><title>Comment by trungdv on Alex Suter's answer</title><link>https://answers.axonivy.com/questions/3138/how-to-terminate-process-in-casemap-by-condition#3144</link><description>&lt;p&gt;Thanks &lt;a href="https://answers.axonivy.com/users/710/alex-suter"&gt;&lt;a href="https://answers.axonivy.com/users/710/alex-suter"&gt;@Alex Suter&lt;/a&gt;&lt;/a&gt; ♦♦  .It works.
But regarding to this question &lt;a href="https://answers.axonivy.com/questions/3045/how-to-skip-remain-processes-on-casemap-after-condition-is-failed"&gt;https://answers.axonivy.com/questions/3045/how-to-skip-remain-processes-on-casemap-after-condition-is-failed&lt;/a&gt; . It gonna be more complicated if in stage 2 there is many processes, even more stage then we need to check that condition for all remaining processes. Imo we should have the api to end the stage by condition.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">trungdv</dc:creator><pubDate>Fri, 23 Mar 2018 00:47:20 -0400</pubDate><guid>https://answers.axonivy.com/questions/3138/how-to-terminate-process-in-casemap-by-condition#3144</guid></item><item><title>Answer by Alex Suter</title><link>https://answers.axonivy.com/questions/3138/how-to-terminate-process-in-casemap-by-condition/3139</link><description>&lt;p&gt;A easy solution would be to define a precondition on process &lt;em&gt;step 2&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;At the momment there are no preconditions on level stage. There is an api to jump between stages with &lt;code&gt;ivy.case.getBuinessCase().setStageId("stage2")&lt;/code&gt;. But you can not jump to &lt;em&gt;no stage&lt;/em&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex Suter</dc:creator><pubDate>Thu, 22 Mar 2018 06:01:39 -0400</pubDate><guid>https://answers.axonivy.com/questions/3138/how-to-terminate-process-in-casemap-by-condition/3139</guid></item></channel></rss>