Share ideas, ask questions, and get feedback about developing for ProcessMaker

Moderators: ArturoRobles, ArturoRobles

Forum rules: Please post new questions under "Developing processes & programming" for ProcessMaker 2 or 3.
#786667
Hello torajasekarm,

There are different ways to assign cases to different users you could use the typical Cyclinical assignment that do a round robin base assignment to a pool of users and etc but if you want to assign a task using a trigger then change the Assignment rule to "Value based assignment" and let the default
Variable for Value Based Assignment: @@SYS_NEXT_USER_TO_BE_ASSIGNED then click save.

Create a trigger then use the following code and implement it after dynaform
Code: Select all
//assign the username to be query 
$username   = 'admin'; //change this one
$query_user = executeQuery("SELECT FROM USERS where USR_USERNAME='$username'");
$user_uid    = $query_user[1]['USR_UID'];
@@SYS_NEXT_USER_TO_BE_ASSIGNED = $user_uid; //this will give the @@SYS_NEXT_USER_TO_BE_ASSIGNED the uid of the user admin
#789643
Hello Salman,

Yes, it will work for the subprocess as well.
In your master process, you need to create the trigger as given by Michael.
In properties of subprocess, assign @@SYS_NEXT_USER_TO_BE_ASSIGNED as Origin in Variables Out.
Take a variable in your subprocess say, @@NEXT, to be assigned as Target in Variables Out.
Now, in the assignment rule of the first task of the subprocess, select Value Based Assignment and assign the value equal to @@NEXT.

Hope this helps

Best Regards
Mishika
#790417
Thanks Mishika.
mishika wrote:Hello Salman,

Yes, it will work for the subprocess as well.
In your master process, you need to create the trigger as given by Michael.
In properties of subprocess, assign @@SYS_NEXT_USER_TO_BE_ASSIGNED as Origin in Variables Out.
Take a variable in your subprocess say, @@NEXT, to be assigned as Target in Variables Out.
Now, in the assignment rule of the first task of the subprocess, select Value Based Assignment and assign the value equal to @@NEXT.

Hope this helps

Best Regards
Mishika
REST API Question

I am currently looking at developing a portlet for[…]

Everybody wants to be famous, but nobody wants to […]

Hi, I attached a sample config file, Please check […]

Error clicking on Participated

Hi, I attached a sample config file, Please check […]