Assign a Task

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Process wizard > Business Rules > Business rules examples >

Assign a Task

Overview

Sometimes, business requirements demand that the same user is assigned to several tasks, which occur in parallel in a process. For this specific business requirement, Bizagi offers two functions which will return the assigned user's ID, which matches the given criteria. Keep in mind that these functions do not directly assign the task, this would have to be done manually by relying on the use of these functions, as described below.

 

To get the next assigned user by load, use the following method:

 

CHelper.LoadAssig(AssigneeList, Me)

 

The following attributes are needed:

AssigneeList: List of users to select the assignee.

Me: this parameter is fixed.

 

To get the next assigned user by sequence, use the following method:

 

CHelper.SecuentialAssig(AssigneeList, Me)

 

The following attributes are needed:

AssigneeList: List of users to select the assignee.

Me: this parameter is fixed.

 

Example

Suppose that for our organization's Travel Request process we need the same Administrative Assistant that registers the bookings to manage the travel advance. This is because that person will know which are the traveler's hotel privileges, it's location, and meals included to calculate the best amount for the advance.

 

assignTask01

 

To select a user by load, use the following expression:

 

assignTask03

 

The expression shown above is as follows:

var userList = CHelper.getUsersForRole("AdministrativeAssistant");
var idAssignedUser = CHelper.LoadAssig(userList, Me);
<TravelRequest.idAdministrationAssistant> = idAssignedUser;

 

Otherwise, if you wish you select the user using a sequence, use the following expression:

 

assignTask02

 

The expression shown above is as follows:

var userList = CHelper.getUsersForRole("AdministrativeAssistant");
var idAssignedUser = CHelper.SecuentialAssig(userList, Me);
<TravelRequest.idAdministrationAssistant> = idAssignedUser;

 

Finally, when configuring performers make sure that the selected user is assigned the activities by using this setup:

 

assignTask04