<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Suspend a Task</title><link>https://answers.axonivy.com/questions/1917/suspend-a-task</link><description>&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;I want to suspend a Task when an user clicks on the cancel button on a jsf dialog.&lt;/p&gt;
&lt;p&gt;I found an hint with the ivy.task.reset(). But when use this function, i cannot finishing the process step due to an error (IllegalStateException: State of Task must be one of the following values...)&lt;/p&gt;
&lt;p&gt;What would be the best way to suspend a task and resume it later on?&lt;/p&gt;
&lt;p&gt;Thanks for help in advance.&lt;/p&gt;
&lt;p&gt;Regards,
Daniel&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1917/suspend-a-task" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 27 Jul 2016 11:48:41 -0400</lastBuildDate><item><title>Comment by RMS71 on RMS71's answer</title><link>https://answers.axonivy.com/questions/1917/suspend-a-task#1921</link><description>&lt;p&gt;The 'old Task' is "DONE" or "COMPLETED" (I'm not sure what the actual status nomenclature is.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">RMS71</dc:creator><pubDate>Wed, 27 Jul 2016 11:48:41 -0400</pubDate><guid>https://answers.axonivy.com/questions/1917/suspend-a-task#1921</guid></item><item><title>Comment by RMS71 on RMS71's answer</title><link>https://answers.axonivy.com/questions/1917/suspend-a-task#1920</link><description>&lt;p&gt;You get a new Task (new Task ID) but the Data will remain the same. It is difficult to describe in words a picture would be easier. You are essentially making a loop if the status is 'cancel'&lt;/p&gt;
&lt;p&gt;Skript Step (Dummy)-&amp;gt; Task Step -&amp;gt; Dialog -&amp;gt; Alternative (Path 1 == cancel || Path 2...n == 'something else')&lt;/p&gt;
&lt;p&gt;Path 1 -&amp;gt; back to Skript Step (Dummy)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">RMS71</dc:creator><pubDate>Wed, 27 Jul 2016 11:46:35 -0400</pubDate><guid>https://answers.axonivy.com/questions/1917/suspend-a-task#1920</guid></item><item><title>Comment by dharlach on RMS71's answer</title><link>https://answers.axonivy.com/questions/1917/suspend-a-task#1919</link><description>&lt;p&gt;Thank you for your answer. But would that lead to a new task? Or did I understand you wrong?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">dharlach</dc:creator><pubDate>Wed, 27 Jul 2016 10:43:33 -0400</pubDate><guid>https://answers.axonivy.com/questions/1917/suspend-a-task#1919</guid></item><item><title>Answer by RMS71</title><link>https://answers.axonivy.com/questions/1917/suspend-a-task/1918</link><description>&lt;p&gt;The easiest way to do it is to have a data object 'Status' which is set to "cancel" when entering the Dialog, if there is no change one then routes the process back to a 'dummy' action/step before the Task Switch, which can be taken up again by the User. For all other Button actions one sets a different status which then determines the path taken.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">RMS71</dc:creator><pubDate>Tue, 26 Jul 2016 15:52:07 -0400</pubDate><guid>https://answers.axonivy.com/questions/1917/suspend-a-task/1918</guid></item></channel></rss>