<?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: managementService.getJobExceptionStacktrace in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/managementservice-getjobexceptionstacktrace/m-p/58887#M36105</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi cirerenat,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Activiti uses the caller thread for doing its work. That means that if an exception occurs while executing &lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt; runtimeService.startProcessInstanceByKey(processId,vars);&lt;/CODE&gt;&lt;SPAN&gt;the method witll throw that exception.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So you can write code like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;try {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; runtimeService.startProcessInstanceByKey(processId,vars);&lt;BR /&gt;}catch(ActivitiException e) {&lt;BR /&gt;&amp;nbsp; // do sth about it&lt;BR /&gt;}&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;This is for processing of sync activities. All background work is not performed in the caller thread but by the job executor. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Exceptions for that can be retrieved using the ManagementService, as you already found out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Read the userguide: &lt;/SPAN&gt;&lt;A href="http://activiti.org/userguide/index.html#N10562" rel="nofollow noopener noreferrer"&gt;http://activiti.org/userguide/index.html#N10562&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 07 Jan 2012 09:25:52 GMT</pubDate>
    <dc:creator>meyerd</dc:creator>
    <dc:date>2012-01-07T09:25:52Z</dc:date>
    <item>
      <title>managementService.getJobExceptionStacktrace</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/managementservice-getjobexceptionstacktrace/m-p/58885#M36103</link>
      <description>Is there a way to get the exception stacktrace&amp;nbsp; from the Runtimeservice similar to the managementService.getJobExceptionStacktrace ? runtimeProcessId = runtimeService.startProcessInstanceByKey(processId,vars).getId();// I want to see the access the stack trace if something went wrong.// something li</description>
      <pubDate>Wed, 28 Dec 2011 21:16:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/managementservice-getjobexceptionstacktrace/m-p/58885#M36103</guid>
      <dc:creator>cirerenat</dc:creator>
      <dc:date>2011-12-28T21:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: managementService.getJobExceptionStacktrace</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/managementservice-getjobexceptionstacktrace/m-p/58886#M36104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;new year, new hopes to get an answer&amp;nbsp; &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; Any suggestions ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2012 23:15:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/managementservice-getjobexceptionstacktrace/m-p/58886#M36104</guid>
      <dc:creator>cirerenat</dc:creator>
      <dc:date>2012-01-05T23:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: managementService.getJobExceptionStacktrace</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/managementservice-getjobexceptionstacktrace/m-p/58887#M36105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi cirerenat,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Activiti uses the caller thread for doing its work. That means that if an exception occurs while executing &lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt; runtimeService.startProcessInstanceByKey(processId,vars);&lt;/CODE&gt;&lt;SPAN&gt;the method witll throw that exception.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So you can write code like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;try {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; runtimeService.startProcessInstanceByKey(processId,vars);&lt;BR /&gt;}catch(ActivitiException e) {&lt;BR /&gt;&amp;nbsp; // do sth about it&lt;BR /&gt;}&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;This is for processing of sync activities. All background work is not performed in the caller thread but by the job executor. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Exceptions for that can be retrieved using the ManagementService, as you already found out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Read the userguide: &lt;/SPAN&gt;&lt;A href="http://activiti.org/userguide/index.html#N10562" rel="nofollow noopener noreferrer"&gt;http://activiti.org/userguide/index.html#N10562&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jan 2012 09:25:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/managementservice-getjobexceptionstacktrace/m-p/58887#M36105</guid>
      <dc:creator>meyerd</dc:creator>
      <dc:date>2012-01-07T09:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: managementService.getJobExceptionStacktrace</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/managementservice-getjobexceptionstacktrace/m-p/58888#M36106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Daniel,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do I have to convert all of my ServiceTask and CallActivity task to asynchronous though ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Because in my bpmn flow they are not, and in the exception handler when I try to use the management service I get an empty list for the below call.&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;List&amp;lt;Job&amp;gt; jobs = managementService.createJobQuery().list();&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 21:14:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/managementservice-getjobexceptionstacktrace/m-p/58888#M36106</guid>
      <dc:creator>cirerenat</dc:creator>
      <dc:date>2012-01-09T21:14:51Z</dc:date>
    </item>
  </channel>
</rss>

