<?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: Unable to acces task list from DelegateExecution.getEngineServices() in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-acces-task-list-from-delegateexecution/m-p/189218#M142348</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you have a unit test demonstrating this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The process instance id should not be null there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, is this service task executed when the process is started? If so, the process instance won't be flushed to the database and the query will return no results.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jun 2014 12:13:57 GMT</pubDate>
    <dc:creator>jbarrez</dc:creator>
    <dc:date>2014-06-27T12:13:57Z</dc:date>
    <item>
      <title>Unable to acces task list from DelegateExecution.getEngineServices()</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-acces-task-list-from-delegateexecution/m-p/189214#M142344</link>
      <description>Hello everyone.I have a serviceTask with a java class which launches a class&amp;lt;serviceTask id="Initialisation" name="Initialisation" activiti:class="acoss.activiti.DelegateInitialisation"&amp;gt;&amp;lt;/serviceTask&amp;gt;‍‍‍The class itself implements JavaDelegate like thispublic class DelegateInitialisation</description>
      <pubDate>Fri, 13 Jun 2014 13:33:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-acces-task-list-from-delegateexecution/m-p/189214#M142344</guid>
      <dc:creator>cnirparis</dc:creator>
      <dc:date>2014-06-13T13:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to acces task list from DelegateExecution.getEngineServices()</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-acces-task-list-from-delegateexecution/m-p/189215#M142345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The processId is the "real" process instance id.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The task query returns user tasks that are not yet completed in the process instance. Do you have any open user tasks in your case? It will not include service tasks.&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>Mon, 16 Jun 2014 09:26:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-acces-task-list-from-delegateexecution/m-p/189215#M142345</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2014-06-16T09:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to acces task list from DelegateExecution.getEngineServices()</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-acces-task-list-from-delegateexecution/m-p/189216#M142346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you very much for this fast answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In fact it's not only a matter of tasks. It seems that the engineService instance is not available in the JavaDelegate context.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I code &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public void execute(DelegateExecution exec) throws Exception&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; String processId = exec.getProcessInstanceId();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; RuntimeService rtService = es.getRuntimeService(); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ProcessInstance pi = rtService.createProcessInstanceQuery().processInstanceId(processId).includeProcessVariables().singleResult();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There's no exception at execution but the pi processInstance is null.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Certainly I make a mistake somewhere, but the Activiti Java architecture is very complex, so it's easy if you're not experienced to get astray.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 09:44:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-acces-task-list-from-delegateexecution/m-p/189216#M142346</guid>
      <dc:creator>cnirparis</dc:creator>
      <dc:date>2014-06-16T09:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to acces task list from DelegateExecution.getEngineServices()</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-acces-task-list-from-delegateexecution/m-p/189217#M142347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry M. Rademakers I've forgot something, the code is :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public void execute(DelegateExecution exec) throws Exception&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; String processId = exec.getProcessInstanceId();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; EngineServices es = exec.getEngineServices();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; RuntimeService rtService = es.getRuntimeService(); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ProcessInstance pi = rtService.createProcessInstanceQuery().processInstanceId(processId).includeProcessVariables().singleResult();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 09:47:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-acces-task-list-from-delegateexecution/m-p/189217#M142347</guid>
      <dc:creator>cnirparis</dc:creator>
      <dc:date>2014-06-16T09:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to acces task list from DelegateExecution.getEngineServices()</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-acces-task-list-from-delegateexecution/m-p/189218#M142348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you have a unit test demonstrating this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The process instance id should not be null there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, is this service task executed when the process is started? If so, the process instance won't be flushed to the database and the query will return no results.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 12:13:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-acces-task-list-from-delegateexecution/m-p/189218#M142348</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-06-27T12:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to acces task list from DelegateExecution.getEngineServices()</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-acces-task-list-from-delegateexecution/m-p/189219#M142349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes this process is executed from the beginning, since there's no userTask beetwen it and startEvent. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've managed to use an other way for solving my problem, so close this topic. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for trying to solve this issue.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 12:35:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-acces-task-list-from-delegateexecution/m-p/189219#M142349</guid>
      <dc:creator>cnirparis</dc:creator>
      <dc:date>2014-06-27T12:35:34Z</dc:date>
    </item>
  </channel>
</rss>

