<?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 Retrieve task definition ID with Java API in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-task-definition-id-with-java-api/m-p/270123#M223253</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are fiddling with Activiti in Alfresco 4.2.c for an upcoming project. We created a simple workflow with a user task. The user task definition in the Activiti designer and in the XML shows an id with value "verwittigDirectieleden". The description is set to "Verwittig directieleden". The snippet from the XML file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;userTask id="verwittigDirectieleden" name="Verwittig directieleden" activiti:candidateGroups="GROUP_directieassistenten"&amp;gt;&amp;lt;/userTask&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In Java we we're able to retrieve all the pooled tasks and claim this task to&amp;nbsp; a person. However when we look at the properties of this task, we see the following values for some properties:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;definition = WorkflowTaskDefinition [id=bpm_workflowTask,metadata=ClassDef[name={&lt;A href="http://www.alfresco.org/model/bpm/1.0}workflowTask" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/bpm/1.0}workflowTask&lt;/A&gt;]]&lt;BR /&gt;id = "activity$130"&lt;BR /&gt;name = "bpm_workflowTask"&lt;BR /&gt;properties = { {&lt;A href="http://www.alfresco.org/model/bpm/1.0}description=Verwittig" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/bpm/1.0}description=Verwittig&lt;/A&gt; directieleden, … }&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As you can see, the id in the WorkflowTaskDefinition class does not match the id in the XML. We see the description from the XML appear in the "properties" variable, but the XML id is nowhere to be seen.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this a bug in Activiti or are we approaching this the wrong way? Any help is greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mano Swerts&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jan 2013 11:41:23 GMT</pubDate>
    <dc:creator>mano_swerts</dc:creator>
    <dc:date>2013-01-24T11:41:23Z</dc:date>
    <item>
      <title>Retrieve task definition ID with Java API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-task-definition-id-with-java-api/m-p/270123#M223253</link>
      <description>Hi all,We are fiddling with Activiti in Alfresco 4.2.c for an upcoming project. We created a simple workflow with a user task. The user task definition in the Activiti designer and in the XML shows an id with value "verwittigDirectieleden". The description is set to "Verwittig directieleden". The sn</description>
      <pubDate>Thu, 24 Jan 2013 11:41:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieve-task-definition-id-with-java-api/m-p/270123#M223253</guid>
      <dc:creator>mano_swerts</dc:creator>
      <dc:date>2013-01-24T11:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve task definition ID with Java API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-task-definition-id-with-java-api/m-p/270124#M223254</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;SPAN&gt;you can take a look here &lt;/SPAN&gt;&lt;A href="http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/service/cmr/workflow/WorkflowService.html" rel="nofollow noopener noreferrer"&gt;http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/service/cmr/workflow/WorkflowService.html&lt;/A&gt;&lt;SPAN&gt; for WorkflowService interface.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The method you're looking for might be &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;getTaskById(java.lang.String taskId)&lt;BR /&gt;Gets a Task by unique Id&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Andrea&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 12:35:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieve-task-definition-id-with-java-api/m-p/270124#M223254</guid>
      <dc:creator>abarisone</dc:creator>
      <dc:date>2013-01-24T12:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve task definition ID with Java API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-task-definition-id-with-java-api/m-p/270125#M223255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Andrea,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As you can read in my post, the problem is not retrieving a task. Retrieving all tasks for a certain person works fine. The problem is that I cannot find the id from the workflow XML (the .bpmn file) in the WorkflowTask object. I would expect that it matches the id in the WorkflowTaskDefinition object, but that does not seem the case. I can see the description from the .bpmn file in the properties Map, but the id from the .bpmn file is nowhere to be found.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wonder if we are searching in the wrong place or that it is a bug and that the id in the WorkflowTaskDefinition object must match the id in the .bpmn file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mano&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 12:42:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieve-task-definition-id-with-java-api/m-p/270125#M223255</guid>
      <dc:creator>mano_swerts</dc:creator>
      <dc:date>2013-01-24T12:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve task definition ID with Java API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-task-definition-id-with-java-api/m-p/270126#M223256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Appearantly I had to look a little deeper into the WorkflowTaskDefinition class. I can retrieve the XML id with the following code on a WorkflowTask:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;task.getDefinition().getNode().getName();&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 14:58:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieve-task-definition-id-with-java-api/m-p/270126#M223256</guid>
      <dc:creator>mano_swerts</dc:creator>
      <dc:date>2013-01-24T14:58:23Z</dc:date>
    </item>
  </channel>
</rss>

