userSelectionTask Step
Description:
In the "User Selection Task" step, select users and application roles (users) and route tasks accordingly at runtime.
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 process definition named “userSelectionTaskDef” and open it in designer mode.
- Drag a “Task, userSelectionTask” step to the canvas.
- Connect the dots between the “Start” step and other steps, as shown above.
- Define a variable or a global to store the list of routed users.
- Click the “userSelectionTask” step to configure its “Required” properties. Enter the step name and task description. Note: As per the legend, the task step has one incoming and two outgoing connections. Click the Save button. Note: Click the "AI Predict" button to have Copilot add new process steps that match your process description.

- Click the globe icon to globalize the task step using the following UI. Select the language from the dropdown list. Click “Translate” to convert the description to the selected language. Then click “Save”.

- Click the “userSelectionTask” step to configure its “Optional” properties. Click the button to specify the users to whom the route should be sent. Click the button to specify the application role (users) to which the application will route. Click the button to configure the user selection. Provide a task detail description. Continue configuring the “task” steps’ “Advanced” properties, as shown below. Select the 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 the 'Include weekends' option as “Yes” if desired. Select “Yes” to wait for the entire duration, even after completion.

- Click the “userSelectionTask” step to configure its “Optional” properties. Task locks - select task routing rules (default, task lock, fewest total tasks, fewest duration tasks). “Default” means the task has no lock status during runtime. “Task lock” means the task is locked by one of the users during runtime. The task is assigned to one of the users with the fewest tasks by count during runtime. The task is assigned to one of the users with the fewest tasks by time duration during runtime. Configure the task reminders. Configure whether the task needs to wait until all users have responded (when routed to more than one user). Provide a variable or global reference to store the list of routed users upon task completion. The variable may be created before or after 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 the default). Provide the email subject text. Click the button to configure email attachments on the app server. Click the Save button.

- Click the “userSelectionTask” step to configure its “Optional” properties. Click the button to enter the email content (body). Click the button to configure email file attachments (from the app server path). Click the Save button.

- Click the “userSelectionTask” step to configure its “Optional” properties. Enter an Email CC list (semicolon-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. Enter 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 reassign the task at runtime. Select “Yes” for mandatory task comments. Click the Save button.

- Click the button to configure the user selection. Click the Add Row button to add new rows. Select Users from the radio button. Enter the task label text. Enter a variable or a global to store a list of selected user IDs. Click the Save button.

- Click the button to configure the user selection. Click the Add Row button to add new rows. Select Roles from the radio button. Provide the task label text. Provide a variable or a global to store the list of application role user IDs after selection.

- Click the Task Reminder to set the task reminder intervals. Enable "Send Email Notification" to “On”. Task reminders configured with a positive value are calculated from the task creation date. Task reminders configured with a negative value are calculated by subtracting that duration from the task's due date. The task reminder message body supports line breaks.

- Click the Email body and use the existing template (you can also edit it) as the email body, or create a custom template. Enter the message text in the email body. Click the “Replace Links” button to select information links from the list to include in the message. Click the “Variables” or “Globals” button to select variables and globals to include in the message. Click the Save button.

- Click the “Task 1” step to configure its properties for routing to users.

- Search for users by the first three characters and select from the list in the left pane using the arrow buttons. The task can be assigned to more than one user or to a user GUID (provided the value is known beforehand). Configure the variable to contain 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 for routing to roles.

- The “variable.roles” stores all user names (comma-separated) for the selection configured for that application role and is mapped to the input field, as shown below.

- Save the process definition, create a new instance, and execute it. Render the process instance. Click the process step to view its properties. The user selection step routes the task to the user, who must select a user and role, as shown below. Navigate to the Engage - Tasks page to view the Tasks routed to the resource.

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

- The “Logging” configuration is necessary for documentation and also measures workflow progress and 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 sends a test email with the configured email body to the current (logged-in) user.

Definition Sample:
You may download the sample definition(s) from the link here and later import them (drag-and-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
Note: Please verify and complete the import process steps for any missing configurations, such as file path references and database connections. Then, save the definition to confirm the changes.
Click here to download the sample file.