Parallel WorklistItem GotoActivity Issue

  • 6 February 2009
  • 2 replies
  • 1 view

Badge +5

I'm getting a worklistitem object and performing a GotoActivity on the WorklistItem this works, however if you have parallel worklistitems in the process (i.e at another step) these parallel worklistitems are removed, is this an issue or working as designed? What are the options for leaving the parallel worklistitem untouched and just redirecting the one I have a reference to?


Thanks


Dean


2 replies

Badge +11

That is by design.


When you say 'worklistitem' I assume you mean 'Activity'.  You could expire the current activity through the API or using escalations.


Be careful using GotoActivity.  While it does have valid uses, you could also end up creating workflow spaghetti code that no one else will be able to follow.


 

Badge +5

I have a Process Instance that has 2 workiteminstances running in parallel 1 at Activity A and 1 at Activity B. The problem is if I redirect the workiteminstance at Activity A to Activity C, the workiteminstance at Activity B is expired leaving only 1 workiteminstance. What I need is Activity A to be redirected to one activity and maybe Activity B to be redirected to different Activity.


The help for "GoToActivity" says;


"The GoToActivity method is called to force the associated instance of the WorklistItem to go to a specific activity within the process." - This seems to imply you can redirect these separetly.

Reply