1 Reply Latest reply on Nov 9, 2005 9:48 AM by Ronald van Kuijk

    taskInstance Variables clone of process variables

    Ronald van Kuijk Master

      I've noticed that since 3.1a1, the taskInstance variables are a copy of the value they had on the process level when the task was created. Now what if:
      - parallel tasks are created and have to work on the same variables? Disallow/approve this?
      - is it possible to lock variables on the process level?
      - should we allow changing them and have some kind of "hey they changed on the process level between creating the task and finishing it, wanna see the most recent values?"

      Sorry to ask these things in a 'barbapappa' way (this is not sesamestreet level yet :-) ) but they are fundamental (imo) when designing workflows and is a major change (not a bad one)

        • 1. Re: taskInstance Variables clone of process variables
          Ronald van Kuijk Master

          btw, I've been looking in the JBPM_VARIABLEINSTANCE table and see that there is indeed made a copy. After the task is completed, you cannot immediately see what the values were that passed to the task. There are variables with a taskinstance 'null' which seem to be the process level variables. So I thought I'd go back in the logs and see what the value was. When it however is updated on the process level (either by a task or by some othe event) the record of that variable is updated. Am I right to assume it is not meant for tracing, just to display the current state and the values when ending a task?

          It seem I have to use the log to see what variable changed from what to what and then use the VARIABLEINSTANCE_ column from the JBPM_LOG to see what task it belonged to by using this value to look up the TASKINSTANCE_ in the JBPM_VARIABLEINSTANCE table. and only if the old and new values in the JBPM_LOG are not the same, this taskinstance changed it... right? Isn't it an idea to not log those events on variables that do not change them. (is it an event at all ;-) )