routeForm Step
Description:
This step routes a Form to users or to Application group users.
Inputs
- taskName-- Task Name
- taskDesc-- Task Description
- routeTo -- Select users to route to
- routeToRoles -- Select roles to route to
- formDefinition – Select form definition
- formInstanceID -- Variable/Global holds the form instance ID
- priority-- Task Priority
- daysToComplete-- Complete the task by
- expireType--Task expire type
- includeWeekends-- Include weekends
- taskRoutingRules – Task Routing Rules (default, task locking, least # of tasks in total, least # of tasks by definition)
- taskReminder – Task Reminders
- waitForAll – Wait for all to respond
- sendEmailNotification--Send email notification
- sendSeparateEmails -- Send separate emails
- emailSubject-- Email Subject
- emailBody—Email Body
- emailFiles—Email File Attachments
- emailccList – Email CC List
- hideReadOnlyFields--Set Form Fields Hide or ReadOnly
- hideReadOnlySubFormset SubForms Hide or ReadOnly
- hideReadOnlyFieldsWithExpression - Show/Hide/Read-only fields using expressions, and roles
- hideReadOnlySubFormsWithExpression - Show/Hide/Read-only subForms using expressions, and roles
- emailAddresses—External user email address
- userCanReAssign – Yes = user can re-assign task to another active users
Returns
- completed – task was approved and completed
- rejected – task was rejected
Steps Returns Collection
- stepReturn.routeTo - list of users (GUID), the task is routed to
- stepReturn.completedByUsers – 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 “routeFormDef” example.
- Create a new process definition called “routeFormDef” and open it in Designer mode.
- Drag a “routeForm” step to the canvas.
- Connect the dots between the “Start” step and “routeForm” steps, as shown above.
- Declare a variable or a global to store the Form Instance ID.
- Click the “routeForm” step to configure its “Required” properties. Provide a step name and a task name. Select the Form definition from the dropdown list. Provide a variable or global reference to store the Form Instance ID. Click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.

- Click the “routeForm” step to configure its “Optional” properties. Provide a task description. Select the users (single or multiple) to route to. Select the application roles (single or multiple) to route to. 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 'Include weekends' if desired. When selected, the task completion duration includes weekends.

-
Task Routing Rules - Select task routing rules (default, task lock, least # of tasks in total, least # of tasks by definition) to be applied during runtime.
- “Default” means the task has no lock status.
- “Task lock” means the task is locked by a user.
- “Least # of tasks in Total” means the task is assigned to the user with the fewest total tasks.
- “Least # of tasks by Definition” means the task is assigned to the user with the least count of tasks by definition.

- Configure task reminders. Click the Add Row (+) button to insert an empty row. Enter the time duration, subject, and message body. Click the Save button. You can insert multiple Task Reminders using the Add Row function.

- Configure whether the task needs to wait until 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 (separate task ID URLs). Provide the email subject text. Click the button to configure email attachments on the app server.

- Provide the email subject. Click the button to configure the email body. Click the button to select email attachments from the application server. Configure the email CC address list (semicolon-separated); then provide the email subject.

- Click the button to configure the Form and subForm fields to “show or hide” when rendered at runtime.

- Click the button to configure the “Show / Hide / ReadOnly” Form fields using expressions when rendered. Click the button to configure the “Show / Hide / ReadOnly” subForm using expressions when rendered at runtime. A pop-up window opens for configuration. Click the Add Row button to insert an empty row. Enter the expression. Configure the user roles (in or out of the role). Configure the action (show, hide, or read-only). Select multiple Form fields for the action from the drop-down list. Click the Save button. You may add multiple expressions and roles using the Add Row button.

- Provide a semicolon-separated list of external email addresses. Select “Yes” if a user can reassign the Form at runtime. Click the Save button.

- Click the Task Reminder to set the interval for reminders. Enable "Send Email Notification" to “On”. Task reminders with a positive value are calculated from the task creation date. Task reminders 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 Task description, use the template, or create new template content for it, then save it.

- Click "Select users to route to", then choose the desired users from the list and move them to the right pane using the arrow keys. You may include the system variable “initiatorID” to route the Form to the user who initiated the new process instance.

- You may provide a system variable “variable.routeToUser” that contains a reference to the User's GUID (not the user name)

- Click Select 'Roles to route to” and choose the application role (a group of users) you want to assign.

- Click the email body, use the template, or create new template content for the task description, then save. You can also use the Copy and edit button to modify existing content.

- Click the “Set Form fields hidden or Read-only” button to configure the Form fields as “Hide or Read-Only” during rendering. Then click the Save button.

- Click the "Set Subforms Hidden or Read-only" button to configure the subforms as “hidden or read-only” during rendering. This feature hides the subform fields when the parent Form contains subforms.

- Save the process definition, create a process instance, and execute it. The RouteForm step should submit the form and route it to users. Navigate to the Process - Instance page and render the process instance. Then select the View - Render menu option.

- On the Render Instance page, select the Items—Tasks menu option to view the tasks completed to date.

- Also, navigate to the Engage - Tasks page to view the Tasks assigned to the resource.

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