Description:
This step is used to route 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
- 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 “Settings” 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 “Advanced” 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.
- Configure the following values for the properties shown in the graphic below. Provide content to the Email body. Select email file attachments from the application server file path. Configure the email CC address list (semi-colon separated); provide the email subject. Configure form fields to show/hide when rendered during run time. Configure subForm fields to show/hide when rendered during run time. 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, then save.
- 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 sub forms hidden or read-only to make sub forms hidden or read-only while rendering. If the selected form has sub-forms, we can use this feature.
- Save the process definition, create a process instance, and execute. The RouteForm step should submit the form and route it to users.
- Navigate to Run - Process Instance - select the process instance and click 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 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.