<?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: How to get the current task Id ? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-current-task-id/m-p/104557#M73036</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;*bump* any suggestion&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Jan 2014 07:27:31 GMT</pubDate>
    <dc:creator>ashendra1</dc:creator>
    <dc:date>2014-01-31T07:27:31Z</dc:date>
    <item>
      <title>How to get the current task Id ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-current-task-id/m-p/104556#M73035</link>
      <description>Hello everyone.I'm working with Grails framework and activiti plugin.After the call of completeTask(params), I want to get the Id of my current Task. In my page, I send a variable taskId like this :&amp;lt;g:hiddenField name="taskId" value="${params.taskId}" /&amp;gt;but the real value of the task Id is dif</description>
      <pubDate>Mon, 20 Feb 2012 10:39:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-current-task-id/m-p/104556#M73035</guid>
      <dc:creator>pierre1</dc:creator>
      <dc:date>2012-02-20T10:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the current task Id ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-current-task-id/m-p/104557#M73036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;*bump* any suggestion&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 07:27:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-current-task-id/m-p/104557#M73036</guid>
      <dc:creator>ashendra1</dc:creator>
      <dc:date>2014-01-31T07:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the current task Id ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-current-task-id/m-p/104558#M73037</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;BR /&gt;&lt;SPAN&gt;May be I do not understand the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In case when you complete task,&amp;nbsp; task is finished and there won't be any user task in the task service with this taskId. (there will be record in the history service - depends on the history level). Next task in the process execution (if any) is added to the task service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 08:09:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-current-task-id/m-p/104558#M73037</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2014-01-31T08:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the current task Id ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-current-task-id/m-p/104559#M73038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, let me exlplain my use case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have two task, task1-&amp;gt;task2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;task1 is a manual task, the form properties of this task has 1 form property named count of type long.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now task 2 is also a manual task, the form properties of task2 uses an external form, like UserFormType. Added a renderer for this form Type. this custom form type shows a custom field which can contain n textFields, n is passed in the constructor. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The way i thought i can do this is get the count variable using &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ProcessEngines.getDefaultProcessEngine().getTaskService().getVariable(taskId, "count")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but i dont know the way to get the current task id.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If there is a better way to do this then suggest. I am working over the activity-explorer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 09:19:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-current-task-id/m-p/104559#M73038</guid>
      <dc:creator>ashendra1</dc:creator>
      <dc:date>2014-01-31T09:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the current task Id ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-current-task-id/m-p/104560#M73039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Seems, you have to determine, what is 'my current Task' for you?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example: if it's just current User Task of a process with known ID - just execute something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(sorry, it's Java)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;TaskQuery query = taskService.createTaskQuery().processInstanceId(processId).includeProcessVariables();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Task theTask = query.singleResult();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Map&amp;lt;String, Object&amp;gt; processVariables = theTask.getProcessVariables();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;by the way, from the variable 'theTask' you can get what you need about User Task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here processVariables contains … process variables &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;In your case, after task1.completeTask(…) the process goes to task2 and stops. I.e. current task is task2 (after task1.completeTask(..)).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 14:28:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-current-task-id/m-p/104560#M73039</guid>
      <dc:creator>yuryshaban</dc:creator>
      <dc:date>2014-01-31T14:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the current task Id ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-current-task-id/m-p/104561#M73040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How can one retreive the processId in SomeFormPropertyRenderer?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Feb 2014 00:08:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-current-task-id/m-p/104561#M73040</guid>
      <dc:creator>ashendra1</dc:creator>
      <dc:date>2014-02-01T00:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the current task Id ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-current-task-id/m-p/104562#M73041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The FormPropertyRenderers don't have access to the current process-instance/task context, I'm afraid. They are designed to work independant of that context. Use the default-attribute to get hold of process-variables to use as default-values if needed… You'll have to create a custom way of rendering your form OR find some way to put the process-instance ID in a process-variable, so it's available in the FormField as default-value.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2014 08:18:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-current-task-id/m-p/104562#M73041</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-02-10T08:18:06Z</dc:date>
    </item>
  </channel>
</rss>

