<?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 create stand-alone user task with local variables in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-create-stand-alone-user-task-with-local-variables/m-p/217690#M170820</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Andrey,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this test is on Activiti6 (sorry) But there should be similar in Activiti5.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;bug: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;createVariableLocal must be called inside the command context.&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>Wed, 20 Jul 2016 07:36:06 GMT</pubDate>
    <dc:creator>martin_grofcik</dc:creator>
    <dc:date>2016-07-20T07:36:06Z</dc:date>
    <item>
      <title>How to create stand-alone user task with local variables</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-create-stand-alone-user-task-with-local-variables/m-p/217687#M170817</link>
      <description>I am trying to create a stand-alone user task which is not associated with any process instance. How could I create local variables to be associated with the new task?Using the code below we can create and persist the task, but the last call 'CreateVariablesLocal' causes 'lazy loading outside comman</description>
      <pubDate>Mon, 18 Jul 2016 23:40:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-create-stand-alone-user-task-with-local-variables/m-p/217687#M170817</guid>
      <dc:creator>andrey_nikolov</dc:creator>
      <dc:date>2016-07-18T23:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to create stand-alone user task with local variables</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-create-stand-alone-user-task-with-local-variables/m-p/217688#M170818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Andrey,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;have a look on &lt;/SPAN&gt;&lt;CODE&gt;org.activiti.engine.test.api.task.TaskServiceTest#testSaveTaskUpdate&lt;/CODE&gt;&lt;SPAN&gt; in activiti source.&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>Tue, 19 Jul 2016 05:37:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-create-stand-alone-user-task-with-local-variables/m-p/217688#M170818</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2016-07-19T05:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to create stand-alone user task with local variables</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-create-stand-alone-user-task-with-local-variables/m-p/217689#M170819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Martin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The distributable activiti-engine-5.21.0.jar does not have package org.activiti.engine.test.api so we cannot check the code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However we found a work-around: create each variable individually (setVariableLocal) instead of creating them in bulk (createVariablesLocal) by passing variables map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is somewhat counter intuitive and looks like a bug. Please investigate and advise if we should raise a ticket.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Once again, thanks for your response!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; TaskEntity taskEntity = (TaskEntity) taskService.newTask();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; taskEntity.setCategory(…);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; taskEntity.setDescription(…);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; taskEntity.setDueDate(…);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; taskEntity.setName(…);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; taskEntity.setOwner(…);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; taskEntity.setPriority(…);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; taskEntity.setTenantId(…);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; taskService.saveTask(taskEntity);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; for (… each variable) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; taskService.setVariableLocal(… task ID, … variable name, … variable value);&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2016 02:06:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-create-stand-alone-user-task-with-local-variables/m-p/217689#M170819</guid>
      <dc:creator>andrey_nikolov</dc:creator>
      <dc:date>2016-07-20T02:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to create stand-alone user task with local variables</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-create-stand-alone-user-task-with-local-variables/m-p/217690#M170820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Andrey,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this test is on Activiti6 (sorry) But there should be similar in Activiti5.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;bug: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;createVariableLocal must be called inside the command context.&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>Wed, 20 Jul 2016 07:36:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-create-stand-alone-user-task-with-local-variables/m-p/217690#M170820</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2016-07-20T07:36:06Z</dc:date>
    </item>
  </channel>
</rss>

