Route tasks to users

Use this step to configure and route the task to users.

Last published at: July 27th, 2023

task Step

Description:

This step routes a task to a selected number of users. 

Inputs

  • routeTo – Select users to route to 
  • routeToRoles – Select roles to route to 
  • taskDesc – Description for the task
  • taskBody – Body of the task / task description
  • routedItem – Item that is routed
  • showURL – URL to render within the task
  • emailAddressses- Email addresses to route task to
  • priority – Priority of the task
  • daysToComplete - # of days, minutes, hours, months to complete the task by
  • expiryType – Task expire type
  • includeWeekends – Include Weekends
  • taskRoutingRules- Task routing rules types
  • taskReminder- Set task reminder to send reminder emails
  • 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
  • fromEmail – From email address
  • emailSubject – Subject of the email message
  • emailBody – Body of the email message
  • emailFiles – Email file attachments 
  • sendExpireEmail - Send expired email notification
  • sendAckLink - Send acknowledgement link
  • approveButtonLabel--Label for approval button
  • rejectButtonLabel--Label for reject button
  • hideRejectButton--Hide reject button
  • userCanReAssign – Yes/No. User can re-assign task to another active users during run time.  
 

Returns

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

Step Returns Collection

When the task is completed or rejected (run time) the following step properties contain return values. 

  • stepReturn.routeTo – Includes the user's GUID reference 
  • stepReturn.completedByUsers – Includes the user's GUID reference
  • stepReturn.rejectedUserList - Includes the user's GUID reference
 

 

Usage:

Example:

Let’s build and execute the taskDef example.          

  • Create a new definition called “taskDef
  • Select the definition and click the “design” button
  • Drag the above controls from the toolbox and connect as shown above
  • Click on the “task” step to configure its “Settings” properties as shown on the below graphic. Provide a name to the step. Provide a task description. Note: The task step has 1 incoming and 0 outgoing connections as per the legend. 
  • Click on the globe icon to globalize the task step using the following UI. Select the language from the dropdown list. Click on “Translate” button to convert the description to the chosen language. Click on “Save” to confirm changes. 
  • Click on the “task” step to configure its “Advanced” properties as shown on the below graphic. Select users to route to. Select application role (users) to route to. Provide task detail description. Provide information on item that is routed. Provide URL link to render (external links require internet access). Provide external email address list (semi-colon separated). 
  • Click on the “task” step to configure its “Advanced” properties as shown on the below graphic. Select task priority from the list (low, medium, high, normal, urgent). Select task expire type (days, hours, months, minutes). Provide the task completion duration value. Select include weekends if desired.  
  • Task locks - select task routing rules (default, task lock, least # of tasks in total, least # of tasks in duration). “Default” means the task has not lock status during run time. “Task lock” means the task is locked by one of the users during runtime. Task is assigned to one of the users having least # of tasks by count during runtime. Task is assigned to one of the users having least # 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 prior to use or later when the process definition is saved. Confirm if email notification is required. (the notification duration is determinded by Status - Status - Settings - Email - Notifications section). Configure if separate emails are to be sent to users (includes different task IDs in the URL). Configure FROM email address to be sent from (other than default). Configure email subject text.     
  • Click on the “task” step to configure its properties as shown on the below graphic. Provide the email content (body). Configure the email file attachments (from app server path). Provide Email CC list (semi colon separated). Confirm if expired notifications are required (the notification duration is determinded by Status - Status - Settings - Email - Expired Task Notifications section). Confirm if acknowledgement link is required. Provide a text to change the Approve and Reject button labels (e.g. Yes and No). Configure if user can re-assign the form during run time.  
  • Search for users (by first 3 chars) and select from the list on the left pane using the arrow buttons. The task can be assigned to more than one user. 
  • The Task can also be assigned to an user GUID (provided we know the value beforehand). Configure and provide 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. 
  • The Task can also be assigned to the users grouped by an application role.Select from the list on the left pane using the arrow buttons.
  • Click on Task reminder to set task reminder intervals. Enable "Send Email Notification" to ON.Task reminders configured with a positive value is calculated from the task created date. The task reminder message body now supports line breaks. 
  • Task reminders configured with a negative value is calculated by reducing that duration from the task due date. 
  • Use Variable(s) references for more meaningful reminder message as shown in the image below.
  • Use Variable(s) references for more meaningful reminder message as shown in the image below.
  • Click on Email body and use the existing template (you can edit existing template as well) as email body or create custom template as email body.
  • Click on Replace Link(s) or Variable(s) or Global(s) and select any reference to add more meaningful email message. 
  • Click on Replace Link(s) or Variable(s) or Global(s) and select any reference to add more meaningful email message. 
  • Save the process definition, create a process instance and execute. The Task step should route task to users.
  • Navigate to Engage - Tasks page to view the Tasks routed to the resource. 
  • NOTE: Route Task/Form to Queue, when assigned to user from the queue, the system recomputes the task expiration date.
  • Navigate to Logging settings. 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. 

 

Learn how to use Replace Links in task email body