routeForm Step
Description:
The Route Form workflow step routes a form as a task. It allows the workflow to specify the task name, task description, users or roles to route the task to, the form definition, and the form instance. Additional options provide task priority, expiration, reminders, email notifications, field and subform visibility, routing rules, and whether the assigned user can reassign the form. The Form can contain a “file” control that allows the user to upload files and submit the Form. These files are stored on the application server's file system or in the DMS file storage folder, whose configuration is defined in the “Start” process step.
The step supports:
- Defining a task name.
- Providing a task description.
- Selecting users to route the task to.
- Selecting roles to route the task to.
- Selecting the form definition.
- Selecting a Variable, Global, or FormVariable that holds the form instance ID.
- Setting task priority.
- Configuring the task completion deadline.
- Configuring the task expiration type.
- Including or excluding weekends.
- Configuring task routing rules.
- Configuring task reminders.
- Controlling whether the workflow waits for all recipients to respond.
- Sending email notifications.
- Sending separate emails.
- Providing an email subject and body.
- Attaching files to task-related emails.
- Providing an email CC list.
- Setting form fields to hidden or read-only.
- Setting subforms to hidden or read-only.
- Using expressions and roles to show, hide, or make fields read-only.
- Using expressions and roles to show, hide, or make subforms read-only.
- Providing an external user's email address.
- Allowing the user to reassign the form.
- Returning
closed,completed,rejected, ortimeoutresults for subsequent workflow processing.
Inputs
- Task name -- The Task name property specifies the name of the form task.
- Task description -- The Task description property specifies additional information about the task.
- Select users to route to -- The Select users to route to property allows users to be selected as recipients for tasks.
- Select roles to route to -- The Select roles to route to property lets you select roles as task recipients.
- Select form definition – The Select form definition property specifies the form definition associated with the task.
- Form instance ID -- The Variable/Global/FormVariable holds the form instance ID property; specifies the form instance ID associated with the task.
- Task priority -- The Task priority property specifies the task's priority.
- Complete the task by-- The Complete the task by property provides the task completion value.
- Task expire type – The Task expire type property specifies the task expiration type.
- Include weekends -- The Include weekends property controls whether weekends are included in the task completion configuration.
- Task Routing Rules – The Task Routing Rules property provides configuration for task routing rules. (default, task locking, least # of tasks in total, least # of tasks by definition)
- Task Reminders – The Task Reminders property configures task reminders.
- Wait for all to respond – The Wait for all to respond property controls the wait-for-response configuration.
- Send email notification – The Send email notification property controls whether email notification is enabled.
- Send separate emails -- The Send separate emails property controls the separate-email configuration.
- emailSubject-- The Email Subject property specifies the email subject.
- emailBody— The Email Body property specifies the email body.
- emailFiles— The Email file attachments property specifies files associated with the email.
- emailccList – The Email CC List property specifies email CC information.
- Set form fields hidden or readOnly – The Set form fields hidden or readOnly property configures form-field visibility or read-only behavior.
- Set subforms hidden or readOnly – The Set subforms hidden or readOnly property configures subform visibility or read-only behavior.
- Show/Hide/Readonly Fields Using Expressions & Roles - The Show/Hide/Readonly Fields Using Expressions & Roles property provides expression- and role-based field configuration.
- Show/Hide/Readonly SubForms Using Expressions & Roles - The Show/Hide/Readonly SubForms Using Expressions & Roles property provides expression- and role-based subform configuration.
- External user email address — The External user email address property provides an email address for an external user.
-
userCanReAssign – This property is optional and uses the
selectYesNodata type. “Yes” means that the User can reassign the form.
Returns
-
closed – The
closedreturn path can be connected to the workflow activity that should execute for theclosedresult. -
completed – The
completedreturn path can be connected to the workflow activity that should execute for thecompletedresult. -
rejected – The
rejectedreturn path can be connected to an alternative workflow path for therejectedresult. -
timeout – The
timeoutreturn path can be connected to the workflow activity that should execute when the step produces atimeoutresult.
Steps Returns Collection
- stepReturn.routeTo - list of users (GUID), the task is routed to
- stepReturn.completedByUsers – user (GUID), the task was completed by
- stepReturn.rejectedUserList - list of users (GUID), the task is rejected by
Usage:
The Route Form step is typically placed at a point in a workflow where a form needs to be routed as a task to one or more users or roles.
The workflow provides task information, recipients, the form definition, and the form instance. Optional properties can then be used to configure priority, expiration, reminders, notifications, field visibility, routing rules, and reassignment.
A typical workflow pattern is:
Prepare Form → Route Form → Process Task
The routed form task can then be incorporated into workflows for:
- Form review.
- Approval processing.
- User or role-based task assignment.
- Departmental processing.
- External-user processing.
- Task prioritization.
- Time-limited tasks.
- Reminder-driven tasks.
- Email notification.
- Conditional field visibility.
- Reassignment of tasks.
- Different processing paths based on the task result.
The SearchAndReplaceString documentation similarly places a workflow step after information preparation and before subsequent processing activities, using a simple Prepare/Process → Step → Next Activity pattern.

Typical Workflow Suggestions:
Route a Form for Approval
Use Route Form when a completed form needs to be assigned as an approval task.
Example:
Submit Form → Validate Request → Route Form → Approval Processing
Select the appropriate users or roles and provide a meaningful task name and description.
Route a Form to Selected Users
Use Select users to route the task to specific users.
Example:
Prepare Request → Route Form → Assigned User Review
The selectUsers data type is provided specifically for selecting users.
Route a Form by Role
Use Select roles to route to when routing is based on roles rather than individual users.
Example:
Submit Request → Route Form → Department Review
The selectRoles data type is provided for role selection.
Route an Existing Form Instance
Use the form instance ID property when the workflow already has a form instance stored in a Variable, Global, or FormVariable.
Example:
Create Form → Store Form Instance → Route Form
The Route Form definition explicitly supports selecting a Variable, Global, or FormVariable containing the form instance ID.
Provide Detailed Task Instructions
Use Task name and Task description to provide clear information to the task recipient.
Example:
Task name:
Review Customer Request
Task description:
Review the submitted request and complete the required form fields.
The task name is required, while the task description is optional.
Set Task Priority
Use Task priority when the workflow needs to provide priority information for the routed task.
Example:
Evaluate Request → Route Form → Priority Review
The property uses the selectPriority data type.
Configure Task Completion and Expiration
Use Complete the task by, Task expire type, and Include weekends when the routed task requires completion or expiration configuration.
Example:
Route Form → Review Task → Continue Workflow
These properties are available as optional task-timing inputs.
The exact format accepted by Complete the task by is not defined in the XML and should be confirmed in the target FlowWright environment.
Configure Task Reminders
Use Task Reminders when reminders need to be associated with the routed task.
Example:
Route Form → Wait for Review → Reminder/Completion
The property uses the ClsTaskReminder data type.
Send Email Notifications
Use Send Email Notification, Email Subject, and Email Body when a task-related email notification is required.
Example:
Prepare Form → Route Form → Email Notification → User Processing
The Route Form definition provides dedicated properties for notification control, subject, rich-text body, attachments, and CC information.
Send Separate Emails
Use Send separate emails when the workflow configuration requires separate email handling.
Example:
Route Form → Notify Recipients → Process Responses
The property is configured using the selectYesNo data type.
Include Email Attachments
Use Email file attachments when files need to be included with the task-related email.
Example:
Generate Document → Route Form → Email with Attachment
The property uses the FileList data type.
Route Tasks to External Users
Use an external user email address when the workflow needs to provide an external user's email address.
Example:
Prepare External Review → Route Form → External User Processing
The XML defines the external-user email property as an optional multiline text box.
Control Form Field Visibility
Use Set form fields hidden or readOnly when the routed task should restrict or hide selected form fields.
Example:
Initial Submission → Route Form → Review
The property uses the hideReadOnlyFields data type.
Control Subform Visibility
Use Set subforms hidden or readOnly when the routed task requires specific subform visibility or read-only settings.
Example:
Prepare Form → Route Form → Subform Review
The property uses the hideReadOnlySubForms data type.
Use Expressions and Roles for Field Access
Use Show/Hide/Readonly Fields Using Expressions & Roles when field behavior needs to be configured using expressions and roles.
Example:
Route Form → Role/Condition-Based Form Review
The step provides a dedicated hideReadOnlyFieldsWithExpression data type for this configuration.
Use Expressions and Roles for Subforms
Use Show/Hide/Readonly SubForms Using Expressions & Roles when subform behavior needs to be configured using expressions and roles.
The step provides a dedicated hideReadOnlySubFormsWithExpression data type.
Allow Form Reassignment
Use User can reassign form when the assigned user should have the ability to reassign the form.
Example:
Route Form → User Review → Reassignment if Required
The property uses the selectYesNo data type.
Handle Multiple Response Paths
Use the four return paths to connect the Route Form step to different downstream workflow activities.
Example:
Route Form
→ closed → Close Processing
→ completed → Continue Processing
→ rejected → Rejection Processing
→ timeout → Timeout Processing
The four paths are explicitly defined in the step XML.
Configure Task Routing Rules
Use Task Routing Rules when the workflow requires routing-rule configuration.
Example:
Evaluate Request → Route Form → Routing Rules → Task Processing
The XML exposes TaskRoutingRules as an optional property, but does not document the individual rule types or their evaluation behavior.
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.
- Select the line between the steps to configure the “Connection Properties”. The default property values are “None, Closed, Completed, Rejected, Timeout, Error, and Evaluate”. Depending on the step’s purpose, additional values are available for configuration.
- 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. 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.

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

- Enable "Send Email Notification" to “On” to send emails.
- 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. Note: Avoid using both configurations, as the system supports only one.

- 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. Use the Copy and edit button to modify existing content. Learn how to use Replace Links in the body of the task email.

- Click the “Set Form fields hidden or Read-only” button to configure the Form fields as “Hide or Read-Only” during rendering. Use the Search text box to filter the list. 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. Use the Search text box to filter the list. Click the Save button.

- 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 “View > Render”.

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

Tips:
- Provide a meaningful Task name so users can immediately understand the task's purpose.
- Use Task description to provide additional instructions or context.
- Verify that the selected form definition is the intended form.
- Make sure the selected Variable, Global, or FormVariable contains the correct form instance ID.
- Verify the intended users and roles before deploying the workflow.
- Use task priority consistently when prioritization is important.
- Test task expiration settings with realistic completion scenarios.
- Confirm whether weekends should be included when configuring task completion.
- Configure reminders appropriately for time-sensitive tasks.
- Test email notification settings before deploying notification-dependent workflows.
- Use meaningful email subjects and clear email bodies.
- Verify email attachments and CC recipients during testing.
- Use field and subform visibility settings deliberately to avoid exposing or modifying unintended information.
- Test expression- and role-based visibility rules with representative users and conditions.
- Connect all applicable return paths to meaningful downstream activities.
- Consider handling
timeoutseparately when task completion is time-sensitive. - Consider handling
rejectedseparately when the workflow requires rejection processing. - Use User can reassign form deliberately when reassignment should be permitted.
- Test routing rules with representative users and roles.
- Do not assume the runtime meaning of
closed,completed,rejected, ortimeoutbeyond the return values explicitly defined in the XML. - Do not assume the format of Complete the task by without confirming it in the FlowWright implementation.
- Do not assume the exact evaluation behavior of Task Routing Rules without validating it in the target environment.
- Test the complete workflow after changing recipients, routing rules, form visibility, notification settings, or expiration configuration.
- Verify that external-user email configuration is appropriate before exposing a form to external recipients.
Notes:
- The Route Form step is defined in the Forms category with the internal name
routeform, label “Route a form as a task”, and display name “Route Form.” - The step is implemented by
FlowWright.Workflow.RouteForminFlowWright.Workflow.dlland is defined as a Process step with 2 incoming connections and 2 outgoing connections. - The step defines 25 properties, consisting of four required properties and the remaining optional properties. The required properties are:
-
taskName– Task name. -
formDefinition– Select form definition. -
formInstanceID– Variable/Global/FormVariable holds the form instance ID.
-
- Actually, the XML also marks Task name as required; therefore, the complete required set is three properties:
taskName,formDefinition, andformInstanceID. All other properties are optional. - The optional properties include recipient selection, task description, priority, expiration, routing rules, reminders, response handling, email notification, email content, attachments, field/subform visibility, external-user email, and reassignment.
- The step provides four return values:
closedcompletedrejected-
timeout
- The property types are implemented by the following FlowWright data types:
-
string–FlowWright.DataTypes.ClsTextBox -
multilineTextBox–FlowWright.DataTypes.ClsMultilineBox -
selectUsers–FlowWright.DataTypes.ClsSelectUsers -
selectRoles–FlowWright.DataTypes.ClsSelectRoles -
selectFormDefintions–FlowWright.DataTypes.SelectFormDefintions -
selectFormVariable–FlowWright.DataTypes.SelectFormVariable -
selectPriority–FlowWright.DataTypes.ClsPriority -
TaskExpireType–FlowWright.DataTypes.TaskExpireType -
checkbox–FlowWright.DataTypes.ClsCheckBox -
TaskRoutingRules–FlowWright.DataTypes.TaskRoutingRules -
ClsTaskReminder–FlowWright.DataTypes.ClsTaskReminder -
selectYesNo–FlowWright.DataTypes.ClsYesNo -
ClsRichTextBox–FlowWright.DataTypes.ClsRichTextBox -
FileList–FlowWright.DataTypes.FileList -
hideReadOnlyFields–FlowWright.DataTypes.ClsHideReadOnlyFields -
hideReadOnlySubForms–FlowWright.DataTypes.ClsHideReadOnlySubForms -
hideReadOnlyFieldsWithExpression–FlowWright.DataTypes.ClshideReadOnlyFieldsWithExpression -
hideReadOnlySubFormsWithExpression–FlowWright.DataTypes.System.ClshideReadOnlySubFormsWithExpression
-
Definition Sample:
You may provide sample definition(s) for download and later import them into your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
Note: Verify and complete any missing configuration after importing the sample, including:
- Task name.
- Task description.
- Users and roles.
- Form definition.
- Variable, Global, or FormVariable containing the form instance ID.
- Task priority.
- Task completion and expiration settings.
- Weekend configuration.
- Task routing rules.
- Task reminders.
- Response configuration.
- Email notification settings.
- Email subject and body.
- Email attachments.
- Email CC list.
- Form field and subform visibility settings.
- Expression- and role-based visibility settings.
- External user email address.
- User reassignment.
- Downstream
closed,completed,rejectedandtimeoutworkflow paths. - Environment-specific settings.
After verifying the configuration, save the Process Definition before execution.
Click here to download the process definition XML sample file.
Click here to download the form definition HTML sample file.