<?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 Adding attributes to the user task in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/adding-attributes-to-the-user-task/m-p/66424#M42201</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need to create user tasks along with storing some attributes related to my business like based on purchase order the task are created so need to store the purchaseOrderId along with the task so that it could be used a search criteria.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anybody suggest me in achieving this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Apr 2011 01:17:43 GMT</pubDate>
    <dc:creator>bluerain</dc:creator>
    <dc:date>2011-04-12T01:17:43Z</dc:date>
    <item>
      <title>Adding attributes to the user task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/adding-attributes-to-the-user-task/m-p/66424#M42201</link>
      <description>I need to create user tasks along with storing some attributes related to my business like based on purchase order the task are created so need to store the purchaseOrderId along with the task so that it could be used a search criteria.Can anybody suggest me in achieving this?Thanks</description>
      <pubDate>Tue, 12 Apr 2011 01:17:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/adding-attributes-to-the-user-task/m-p/66424#M42201</guid>
      <dc:creator>bluerain</dc:creator>
      <dc:date>2011-04-12T01:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Adding attributes to the user task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/adding-attributes-to-the-user-task/m-p/66425#M42202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use task-local variables for this. Using the TaskQuery, you can ask for all tasks with a variable set the the given value:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;taskService.createTaskQuery().taskVariableValueEquals("purchaseOrderId", "12345").list();&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 07:27:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/adding-attributes-to-the-user-task/m-p/66425#M42202</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2011-04-12T07:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding attributes to the user task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/adding-attributes-to-the-user-task/m-p/66426#M42203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;how do i set the variables in the class MyAssignmentHandler&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;userTask id="task1" name="My task" &amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;extensionElements&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:taskListener event="create" class="org.activiti.MyAssignmentHandler" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/extensionElements&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/userTask&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public void notify(DelegateTask delegateTask) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delegateTask.setDescription("Purchase Order Task");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; delegateTask.createVariableLocal("NumberAttribute1",delegateTask.getExecution().getVariable("puchaseOrderId"));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But this doesnt seem to work because my test case is not able to retrieve the task based on the variable set.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;List&amp;lt;Task&amp;gt; taskList = taskService.createTaskQuery()//.list();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .taskVariableValueEquals("NumberAttribute1", purchaseOrderId).list();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This does not give me any results. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But if I do &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;List&amp;lt;Task&amp;gt; taskList = taskService.createTaskQuery().list();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It gives me the task created…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any advice is welcome??&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 22:44:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/adding-attributes-to-the-user-task/m-p/66426#M42203</guid>
      <dc:creator>bluerain</dc:creator>
      <dc:date>2011-04-13T22:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Adding attributes to the user task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/adding-attributes-to-the-user-task/m-p/66427#M42204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, you should use delegateTask.setVariableLocal(). Also, make sure the type of the Object set in 'setVariableLocal' is the same type as the one you use for querying (eg. Long).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 08:10:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/adding-attributes-to-the-user-task/m-p/66427#M42204</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2011-04-14T08:10:01Z</dc:date>
    </item>
  </channel>
</rss>

