2 Replies Latest reply on Feb 11, 2010 3:49 AM by Walter Seymore

    jBPM 4.3 - Process Instance Description

    Walter Seymore Newbie

      I'm trying to set a description on an execution so that I can distinguish between different instances of the same process. Instead of seeing 10 "Review" tasks for process "Holiday Approval" for instance, the reviewers need to see

       

      Review | Holiday Request [01/01/2010 - Bob]

      Review | Holiday Request [01/01/2010 - Dan]

      Review | Holiday Request [01/01/2010 - Joy]

       

      The name property on ExecutionImpl sounds like the right place to put this, the only thing is that name property does not exist on the history table for the exection, so this information is lost as soon as the execution is complete. The reason I need this is to be able to see past executions in the same "process report" table as current executions.

       

      This must be a common requirement, so please let me know if I'm on the right track (with the name property) and if anybody has a solution for the "history instance descriptions".

       

      Thanks

      Walter

        • 1. Re: jBPM 4.3 - Process Instance Description
          Ronald van Kuijk Master

          For really common usecases, lots of things are already in place, just like with this. When starting process instances, provide a processInstanceKey. That field is ment for things like this. Keep in mind though that it needs to be unique. So e.g. combining process name and a key or a date always works. Personally I would have liked the requirement that it should be unique not to be there but it is....

           

          Ronald

          1 of 1 people found this helpful
          • 2. Re: jBPM 4.3 - Process Instance Description
            Walter Seymore Newbie

            Thanks Ronald,

             

            I've already used the processInstanceKey for this, but as you stated, the value has to be unique and this just did not make sense to me, especially since this value is duplicated in the ID_ field. Another unfortunate consequence of using this field is that it cannot (should not) be changed during the life if the process. This might be necessary when the description should be augmented with new data from one of the tasks. The KEY_ field is never updated in the history table after it is created originally (as you'd expect).

             

            We always have an external record that is associated with the process. We store this record's unique id in the processInstanceKey field and so we can use a secondary lookup to get the "instance description". Does this sound like a reasonable solution or is there a simpler way of doing this? (We could always use a variable in the process, but this variable will have to be copied to the history tables which is not happening at the moment).

             

            Thanks

            Walter