<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to do exception handling in Activiti v6.0.0 in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8084#M3673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should atleast keep the variable available in your process by the time it reaches your exclusive gateway. The problem above is that you are setting the variable &lt;STRONG&gt;Path&lt;/STRONG&gt; a value only when the you come across an exception. This means that when there is no exception, variable Path is unknown. That was the reason for your exception.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you look at how I did this, irrespective of whether I see an exception or not, I am setting the value for variable Path.&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;try {&lt;/SPAN&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println("In Service Task");&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Do something&amp;nbsp;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;STRONG&gt;execution.setVariable("Path","Success")&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;} catch (Exception e) {&lt;/SPAN&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG style="border: 0px;"&gt;execution.setVariable("Path","HandleException")&lt;/STRONG&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Apr 2018 04:51:21 GMT</pubDate>
    <dc:creator>hari</dc:creator>
    <dc:date>2018-04-25T04:51:21Z</dc:date>
    <item>
      <title>How to do exception handling in Activiti v6.0.0</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8076#M3665</link>
      <description>‌Hi I am new to Activiti Framework, Can someone please give information on how can we do exception handling in activiti v6.0.0 . Please attach a sample bpmn xml file with exception as a service task, and also the exception class(java code) if possible.I found this while searching for info on excepti</description>
      <pubDate>Mon, 23 Apr 2018 14:06:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8076#M3665</guid>
      <dc:creator>nami</dc:creator>
      <dc:date>2018-04-23T14:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to do exception handling in Activiti v6.0.0</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8077#M3666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way in which I do is, I define a condition on the outgoing transitions. One will have something like&amp;nbsp;${Path=="Success"} and other will have something like&amp;nbsp;${Path=="HandleException"}.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My service task will have code something as below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;try {&lt;/SPAN&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println("In Service Task");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Do something&amp;nbsp;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; execution.setVariable("Path","Success")&lt;/SPAN&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;} catch (Exception e) {&lt;/SPAN&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;execution.setVariable("Path","HandleException")&lt;/SPAN&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 06:11:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8077#M3666</guid>
      <dc:creator>hari</dc:creator>
      <dc:date>2018-04-24T06:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to do exception handling in Activiti v6.0.0</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8078#M3667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would also suggest to really think about if you want to handle an exception in the process model or if it is a technical matter. If it is a technical matter and not an exceptional business path you should deal with it in Java behind the scenes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 07:57:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8078#M3667</guid>
      <dc:creator>salaboy</dc:creator>
      <dc:date>2018-04-24T07:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to do exception handling in Activiti v6.0.0</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8079#M3668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u tell me are you using exclusive gateways to manage your conditions in the bpmn xml file ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 12:04:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8079#M3668</guid>
      <dc:creator>nami</dc:creator>
      <dc:date>2018-04-24T12:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to do exception handling in Activiti v6.0.0</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8080#M3669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i want to handle some business exceptions as well.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 12:05:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8080#M3669</guid>
      <dc:creator>nami</dc:creator>
      <dc:date>2018-04-24T12:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to do exception handling in Activiti v6.0.0</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8081#M3670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Business Exceptions are fine.. just make sure that those are not Java Exceptions.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 12:29:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8081#M3670</guid>
      <dc:creator>salaboy</dc:creator>
      <dc:date>2018-04-24T12:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to do exception handling in Activiti v6.0.0</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8082#M3671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but i need more clarity on how to do this in activiti 6.0.0. Can you please provide more details on this ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 12:44:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8082#M3671</guid>
      <dc:creator>nami</dc:creator>
      <dc:date>2018-04-24T12:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to do exception handling in Activiti v6.0.0</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8083#M3672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using this as exclusive gateway in my bpmn xml file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;exclusiveGateway id="exceptionOccured" name="exceptionOccured"/&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; &amp;lt;sequenceFlow id="exception" sourceRef="exceptionOccured"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; targetRef="catchException"&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; &amp;lt;conditionExpression xsi:type="tFormalExpression"&amp;gt;&amp;lt;![CDATA[${Path == "HandleException"}]]&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; &amp;lt;/conditionExpression&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; &amp;lt;/sequenceFlow&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; &amp;lt;sequenceFlow id="no-exception" sourceRef="exceptionOccured"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; targetRef="endevent1"&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; &amp;lt;conditionExpression xsi:type="tFormalExpression"&amp;gt;${Path&amp;nbsp;!= "HandleException"}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; &amp;lt;/conditionExpression&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; &amp;lt;/sequenceFlow&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it throws below exception :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;org.activiti.engine.ActivitiException: Unknown property used in expression: ${Path == "HandleException"}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:52) ~[activiti-engine-6.0.0.jar:6.0.0]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am setting the Path Variable in the catch block of my java task code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//do something&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;catch (Exception e) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger.error("rest call failed " + e.getMessage() +e.getMessage());&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;new ThrowsExceptionBehavior() {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;private static final long serialVersionUID = 1L;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public void execute(DelegateExecution execution) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;execution.setVariable("Path", "HandleException");&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 04:02:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8083#M3672</guid>
      <dc:creator>nami</dc:creator>
      <dc:date>2018-04-25T04:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to do exception handling in Activiti v6.0.0</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8084#M3673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should atleast keep the variable available in your process by the time it reaches your exclusive gateway. The problem above is that you are setting the variable &lt;STRONG&gt;Path&lt;/STRONG&gt; a value only when the you come across an exception. This means that when there is no exception, variable Path is unknown. That was the reason for your exception.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you look at how I did this, irrespective of whether I see an exception or not, I am setting the value for variable Path.&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;try {&lt;/SPAN&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println("In Service Task");&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Do something&amp;nbsp;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;STRONG&gt;execution.setVariable("Path","Success")&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;} catch (Exception e) {&lt;/SPAN&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG style="border: 0px;"&gt;execution.setVariable("Path","HandleException")&lt;/STRONG&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 04:51:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-do-exception-handling-in-activiti-v6-0-0/m-p/8084#M3673</guid>
      <dc:creator>hari</dc:creator>
      <dc:date>2018-04-25T04:51:21Z</dc:date>
    </item>
  </channel>
</rss>

