2 Replies Latest reply on Feb 19, 2009 10:35 AM by kukeltje

    update process definition instead of creating new version

      hi,

      i want to update an already deployed process definition with minor changes (add new transition, change duedate of timers) without creating a new version of the process definition.

      what is the easiest way of updating a process definition?

      do i have to create a new version and then "move" all running process instance to the new process definition? if so, how do i move them?

      or can i just update/overwrite the existing process definition?

      any help would be great.

      bye, oliver

        • 1. Re: update process definition instead of creating new versio
          zoegraddy

          I also have the need to distinguish between deploying a new version of a process definition and updating an existing one.

          We are currently moving our workflow logic out of our session beans and into process definitions. I'm certain that our process definition will at first contain bugs that we'll want to quickly fix and have all currently 'in flight' process instances use the patched definition.

          Also, I know my client and the one thing we can count on is changes to the workflow - sometimes it will make sense to only have new processes get the updated definition, but other times they will want existing instances to use the 'updated' process definition.

          I've read that the preferred option is to 'migrate process instances' to the new definition, but cannot find any details about how to go about doing that. Are we supposed to modify the jbpm database's tables directly?

          I appreciate any light that someone can shed on this subject.

          Zoë

          • 2. Re: update process definition instead of creating new versio
            kukeltje

             

            "zoegraddy" wrote:
            I've read that the preferred option is to 'migrate process instances' to the new definition, but cannot find any details about how to go about doing that. Are we supposed to modify the jbpm database's tables directly?


            For jBPM 3? Yes, since you can only be the one that knows for sure what changed and what not etc...

            But...Bernd Rücker from Camunda has written a nice article on versioning in a broader scope. See

            http://www.bpm-guide.de/2008/10/16/jbpm-deployer-for-jbpm-in-enterprise-environments/

            In which he states:


            Note that if you have a patch in the process definition, running process instances keep running in their versions! If you want to migrate them to the new version this can be done by writing some "migration script", which can be implemented by a jBPM Command (see Command ApiDoc), a good starting point is the <a href="http://docs.jboss.org/jbpm/v3/javadoc/org/jbpm/command/ChangeProcessInstanceVersionCommand.html">ChangeProcessInstanceVersionCommand</a>. This can be (more or less) easily extended to maybe take Groovy scripts for process migration or anything else that make sense in your environment.


            Hope this helps (little at least)