Route task for user selection

Use this step to create and configure an user selection step

Last published at: July 26th, 2023

userSelectionTask Step

Description:

In the "User Selection Task" step, select users and application roles (users) and route tasks accordingly during run time. 

Inputs

  • routeTo – list of users to route the task
  • routeToRoles – select roles to route to
  • configureUsers--configure user list
  • taskDesc – description for the task
  • priority – priority of the task
  • daysToComplete - # of days, minutes, hours, and months to complete the task by
  • expireType – task expire type
  • includeWeekends – include Weekends
  • useFullDuration -  the task uses the full duration and continues
  • taskRoutingRules- task routing rules types
  • taskReminder- set task reminder to send reminder mails
  • waitForAll – Yes = all users must act on the task, No = requires only 1 user to act on the task
  • storeRouteToUsers – variable to store what users the task was routed to
  • sendEmailNotifications – Yes = email notification will be sent to each user for the task
  • sendSeparateEmails - Yes, to send separate emails for multiple users
  • fromEmail – from email address
  • emailSubject – the subject of the email message
  • emailBody – the body of the email message
  • emailFiles – email file attachments
  • emailCCList - list of email addresses (separate by semicolon) 
  • sendExpireEmail - send expired email notification
  • sendAckLink - send acknowledgment link
  • approveButtonLabel--label for approval button
  • rejectButtonLabel--a label for the reject button
  • hideRejectButton--hide reject button
  • userCanReAssign – Yes = user can re-assign the task to other active users 
  • commentRequired - User comments are required mandatory
 

 

Returns

  • completed – task was approved and completed
  • rejected – task was rejected
  • timeout – task timed out 
 

 

Usage: 

 

Example:

Let’s build and execute the userSelectionTaskDef example.          

  • Create a new definition called “userSelectionTaskDef.” 
  • Select the definition and click the “design” button
  • Drag a “userSelectionTask” step and a regular task step to the canvas
  • Connect the steps as shown in the above graphic
  • Define a variable/global to store the routed user list after execution
  • Click the “userSelectionTask” step to configure its “Settings” properties. Provide the name of the step. Provide the task description. Note: As per the legend, the task step has one incoming and 0 outgoing connections. 

 

  • Click on the globe icon to globalize the task step using the following UI. Select the language from the dropdown list. Click the “Translate” button to convert the description to the chosen language. Click on “Save” to confirm changes. 

 

  • Click on the “userSelectionTask” step to configure its “Advanced” properties. Click on the button to configure the users to route to. Click on the button to configure the application role (users) to route to. Click on the button to configure the user selection. Provide task detail description. Continue configuring the “task” step's “Advanced” properties, as shown below. Select task priority from the list (low, medium, high, normal, urgent). Select the task expiration type (days, hours, months, minutes). Provide the task completion duration value. Select include weekends option as Yes, if desired.  

 

  • Select Yes for the task to wait for the full duration even after completion. 

 

  • Task locks - select task routing rules (default, task lock, most miniature # of tasks in total, most minor # of tasks in duration). “Default” means the task has no lock status during run time. “Task lock” means the task is locked by one of the users during runtime. A task is assigned to one of the users having the most miniature # of tasks by count during runtime. The task is assigned to one of the users having the most miniature # of tasks by time duration during run time. Configure task reminders. Configure if the task needs to wait till all users have responded (when routed to more than one user). Provide a variable or global reference to hold the routed users list on task completion. The variable may be created before or later when the process definition is saved. Select YES to send an email notification (the Status determines the notification duration - Status - Settings - Email - Notifications section). Select Yes if separate emails are to be sent to users (which include different task IDs in the URL). Provide the FROM email address (other than default). Provide the email subject text.  Click on the button to configure email attachments on the app server.     

 

  • Continue configuring the “task” step's “Advanced” properties, as shown below.  Click on the button to provide the email content (body). Click the button to configure the email file attachments (from the app server path). Provide Email CC list (semi-colon separated). Select YES to send expired notifications (the Status determines the notification duration - Status - Settings - Email - Expired Task Notifications section). Select YES to email an acknowledgment link. Provide new text to change the Approve and Reject button labels (e.g., OK and Not OK). Select YES to hide the Reject button. Select YES to re-assign the task during run time. Select YES for mandatory task comments.  

 

  • Click on the button to configure the user selection. Click on the Add Row button to add new rows. Select USERS from the radio button. Provide the task label text. Provide the variable/global to store a list of user IDs after execution. 

 

  • Click on the button to configure the user selection. Click on the Add Row button to add new rows. Select ROLES from the radio button. Provide the task label text. Provide the variable/global to store the list of application role user IDs after execution.  

 

  • Click on Task Reminder to set task reminder intervals. Enable "Send Email Notification" to ON. Task reminders configured with a positive value are calculated from the task created date. Task reminders configured with a negative value are calculated by reducing that duration from the task due date. The task reminder message body supports line breaks.

 

  • Click on the Email body and use the existing template (you can edit the existing template as well) as the email body or create a custom template as the email body. Provide the message text in the body of the email. Click on the “Replace Links” button to select information links from the list to be included in the message. Click on the “Variables” or “Globals” button to select variables and globals to be included in the message. 

 

  • Click the “Task 1” step to configure its properties to route to users. Variable. 

 

  • Search for users (by the first three chars) and select from the list on the left pane using the arrow buttons. The task can be assigned to more than one user or to a user GUID (provided we know the value beforehand). Configure and give the variable containing the reference to the user's GUID. The username selection should be empty as the function is mutually exclusive, as shown in the image below. 

 

  • Click the “Task 2” step to configure its properties to route to roles. 

 

  • Variable. Roles store all user names (comma separated) on the selection configured for that application role and are mapped to the input field, as shown below.  

 

  • Save the process definition, create a new instance, and execute. Render the process instance. Click on the process step to view the properties.  The user selection step routes the task to the user to make an appropriate user and role selection, as shown below. Navigate to the Engage - Tasks page to view the Tasks routed to the resource. 

 

  • On user selection task completion, the process step routes "Task 1" and "Task 2" to appropriate users and app roles (users). This is visible when the process instance is rendered; click on the Items—Tasks menu option. 

 

  • The “Logging” setting configuration is necessary for documentation and also measures the workflow progress and the percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties. The "Send Test Mail" feature is provided to send a test email with the contents configured in the email body to the current (logged-in) user.