ChoiceTask Step

Use this step to route Choice Task to users.

Last published at: July 27th, 2024

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 -A task detail description    
  • routedItem--Item that is routed      
  • showURL-- URL to render within the task    
  • emailAddresses--Email addresses to route tasks to  
  • returnVals—Set return values 
  • priority--Task Priority (low, medium, high, normal, urgent)        
  • daysToComplete--# of days, minutes, hours, and months to complete the task by
  • expireType--Task expire type (days, months, hours, minutes)     
  • includeWeekends—On = Include weekends (toggle ON/OFF)
  • useFullDuration -  the task uses the full duration and continues
  • 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 the task to other active users (toggle YES/NO)
  • commentRequired - User comments are required mandatory
 

 

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
  • Define a variable/global to store the routed user list after execution
  • Click on the "choiceTask" step to configure its "Settings" properties. Provide a name to the step. Provide a task description. Click on the button to configure the return values. Note: As per the legend, the task step has one incoming and 0 outgoing connections. 

 

  • Click on the “choiceTask” 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). 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 email subject text.  Click on the button to configure email attachments on the app server.  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 re-assign the task during run time. Select YES for mandatory task comments.  

 

  • 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 a 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 users grouped by application role. Use the arrow buttons to select from the list on the left pane.

 

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

 

  • Use Variable(s) references for more meaningful reminder messages, as shown below.

 

  • Use Variable(s) references for more meaningful reminder messages, as shown below.

 

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

 

  • Click on Replace Link(s) or Variable(s) or Global(s) and include any system variables to make more meaningful email message.

 

  • Click on Replace Link(s) or Variable(s) or Global(s) and select any reference to add a more meaningful email message.

 

  • Configure return values to the task. 

 

  • NOTE: The process definition "validates" the Choice Step, which has return values configured and not used in the process workflow. In the following process definition example, the Choice Step is configured with 3 choices and only 2 are participating in the process workflow. By using Action - Validate feature the application displays an alert notification, for correction.

 

  • The “Logging” setting configuration is necessary for documentation and also measure the workflow progress and the percent complete. This is acheived 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. 

 

  • Save the process definition, create a new process instance, and execute. Render the process instance. Click on the process step to view its properties. The step should route the choice task to users.