Route choice tasks to users

Last published at: April 26th, 2021

Description:

Routes a task to a selected number of users, where the user must make a choice from a list of user defined choices. 

Inputs

  • description – Step description
  • routeTo -Select users to route to     
  • routeToRoles--Select roles to route to        
  • taskDesc--Task Description   
  • taskBody -Task detail description    
  • routedItem--Item that is routed      
  • showURL-- URL to render within the task    
  • emailAddresses--Email addresses to route task to  
  • returnVals—Set return values 
  • priority--Task Priority (low, medium, high, normal, urgent)        
  • daysToComplete--# of days, minutes, hours, months to complete the task by
  • expireType--Task expire type (days, months, hours, minutes)     
  • includeWeekends—On = Include weekends (toggle ON/OFF)
  • taskRoutingRules- Task routing rules types (default, 
  • taskReminder- Set Task reminder to send reminder mails
  • sendEmailNotification— Yes = email notification will be sent to each user for the task (toggle ON/OFF)
  • sendSeparateEmails - Send separate emails. Select Yes/No       
  • emailSubject-- Subject of the email message
  • emailBody-- Body of the email message
  • emailFiles - Set the server path for file attachments
  • emailCCList - Email cc List
  • userCanReAssign – Yes = user can re-assign task to another active users (toggle YES/NO)

Returns

  • returns are dynamically generated based on the provided values for the “returnVals” input
  • timeout – when the task times out

Step Returns Collection

  • stepReturn.routeTo - list of users (GUID), the task is routed to
  • stepReturn.completedByUser – user (GUID), the task completed by
  • stepReturn.rejectedUserList - list of users (GUID), the task is rejected by

Usage:

Example:

Let’s build and execute the choicetaskDef example. 

  • Create a new definition called “choicetaskDef”
  • Select the definition and click the “design” button
  • Drag a choicetask step to the canvas
  • Connect the dots between the start and choicetask step
  • Click on the “choicetask” step to configure its properties
  • Configure the following values for the properties as shown on the below graphic

  • Click on Select the users to route to and select users or enter variable of userid 

  • Click on select roles to route to and select application role

  • 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. Task reminders configured with a negative value is calculated by reducing that duration from the task due date. The task reminder message body supports line breaks.

  • Use Variable(s) references for more meaningful reminder message.
  • 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 return values to configure return values to the task. 

  • Save the process definition, create a process instance and execute. Check the step properties by rendering the workflow instance. Step should route choice task to users.
  • NOTE: The process definition flags the Choice Step which have return values configured but not used in the process workflow. In the following process definition example, the Choice Step is configured with 3 choices and only 2 are configured in the process workflow. By using Action - Validate feature, the application displays an alert notification for correction.

  • 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.