Hi, I am new to Activiti and i am trying to pass a Java bean object variable using setVariable() method. When I try to call a getter method in bpmn expression it doesn't display the value in Activiti UI but i am able to retrieve the same variable using the getVariable() method. Can you please tell me what I am doing wrong?Here is the BPMN task where I specify the variable:
<startEvent id="startevent1" name="Start" activiti:initiator="employeeName">
<extensionElements>
<activiti:formProperty id="roleName" name="Role" type="string" required="true"></activiti:formProperty>
<activiti:formProperty id="manager" name="Manager" type="string" required="true"></activiti:formProperty>
<activiti:formProperty id="roleInfo" name="Role Info" variable="roleInfo"></activiti:formProperty>
</extensionElements>
</startEvent>
Variable call in Workflow:
<activiti:formProperty id="roleType" name="Role Type" type="string" expression="${roleInfo.getIdentifier()}" variable="${roleInfo}" writable="false"></activiti:formProperty>
I pass this variable using the following code:
EntityInfo entityInfo = new EntityInfo();
entityInfo.setIdentifier("TDM_Role");
entityInfo.setOid("Role-oid");
entityInfo.setRequestable(true);
runtimeService.setVariable(processInstance.getId(), "roleInfo", entityInfo);
<b>Note:</b> I am using StandaloneProcessEngineConfiguration.