<?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 catch exception with Task Switch Gateway component</title><link>https://answers.axonivy.com/questions/1554/how-to-catch-exception-with-task-switch-gateway-component</link><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;When I started the task in the task list. I often got the exception: &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;RequestException: The task with identifier '846' was already finished or does not exist (Session identifier is '45').&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;But I want to catch this exception and show a friendly dialog to the user.&lt;/p&gt;
&lt;p&gt;I am looking forward to hearing any ideas from you&lt;/p&gt;
&lt;p&gt;Vuong Vu,
Vision team&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1554/how-to-catch-exception-with-task-switch-gateway-component" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 13 Nov 2015 16:28:51 -0500</lastBuildDate><item><title>Answer by Reto Weiss</title><link>https://answers.axonivy.com/questions/1554/how-to-catch-exception-with-task-switch-gateway-component/1557</link><description>&lt;p&gt;With Axon.ivy 6.0 there will be a better error messsage for this problem. If the task was already done by another person the name of the person is visible in the error page.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reto Weiss</dc:creator><pubDate>Fri, 13 Nov 2015 16:28:51 -0500</pubDate><guid>https://answers.axonivy.com/questions/1554/how-to-catch-exception-with-task-switch-gateway-component/1557</guid></item><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/1554/how-to-catch-exception-with-task-switch-gateway-component/1556</link><description>&lt;p&gt;Instead of linking the task directly you could execute dialog logic when a user tries to resume a task. Within this dialog logic you check if the task still has the correct state. (E.g. by using the workflow api: TaskQuery.create()....)
If the task state is correct, you redirect to the real task-pickup URL, otherwise you show a nice dialog, that somebodey else finished the task.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Fri, 13 Nov 2015 15:26:13 -0500</pubDate><guid>https://answers.axonivy.com/questions/1554/how-to-catch-exception-with-task-switch-gateway-component/1556</guid></item></channel></rss>