Can actor of some pool be automatically assigned to another?

1
0
-1

Hello,

Is it possible to assign actor from one pool to another?

I have process with Pool "Trip" and with Initiator (Employee) that is set to be whoever starts the process. In some point he needs to check some options that assistant sent him. Since this checking is a little complicated I made it as call activity. This activity calls Pool "Checking". Is it possible to somehow make Actor of "Trip" automatically actor of "Checking"? In that case Checking could be done by the user who started the process (Trip), not by whoever that can start the process or just by some person defined before anything.

I hope you understand what I am asking :)

Comments

Submitted by yannick.lombardi on Wed, 02/18/2015 - 13:54

Hi. Yes it is possible. For both of your process, you need to have the same Actor "Employee". Also, you need a variable of type Long that will be the userId. In the first process "Trip", you need to add a script before the Call Activity. In this script you need to initialize the variable userId. You can use something like this :

apiAccessor.getProcessAPI().getProcessInstance(processInstanceId).getStartedBy();

In the Call Activity task, you need to map both userId. Then it will have the same value in both process. And to finish, you can add an Actor Filter on the lane "Checking" where you choose a "Single User" filter and you set the value with your userId.

Submitted by marcy.ira on Wed, 02/18/2015 - 14:09

It works! Thank you!

No answers yet.
Notifications