<?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: Catching exception in Service Task &amp; Directing to User Task in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/catching-exception-in-service-task-directing-to-user-task/m-p/195673#M148803</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I'm following you, that would need to be configured in your own Behaviour (and use eg Field injection to configure those)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Dec 2014 14:25:09 GMT</pubDate>
    <dc:creator>jbarrez</dc:creator>
    <dc:date>2014-12-05T14:25:09Z</dc:date>
    <item>
      <title>Catching exception in Service Task &amp; Directing to User Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/catching-exception-in-service-task-directing-to-user-task/m-p/195669#M148799</link>
      <description>Using Java logic (not explicitly modeled in BPMN), e.g. catch a database persistence exception from a Service Task and direct it to a User Task (another sequence flow for the failure case).&amp;nbsp; In this case, my plan is that the Service Task implements ActivityBehavior instead of Java Delegate.Is this a</description>
      <pubDate>Mon, 24 Nov 2014 09:02:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/catching-exception-in-service-task-directing-to-user-task/m-p/195669#M148799</guid>
      <dc:creator>sankarts</dc:creator>
      <dc:date>2014-11-24T09:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Catching exception in Service Task &amp; Directing to User Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/catching-exception-in-service-task-directing-to-user-task/m-p/195670#M148800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It would be great, if someone well versed with Activiti can throw some light on my query. Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 05:38:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/catching-exception-in-service-task-directing-to-user-task/m-p/195670#M148800</guid>
      <dc:creator>sankarts</dc:creator>
      <dc:date>2014-11-25T05:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Catching exception in Service Task &amp; Directing to User Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/catching-exception-in-service-task-directing-to-user-task/m-p/195671#M148801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes that's a viable approach. Another way would be to throw a BPMN error in that case and catch it with a boundary error event that connects to a user task. And it's also possible to use an exclusive gateway and check on a specific variable you set in the service task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 09:42:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/catching-exception-in-service-task-directing-to-user-task/m-p/195671#M148801</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2014-11-25T09:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Catching exception in Service Task &amp; Directing to User Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/catching-exception-in-service-task-directing-to-user-task/m-p/195672#M148802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the quick response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW, are you referring to the approach mentioned in the user guide for ActivityBehavior. If yes, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Is it possible without specifying exception and no-exception sequence flows in the workflow spec i.e. in .bpmn file? If yes, any pointers on this please?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Details extracted teh User Guide as below. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;xml&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;serviceTask id="javaService" &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; name="Java service invocation" &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; activiti:class="org.activiti.ThrowsExceptionBehavior"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/serviceTask&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sequenceFlow id="no-exception" sourceRef="javaService" targetRef="theEnd" /&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sequenceFlow id="exception" sourceRef="javaService" targetRef="fixException" /&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and the sample code snippet looks like&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public class ThrowsExceptionBehavior implements ActivityBehavior {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; public void execute(ActivityExecution execution) throws Exception {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; String var = (String) execution.getVariable("var");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PvmTransition transition = null;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; executeLogic(var);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; transition = execution.getActivity().findOutgoingTransition("no-exception");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (Exception e) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; transition = execution.getActivity().findOutgoingTransition("exception");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; execution.take(transition);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 16:06:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/catching-exception-in-service-task-directing-to-user-task/m-p/195672#M148802</guid>
      <dc:creator>sankarts</dc:creator>
      <dc:date>2014-11-25T16:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Catching exception in Service Task &amp; Directing to User Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/catching-exception-in-service-task-directing-to-user-task/m-p/195673#M148803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I'm following you, that would need to be configured in your own Behaviour (and use eg Field injection to configure those)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2014 14:25:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/catching-exception-in-service-task-directing-to-user-task/m-p/195673#M148803</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-12-05T14:25:09Z</dc:date>
    </item>
  </channel>
</rss>

