routeForm Step

Use this step to route a form to users or application group users.

Last published at: February 3rd, 2025

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 definition called “routeFormDef” 
  • Select the definition and click the “design” button
  • Drag a “routeForm” step from the toolbox
  • Connect the dots between the start and “routeForm” step
  • Declare a variable/global to store the form instance ID. 
  • Click the “routeForm” step to configure its “Required” properties. Provide a step name. 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 “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 consists of the weekend, too. 

 

  • 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 one of the users having the least # of tasks by count during runtime. The task is assigned to one of the users having the least # of tasks by time duration during run time. 

 

  • 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 to show/hide when rendered and the subForm fields to show/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 run time. A popup window is rendered for configuration. Click the Add Row button to insert an empty row. Provide the expression. Configure the user roles (in the role or not in the role). Configure the action (show or hide or read-only). Select multiple Form fields according to the action from the drop-down list. Click the Save button. 

 

  • Provide an external email address list (semi-colon separated). Configure if a user can re-assign the form during run time. 

 

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

 

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

 

  • Click on Select users to route to and select users.

 

  • Enter the variable containing the reference to User's GUID (not the user name)

 

  • Click on Select roles to route to and select the application you want to assign.

 

  • Click the email body and use the template or create new template content for the task description, then save. Use the Copy and edit button to edit existing content as optional. 

 

  • Click on set form fields hidden or read-only to make form fields hidden or read-only while rendering. 

 

  • Click on "set subforms hidden or read-only" to make subforms hidden or read-only while rendering. This feature is helpful if the selected form has subforms.

 

  • Save the process definition, create a process instance, and execute. 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 it (drag-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.