AnsweredAssumed Answered

activiti:formProperty value not getting set

Question asked by darshan.hardas on Jul 2, 2014
Latest reply on Jul 9, 2014 by martin.grofcik
We are having a BPMN XML file to where we need to share the properties from startEvent in one of exclusive gateway of a user task. We tried setting the default, value and also the variable. But still it is not working and always the value is empty.




<?xml version="1.0" encoding="UTF-8" ?>
<definitions id="definitions"
  targetNamespace="http://activiti.org/bpmn20"
  xmlns:activiti="http://activiti.org/bpmn"
  xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
  xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
  xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"
  xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <process id="IndividualAppealNM" name="Individual Appeal for New Mexico state exchange">    
 
     <startEvent id="request" activiti:initiator="requesterName">
       <extensionElements>
           <activiti:formProperty id="groupName" name="Group Name" type="string"/>
           <activiti:formProperty id="requesterName" name="Requester Name" type="string"/> 
           <activiti:formProperty id="leaveReason" name="leave Reason" type="string" value="SomeValue"/>
       </extensionElements>
    </startEvent>
    <sequenceFlow id="flow1" sourceRef="request" targetRef="checkleaveReason" />

   <exclusiveGateway id="checkleaveReason" name="check leave Reason?" />
   <sequenceFlow id="flow201" sourceRef="checkleaveReason" targetRef="reviewLeaveForm">
      <conditionExpression xsi:type="tFormalExpression">${leaveReason!= 'test'}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow202" sourceRef="checkleaveReason" targetRef="theEndAll">
      <conditionExpression xsi:type="tFormalExpression">${leaveReason== 'test'}</conditionExpression>
    </sequenceFlow>
   
    <userTask id="reviewLeaveForm" name="Review leaveForms" >
      <documentation>
           Review the leave.
      </documentation>
         <extensionElements>
  
           <activiti:formProperty id="leaveReason" name="Motivation" type="string" >${leaveReason}</activiti:formProperty>
           
      </extensionElements>
         <potentialOwner>
           <resourceAssignmentExpression>
              <formalExpression>${groupName}</formalExpression>
           </resourceAssignmentExpression>
         </potentialOwner>        
    </userTask> 
    <sequenceFlow id="flow3" sourceRef="reviewLeaveForm" targetRef="proceedWithLeaveReason" />
   
   
    <exclusiveGateway id="proceedWithLeaveReason" name="Validate the leave to proceed" />
   
    <sequenceFlow id="flow1702" sourceRef="proceedWithLeaveReason" targetRef="theEndAll">
      <conditionExpression xsi:type="tFormalExpression">${leaveReason == 'Medical'}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow1703" sourceRef="proceedWithLeaveReason" targetRef="theEndAll">
      <conditionExpression xsi:type="tFormalExpression">${leaveReason== 'Casual'}</conditionExpression>
    </sequenceFlow>

<endEvent id="theEndAll" />
  
  </process>
 
</definitions>



The xml is pretty much similiar to the above code.
Please guide us.

Thanks in advance.

Outcomes