AnsweredAssumed Answered

Java Bean Variable not visible to bpmn expressions

Question asked by arihant.banthia on Apr 3, 2015
Latest reply on Apr 15, 2015 by arihant.banthia
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">
        <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>

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();
      runtimeService.setVariable(processInstance.getId(), "roleInfo", entityInfo);

<b>Note:</b> I am using StandaloneProcessEngineConfiguration.