AnsweredAssumed Answered

changing sequenceflow at execution time

Question asked by heymjo on Mar 29, 2012
Latest reply on Mar 31, 2015 by koteswarrao

Is there a way to change a sequenceflow definition in a running process instance ? Here's why i think i need this: one of our processes contains a chain of user tasks (a 'validation chain') whereby a document is passed from one user to the other for validation / rejection. The initial order of the user tasks is known when the chain starts so we can easily model this. However, specific users in the chain are allowed to introduce new users at runtime, or remove users in the chain after them, or just completely reorder the chain if they think it is appropriate.

So for example we have this initial user task chain:


The process instance gets to C which decides that D should no longer participate, and before E we should have new user tasks X and Y


I would not want to model these as adhoc tasks because they have no real relation to the existing process flow and i would need to keep track of the sequence flow between them myself.

So i looked at BpmnParse and i can see that PvmTransition objects are created inside of ActivityImpl, but all that is heavily 'IMPL' so i'm not sure how safe it is to start messing with this myself. Also i did not see a way to remove existing links, maybe this is done elsewhere..

Do i have any other options to implement this ?