<?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 Activity Name of the current Activity in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/activity-name-of-the-current-activity/m-p/94444#M64698</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;currently I'm displaying the current task and all the completed tasks from the running instance&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the historyService gives me access to all completed tasks from the given instance. There I can access the activities Name, which is defined in the ProcessDefinition.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But for the current task I have to use the activityID from the processInstance that is running. Problematic as the ID and the Name are similar in some way but not equal.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to add the activityName to the processInstance or to query the name in some way with the activitiyID?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The DeploymentService doesn't give me any hint how to do so, except for one solution:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Querying the ResourceName of the deployment and parsing the XML-File.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It isn't that bad, because I'm using Activiti with Grails and Groovy provides me a nice and neat way to access XML-Structures, but I think it's a bit oversized just to display another String&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a smart and smooth way to do so?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope you understand my problem &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Feb 2012 08:57:33 GMT</pubDate>
    <dc:creator>zobbl</dc:creator>
    <dc:date>2012-02-01T08:57:33Z</dc:date>
    <item>
      <title>Activity Name of the current Activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activity-name-of-the-current-activity/m-p/94444#M64698</link>
      <description>Hi there,currently I'm displaying the current task and all the completed tasks from the running instancethe historyService gives me access to all completed tasks from the given instance. There I can access the activities Name, which is defined in the ProcessDefinition.But for the current task I have</description>
      <pubDate>Wed, 01 Feb 2012 08:57:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activity-name-of-the-current-activity/m-p/94444#M64698</guid>
      <dc:creator>zobbl</dc:creator>
      <dc:date>2012-02-01T08:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Activity Name of the current Activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activity-name-of-the-current-activity/m-p/94445#M64699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When you query for tasks, you get a org.activiti.engine.task.Task object back, which has a name attribute you can access.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 09:01:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activity-name-of-the-current-activity/m-p/94445#M64699</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-02-02T09:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Activity Name of the current Activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activity-name-of-the-current-activity/m-p/94446#M64700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your reply, but it doesn't seem to work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The description of Task implies, that only usertasks can be queried. But I have only Script Tasks (User Tasks are likely to be added in the future, but not for now).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or I'm doing something wrong.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;taskService.createTaskQuery().processDefinitionName(processName).list()&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;and &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;taskService.createTaskQuery().processInstanceId(currentInstance.id).list()&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;All I get is an empty list. So the passed values instanceId and procDefinitionName are right and the query was executed as intended. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another, maybe important, information is, that all my tasks are asynchronous, as I'm using Grails and want the page to load and display all the information on the fly&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 12:58:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activity-name-of-the-current-activity/m-p/94446#M64700</guid>
      <dc:creator>zobbl</dc:creator>
      <dc:date>2012-02-02T12:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Activity Name of the current Activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activity-name-of-the-current-activity/m-p/94447#M64701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, my mistake: I thought you were talking about user tasks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is no way of getting the name of a script task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is however a workaround, by casting the RepositoryService to the RepositoryServiceImpl you can access a method that allows to inspect the ProcessDefinition and its activities programmatically. That should dp the trick, I believe.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 08:41:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activity-name-of-the-current-activity/m-p/94447#M64701</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-02-03T08:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Activity Name of the current Activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activity-name-of-the-current-activity/m-p/94448#M64702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Alright thanks &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;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it planned for the future, that all types of tasks can be queried for their name?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 08:45:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activity-name-of-the-current-activity/m-p/94448#M64702</guid>
      <dc:creator>zobbl</dc:creator>
      <dc:date>2012-02-03T08:45:34Z</dc:date>
    </item>
  </channel>
</rss>

