<?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>Tue, 26 Jul 2016 15:52:07 -0400</lastBuildDate><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>