<?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 How to pass variable from one task to another task in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-pass-variable-from-one-task-to-another-task/m-p/212158#M165288</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have created one workflow. On human task there are some fields which would be filled up by user and those fields must be visible and editable to the other user task. In other user task when I define variable (writable &amp;amp; readable) in the form property, it does not show the old values entered by the first user. But when I don't define new variable , it shows the old one which is also editable but shows an error on submit.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Nov 2016 05:36:31 GMT</pubDate>
    <dc:creator>manav</dc:creator>
    <dc:date>2016-11-25T05:36:31Z</dc:date>
    <item>
      <title>How to pass variable from one task to another task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-pass-variable-from-one-task-to-another-task/m-p/212158#M165288</link>
      <description>I have created one workflow. On human task there are some fields which would be filled up by user and those fields must be visible and editable to the other user task. In other user task when I define variable (writable &amp;amp; readable) in the form property, it does not show the old values entered by</description>
      <pubDate>Fri, 25 Nov 2016 05:36:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-pass-variable-from-one-task-to-another-task/m-p/212158#M165288</guid>
      <dc:creator>manav</dc:creator>
      <dc:date>2016-11-25T05:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass variable from one task to another task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-pass-variable-from-one-task-to-another-task/m-p/212159#M165289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Define variables and use them at process instance level.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 08:54:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-pass-variable-from-one-task-to-another-task/m-p/212159#M165289</guid>
      <dc:creator>hari</dc:creator>
      <dc:date>2016-12-13T08:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass variable from one task to another task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-pass-variable-from-one-task-to-another-task/m-p/212160#M165290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manav Aahuja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at Activiti documentation for implementing Forms here:&amp;nbsp;&lt;A class="link-titled" href="https://www.activiti.org/userguide/#forms" title="https://www.activiti.org/userguide/#forms" rel="nofollow noopener noreferrer"&gt;Activiti User Guide&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a nutshell, in order to implement user task variables correctly, you need to do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Imagine a process such as book order which consists of several service tasks and 2 user tasks as follows&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://connect.hyland.com/legacyfs/online/alfresco/11670_usertasks1.PNG" style="width: 620px; height: 75px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Design your process variables such as: isbn, validationResult&amp;nbsp;&lt;/P&gt;&lt;P&gt;- When the process instance reaches the first user task,&amp;nbsp;say, review order. You would need to 'map' the process variables to form properties like below (note that I have the form property ids to be exact to process variables name to utilize the Activiti form properties auto mapping. You don't have to. Read documentation here&amp;nbsp;&lt;A class="link-titled" href="https://www.activiti.org/userguide/#forms" title="https://www.activiti.org/userguide/#forms" rel="nofollow noopener noreferrer"&gt;Activiti User Guide&lt;/A&gt;&amp;nbsp; to know how to map form properties to process variables with different names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://connect.hyland.com/legacyfs/online/alfresco/11673_usertasks2.PNG" style="width: 620px; height: 322px;" /&gt;&lt;/P&gt;&lt;PRE class="" style="color: black; background: #eeeeee; border: 1px dashed #666666; padding: 1.25em 1.5625em 1.125em;"&gt;&lt;CODE data-lang="xml" style="color: black;"&gt;&amp;lt;userTask id="task"&amp;gt;&amp;nbsp;&amp;nbsp; &amp;lt;extensionElements&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:formProperty id="isbn" /&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:formProperty id="validationResult"/&amp;gt;&amp;nbsp;&amp;nbsp; &amp;lt;/extensionElements&amp;gt; &amp;lt;/userTask&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;- Then you do the same for the 2nd user task 'Final Approval'. This will map process variables to form properties displayed on form 'Final Approval'.&lt;/P&gt;&lt;P&gt;- I have 2 service tasks for demo purposes. First one to initialize the process variables and the second is to update validationResult variable to stimulate a successful validation after Review task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My unit test ran successfully. I could see correct values of form properties on each user task and both user tasks were submitted successfully which end the process instance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INFO: Task form: reviewForm&lt;BR /&gt;Dec 22, 2016 3:31:21 PM java.util.logging.LogManager$RootLogger log&lt;BR /&gt;INFO: REVIEW FORM -- property id = caseId value = 5&lt;BR /&gt;Dec 22, 2016 3:31:21 PM java.util.logging.LogManager$RootLogger log&lt;BR /&gt;INFO: REVIEW FORM -- property id = caseName value = Book order case 5&lt;BR /&gt;Dec 22, 2016 3:31:21 PM java.util.logging.LogManager$RootLogger log&lt;BR /&gt;INFO: REVIEW FORM -- property id = isbn value = 343&lt;BR /&gt;Dec 22, 2016 3:31:21 PM java.util.logging.LogManager$RootLogger log&lt;BR /&gt;INFO: REVIEW FORM -- property id = validationResult value = false&lt;BR /&gt;Dec 22, 2016 3:31:21 PM java.util.logging.LogManager$RootLogger log&lt;BR /&gt;INFO: Submit Review&lt;BR /&gt;Dec 22, 2016 3:31:21 PM java.util.logging.LogManager$RootLogger log&lt;BR /&gt;INFO: Update validation result to true for execution id 5&lt;BR /&gt;Dec 22, 2016 3:31:21 PM java.util.logging.LogManager$RootLogger log&lt;BR /&gt;INFO: Process execution: id: 5 and current activity id= usertask3&lt;BR /&gt;Dec 22, 2016 3:31:21 PM java.util.logging.LogManager$RootLogger log&lt;BR /&gt;INFO: Execution variables: {Case ID=null, caseId=5, ISBN=null, isbn=343, Case Name=null, validationResult=true, bookOrder=org.activiti.designer.test.BookOrder@70bd9535, caseName=Book order case 5}&lt;BR /&gt;Dec 22, 2016 3:31:21 PM java.util.logging.LogManager$RootLogger log&lt;BR /&gt;INFO: Task 2 form: finalApprovalForm&lt;BR /&gt;Dec 22, 2016 3:31:21 PM java.util.logging.LogManager$RootLogger log&lt;BR /&gt;INFO: APPROVAL FORM -- property id = caseId value = 5&lt;BR /&gt;Dec 22, 2016 3:31:21 PM java.util.logging.LogManager$RootLogger log&lt;BR /&gt;INFO: APPROVAL FORM -- property id = caseName value = Book order case 5&lt;BR /&gt;Dec 22, 2016 3:31:21 PM java.util.logging.LogManager$RootLogger log&lt;BR /&gt;INFO: APPROVAL FORM -- property id = isbn value = 343&lt;BR /&gt;Dec 22, 2016 3:31:21 PM java.util.logging.LogManager$RootLogger log&lt;BR /&gt;INFO: APPROVAL FORM -- property id = validationResult value = true&lt;BR /&gt;Dec 22, 2016 3:31:21 PM java.util.logging.LogManager$RootLogger log&lt;BR /&gt;INFO: Submit Final Approval&lt;BR /&gt;Dec 22, 2016 3:31:22 PM java.util.logging.LogManager$RootLogger log&lt;BR /&gt;INFO: Running processes: 0&lt;BR /&gt;Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.993 sec&lt;BR /&gt;Dec 22, 2016 3:31:22 PM org.springframework.context.support.AbstractApplicationContext doClose&lt;BR /&gt;INFO: Closing org.springframework.context.support.GenericApplicationContext@5d277b59: startup date [Thu Dec 22 15:31:17 ICT 2016]; root of context hierarchy&lt;/P&gt;&lt;P&gt;Results :&lt;/P&gt;&lt;P&gt;Tests run: 1, Failures: 0, Errors: 0, Skipped: 0&lt;/P&gt;&lt;P&gt;[INFO] &lt;BR /&gt;[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ activiti-examples ---&lt;BR /&gt;[INFO] &lt;BR /&gt;[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ activiti-examples ---&lt;BR /&gt;[INFO] Installing /home/osboxes/workspace/activiti-hello/target/activiti-examples-1.0-SNAPSHOT.jar to /home/osboxes/.m2/repository/org/activiti/examples/activiti-examples/1.0-SNAPSHOT/activiti-examples-1.0-SNAPSHOT.jar&lt;BR /&gt;[INFO] Installing /home/osboxes/workspace/activiti-hello/pom.xml to /home/osboxes/.m2/repository/org/activiti/examples/activiti-examples/1.0-SNAPSHOT/activiti-examples-1.0-SNAPSHOT.pom&lt;BR /&gt;[INFO] ------------------------------------------------------------------------&lt;BR /&gt;[INFO] BUILD SUCCESS&lt;BR /&gt;[INFO] ------------------------------------------------------------------------&lt;BR /&gt;[INFO] Total time: 9.149s&lt;BR /&gt;[INFO] Finished at: Thu Dec 22 15:31:22 ICT 2016&lt;BR /&gt;[INFO] Final Memory: 11M/166M&lt;BR /&gt;[INFO] ------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I would double check several things in your implementation:&lt;/P&gt;&lt;P&gt;- First, verify your process variables &amp;lt;-&amp;gt; form properties mapping and see if its done correctly&lt;/P&gt;&lt;P&gt;- Second, verify your submission code to see if there's any error. If you still see the error, what is it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached my unit test code for reference,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Thong Huynh&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2016 08:38:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-pass-variable-from-one-task-to-another-task/m-p/212160#M165290</guid>
      <dc:creator>thuynh</dc:creator>
      <dc:date>2016-12-22T08:38:00Z</dc:date>
    </item>
  </channel>
</rss>

