AnsweredAssumed Answered

Sharing the form property with other task and overriding that value

Question asked by lambav on Apr 15, 2014
Latest reply on Apr 15, 2014 by martin.grofcik
Hi There..

I want to use a status form property in one user task and then I want to update that status field with other value in other user task. And then want to update that status field in script task as I do not have any user task there so chose the script task. I have spent like 4 hours now. Please help

<startEvent id="startevent1" name="Start" activiti:initiator="employeeName">
      <extensionElements>
        <activiti:formProperty id="state" name="State" type="string" default="PENDING" variable="state" writable="false">  </activiti:formProperty>
      </extensionElements>
    </startEvent>

Which i want to use in user task and want to override the value

<userTask id="handleRequestByCS" name="Awaiting CS" activiti:assignee="${employeeName}">
        <activiti:formProperty id="state" name="State" type="string" writable="false" value="AWAITING_CS">${state}</activiti:formProperty>
      </extensionElements>
    </userTask>
Also tried
<userTask id="handleRequestByCS" name="Awaiting CS" activiti:assignee="${employeeName}">
        <activiti:formProperty id="state" name="State" type="string" writable="false" value=${state} default="AWAITING_CS"></activiti:formProperty>
      </extensionElements>
</userTask>



Then want to use this variable again in script task

<scriptTask id="scripttask2" name="Completed" activiti:autoStoreVariables="false">
     <script>
    status="COMPLETED";
    execution.setVariable("state", status)
   </script>
    </scriptTask>

Please help

Outcomes