Skip to main content

Is there a way (possibly with K2Mng) to instantiate an activity in a workflow without expiring currently active activities?


I have a complex workflow with a 'Reviews' section that has 7 parallel activities in in 3 different groups: Design Reviews, Regulatory Reviews, and Other Reviews. The design group has a following activity that is dependent on both the design and regulatory review groups being completed before it can start, and after it is done it goes to a collection point that waits for all of the 7 parallel activities to be completed (many of which are optional).


Anyway, the reg reviews and other reviews groups have a following server activity that sets a datafield to true, which is used to determine the next action to take. Every now and then there seems to be some kind of glitch that prevents the Process Instance xml to be updated from the activity instance xml, so we designed the workflow to have an 'Edit' activity that starts immediately upon process instance creation and is in parallel with the entire workflow. This activity is used for maintenance (in the above instance, I can modify the xml values with this activity, complete it, and it updates the process instance XML (and in doing so it restarts itself so that it can be used again if needed.).


So ... when one of these 'glitches' occurs, the process instance would have been abnormally completed (as far as K2 was concerned) had this Edit activity not been active. After updating the xml (and if necessary, modifying the value of the datafield using K2Mng) I can execute a gotoactivity to the proper point and get the workflow moving again. BUT ... the Edit activity is expired, and if there are further problems with that process instance, it will complete prematurely with no chance of reviving it.


Is there any chance that I can do a 'goto' to multiple activities? Is it possible to cause an activity to instantiate without expiring the existing active activity? I'd like to keep the Edit activity active until the actual completion activity (which executes a goto to a 'finish' server activity to expire the Edit step).

When you say proper point is it always a few spots?   You can have a line from those proper points to the Edit activity.  Is the glitch caused by first update wins from the parallel activities?  

No to these:

Is there any chance that I can do a 'goto' to multiple activities? Is
it possible to cause an activity to instantiate without expiring the
existing active activity?


Peter, I wish I knew what caused the 'glitch', as it seems to be totally random. In 20 months of production, with 7000+ process instances, it has happend about a dozen or so times on various activities.


With over 4000 active process instances, I need a way to fix those that are already active, so I don't want to get into modifying the workflow and having to export a new version. What I need specifically is a way to start any activity instance in an active process without expiring the Edit activity.


Currently my 'fix' is to correct the data, use K2Mng to set the datafield, and use GoToActivity to the correct one, then hope that this instance doesn't have any more problems. If it does, the originator will have to start a new one to replace it.


Reply