yuuvis® RAD Q&A

0 votes
by (2.7k points)

Is it possible to change the participants of a task while a process is running?

1 Answer

+1 vote
by (2.7k points)

Participants are a property of the activities rather than the whole process. You can change them script based. Here are some additional remarks about that:

a. I use the beforestartactivity-event for that purpose

b. Here is some documentation about how to manipulate the performer (what’s what is called participants in the designer UI) list https://help.optimal-systems.com/yuuvis_develop/display/onpremise/BPM Server-Side Scripting#BPMServer-SideScripting-WorkItems
basically you can access the performer list of the current activity/workitem (you can look both words as synonymously at this point) via $.activity('this').performers. When adding Items to this list be aware that you need instances of OrgObject to insert them. The documentation shows you how.

c. When you are controlling the participants/performers of a activity exclusively via script you should set the “Participation type” in the activities model definition to “Script controlled”. This way the model is still considered valid without defined participants and you can omit the flushing of the participant list. Of curse you can still mix the direct participants with scripting to “conditionally overwrite a default” or whatever logic you need in your scenario.

...