<?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 Couldn't get task by processInstanceId in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/couldn-t-get-task-by-processinstanceid/m-p/219189#M172319</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi exports,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. I created a activitiManager service class wrapped activiti api in SprintMVC service layer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Started a new instance by key definition.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Get the current task by instance id which was created in step 2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. Submitted the task via formService.submitTaskFormData method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So here is the problem, steps 2-4 are in the same method, I couldn't get the current task in step 2. But I could get it when I set a break point in debugging mode. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;step 2. processInstanceId= activitiManager.instanceProcessByKey(INSTANCE_KEY, currentId.toString(), keyCode, variables);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;step 3. curTask = activitiManager.getActiveTaskByProcessInstanceId(processInstanceId);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Jul 2016 05:28:35 GMT</pubDate>
    <dc:creator>xuemzhan</dc:creator>
    <dc:date>2016-07-27T05:28:35Z</dc:date>
    <item>
      <title>Couldn't get task by processInstanceId</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/couldn-t-get-task-by-processinstanceid/m-p/219189#M172319</link>
      <description>Hi exports,1. I created a activitiManager service class wrapped activiti api in SprintMVC service layer. 2. Started a new instance by key definition.3. Get the current task by instance id which was created in step 2.4. Submitted the task via formService.submitTaskFormData method.So here is the probl</description>
      <pubDate>Wed, 27 Jul 2016 05:28:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/couldn-t-get-task-by-processinstanceid/m-p/219189#M172319</guid>
      <dc:creator>xuemzhan</dc:creator>
      <dc:date>2016-07-27T05:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Couldn't get task by processInstanceId</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/couldn-t-get-task-by-processinstanceid/m-p/219190#M172320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Probably the method is done in one transaction, hence why the current task can't be found. Split those up in different methods, or change the transactional demarcation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Or you might have an async step in the beginning and the user task simply doesn't exist yet?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 11:54:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/couldn-t-get-task-by-processinstanceid/m-p/219190#M172320</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-07-27T11:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Couldn't get task by processInstanceId</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/couldn-t-get-task-by-processinstanceid/m-p/219191#M172321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Jbarrez, you are right. I have found solution via your advise.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 12:27:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/couldn-t-get-task-by-processinstanceid/m-p/219191#M172321</guid>
      <dc:creator>xuemzhan</dc:creator>
      <dc:date>2016-07-27T12:27:10Z</dc:date>
    </item>
  </channel>
</rss>

