routeForm Step
Description:
This step routes a Form to users or Application group users.
Inputs
- name - Form control name
- taskName-- Task Name
- formDefinition – Select form definition
- formInstanceID -- Variable/Global holds the form instance ID
- taskDesc-- Task Description
- users to routeTo -- Select users to route to
- roles to routeTo -- Select roles to route to
- expireType--Task expire type
- priority-- Task Priority
- daysToComplete-- Complete the task by
- includeWeekends-- Include weekends
- taskRoutingRules – Task Routing Rules (default, task locking, least # of tasks in total, least # of tasks by definition)
- taskReminder – Task Reminders
- sendEmailNotification--Send Email Notification
- emailSubject-- Email Subject
- emailBody—Email Body
- emailFiles—Email File Attachments
- 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 name for the step. Provide a task name. Select the Form definition from the dropdown list. Provide a variable or global reference to hold the Form Instance ID. Click the Save button. Note: Click the "AI Predict" button for the Copilot to 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 application roles (single or multiple) to route to. 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' if desired, and the task completion duration now includes weekends as well.

- Select task routing rules (default, task lock, least # of tasks in total, least # of tasks in duration). Task lock means the task is locked by one of the users during runtime. A task is assigned to the user with the fewest tasks by count during runtime. The task is assigned to the user with the fewest tasks by time duration during runtime.

- Provide content for 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); provide the email subject.

- Click the button to configure the Form fields and subForm fields to “show or hide” when rendered, during run time.

- 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 during runtime. A pop-up window is displayed for configuration. Click the Add Row button to insert an empty row. Provide the expression. Configure the user roles (in or out of the role). Configure the action (show, hide, or read-only). Select multiple Form fields according to the action from the drop-down list. Click the Save button. You may add multiple expression and roles using the Add Row button.

- Provide an external email address list (semi-colon separated). Select “Yes” if a user can re-assign the Form during runtime. Click the Save button.

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

- Click the Task description and use the template, or create new template content for the task description, and then save it.

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

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

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

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

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

- Click the button "Set Subforms Hidden or Read-only" to configure the subforms “hidden or read-only” while rendering. This feature facilitates hiding the subForm fields when the parent Form has subforms.

- Save the process definition, create a process instance, and then 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. Click the View - Render menu option.

- On the Render Instance page, select the Items—Tasks menu option to view the tasks executed until that time.

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

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 process steps for any missing configurations, such as file path references and database connections, after 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.