5 Replies Latest reply on Aug 29, 2007 7:36 PM by Ronald van Kuijk

    Modifying a process already in progress

    Larry felser Newbie

      This isn't a normal thing to do I realize, but I want to be able to modify the unreached parts of a process which is already part-way done.

      This process includes tasknodes that have been reached, with some tasks created and ended and some created but not ended and some of course not yet created because the task node has not been reached.

      My thought is to copy the running process instance's process definition and dummy up the nodes to look like they've reached the state of the process instance I want to modify. The tasks present a bit of a problem and I was thinking that I could just unhook the module instance that is the taskmanagementinstance from the old process and hook it to the new processinstance modeule instances. Does this sound like a bad idea?

      Is there a better way in general to modify a running process?

      Thanks!

        • 1. Re: Modifying a process already in progress
          Ronald van Kuijk Master

          jbpm CVS head makes it possible to deside runtime which subprocess to take (the name can be an EL). You can then e.g. use a processvariable to decide which subprocess to use. This is a kind of flexibility that in many cases is sufficient to have a dynamic process without modifying the process.

          Can you see it this would work for you?

          • 2. Re: Modifying a process already in progress
            Larry felser Newbie

            I saw the subprocess capability, but have not looked into it in depth yet. I'll check it out to see if it applies. Of course, I'm looking to avoid a big code rewrite if I can.

            Here's a scenario to consdier:

            A (part of a) process has the following steps. The first step has to be completed (i.e. its task completed) before moving to the next step.

            1) person A does task AA
            2) persons B, C and D do tasks BB, CC and DD in parallel
            3) person E does task EE

            In the graph this looks like (very roughly) task node AA to fork node to task nodes BB, CC, DD to join node to task node EE. The process is started and gets to step 1. Now the process author decides he needs to add person Z to do task ZZ in parallel with persons B, C and D in step 2. He wants to just add this in to the running process. This is what I'm trying to solve.

            LF

            • 3. Re: Modifying a process already in progress
              Bryon Phinney Newbie

              Is this a one-off situation where you just need to fix this particular process instance or are you looking for a more complete solution moving forward e.g. having a dynamic multiple choice after AA task is complete so that XX and YY could also be options but not known up front?

              • 4. Re: Modifying a process already in progress
                Larry felser Newbie

                Definitely looking to solve the general case.

                In the typical case, the process is not changed once started, but occasionally either the task assignment has to change (prior to the task being assigned) or a new user and new task assigned. Sometimes the task is removed, but that's a relatively easy case that I've got working now.

                Some notes:

                1) assignments can't be taken from a pool for the tasks. They are very specific and are set up when the process is created (using custom assignment handlers that get the assignment name from the data given in the process definition's XML).

                2) each process definition is unique because of the above.

                3) we have custom web-based process authoring that allows the process author to assign variable numbers of parallel tasks. The forks and joins are added by my code in this case. While the processes always have the same general sequence, entire sets of nodes may not be created if the process author has decided that those steps are not necessary for a particular case. Being red-blooded human users though, they sometimes change their minds.

                LF

                • 5. Re: Modifying a process already in progress
                  Ronald van Kuijk Master

                  create a custom fork (see the wiki and/or search this forum) that way you can use processvariables to feed the fork and behave differently