1 Reply Latest reply on Apr 23, 2011 7:10 AM by Giovanni Marigi

    jbpm3 update variables in contextinstance

    Giovanni Marigi Newbie

      Hi,

      in a jbpm 3 process inside a Node implemented with a custom action handler, I update the value of a variable inside the ContextInstance. When the process leaves this node and enters in the following node (a decision hanlder) I don't have the updated value for this variable but the original value (that I set at the beginning in the start node). Must I save the process instance opening a JbpmContext and calling the save method after updating the variables?

      My process is configured to be persisted so I believed that was not necessary.

       

      Thanks,

      Giovanni

        • 1. jbpm3 update variables in contextinstance
          Giovanni Marigi Newbie

          just an update: if I change the value of a String variable in the custom node action handler, this is updated by the process and I see the new value in the decision handler node.

          This not happens if i change a variable that contains an Object.

          In debug just before leaving the action handler if I watch inside context.getVariables() I have the value changed for my object, but when I enter inside the new node I have inside context.getVariables() the old valuefor my object.

          I even tried to remove the object variable and the adding again but it's same.

           

          Thanks,

          Giovanni