onPhase Forms latest - This documentation is for onPhase Forms v11.3. Not for you? Earlier documentation is available too.
Workflow Design Patterns
- 1 Screenflow (no users or roles)
- 2 Multi-Form Approval Workflow
- 3 Role-based workflow
- 4 Sending a workflow step to a specific user
- 5 Using dynamic roles - determining the role at run-time
- 6 Task Collaboration Workflow Patterns
- 7 Anonymous Participant
- 8 Anonymous Screenflow
- 9 Anonymous User Starts Workflow
- 10 Automated Step
- 11 Parallel Workflow Patterns
- 12 Rejecting a step - sending it back to the original user
This page is for new to experienced workflow designers who are building a new workflow and looking for a pattern to meet their business requirements. These examples may help you to choose the best design pattern for your situation before you begin building it. Here is chart to help you compare some common patterns; many workflows combine multiple patterns.
1107px
Workflow Pattern | Best For | Example |
|---|---|---|
| An Employee On Boarding workflow in which the new employee fills out multiple forms such as Employee Info, IRS W-4, State Withholding, and Health Insurance Enrollment. | |
| A Professional Development Request Workflow that includes both Professional Development opportunity approval and a Check Request form, each of which need to be approved individually. | |
| A Patient Referral that can be processed by any nurse and and reviewed by any doctor. | |
| An Expense Report that is always sent to the user Jerry for approval. | |
| A Time Off Request that should route to the user's manager, and then the department chair, for approval. | |
| See the next three examples below for task collaboration (previously known as 'ad hoc') patterns. | |
| A Support Request that may require input from different support team members to complete. | |
| A Proposal Review where each reviewer can select the next reviewer from a dropdown. | |
| A Contact Request that gives the user a choice at run time to save the task to return to later, reassign it to another specific user, or save the task back to the entire role. | |
| A Purchase Order that has indefinite unique approvals on the same step depending on the items selected on the PO. | |
| A Purchase Order that must be sent to the client for approval; the client accesses their step through an emailed link. | |
| A Job Application that has steps for Personal Info, Education, and Work History. | |
| A Scholarship Application that is public, so anyone can start it using a form embedded on your website. The user verifies their email, then begins the workflow. | |
| A Membership Application where the user completes Step 1, and Step 2 is an HTTP Wait-Notify step performed by a payment processing system. Completion by the service triggers Step 3, which is assigned to a user to complete the workflow. | |
| A finance department uses a kick-off form to assign Budget Proposal Workflows for each department chair. | |
| A Student Add-Drop Request that the advisor may need to send back to the student for more information, or may be submitted as disapproved, skipping remaining steps, if not approved. | |
| A Purchase Order that requires multiple invoice approvals for completion. | |
Screenflow (no users or roles)
A screenflow consists of consecutive workflow steps that are performed by the same user. To create a screenflow with a navigation toolbar, use the Workflow Design Wizard to add new or existing forms to each step, and select assignment type "None." For an existing workflow, use the Add Step Wizard to add a new or existing form with the Assignment Type "None." You can click on each of your workflow steps and look at the Assignment tab verify that the steps are not assigned to a user/role as shown below. You can set Form and Document actions as usual.
A navigation toolbar is displayed and the user will be able to navigate back and forth between the various steps in the screenflow. Note that you cannot go forward to the next step until the current step is valid. frevvo will automatically enforce this constraint similar to the way forms cannot be submitted unless they are valid.
All unassigned steps performed by a single user in a screenflow are considered one 'task.' In the example above, there are five steps that combine to a single task. This workflow task design consideration is helpful to know when designing approve/reject steps, applying business rules and viewing audit trails.
Multi-Form Approval Workflow
A multi-form approval workflow is a combination of a screenflow, where one user completes multiple separate forms, and an approval workflow. It allows User A to fill out multiple separate forms, and the User B (the approver) to approve each of those separate forms in their own screenflow. Let's say you have a Professional Development Request Workflow. The user needs to submit a form to request professional development approval, and a separate check request form to issue the funds. The manager also needs to approve each of these forms individually.
Role-based workflow
In a role-based workflow, you will assign one or more roles to one or more steps in the workflow. A step with roles can only be performed by an authenticated user who belongs to one of the assigned roles. Your administrator will have to create the required roles in advance. Create the step assignments in the Workflow Design Wizard, or in an existing workflow add the role name(s) to the Assign to Roles field on the Assignment tab. Begin typing the role name then select the role from the dropdown options. Repeat to add more roles.
In this example Step 2 can be performed by any user with the "Nurse" role, and Step 3 can be performed by any user with the "Doctor" role.
Sending a workflow step to a specific user
Sometimes, for example, when approving vacation requests or expense reports, you want the workflow to go to a specific person (the employee's manager rather than any manager). In this situation, roles are not appropriate since any user with the role Manager will be able to pick up and perform the pending request.
Create the step assignments in the Workflow Design Wizard, or for an existing workflow add the user name to the Assign to User field on the Assignment tab. Begin typing the user id then select the user from the dropdown options. Only one user id is allowed.
You can enter a template e.g. {ManagerId} as shown in the image below. Simply type the left curly brace and begin typing the Manager Id control name (Managerid) and the template will appear in the dropdown. Select it and it will add the template - {ManagerId} to the field.
Leave the Assign to Role field empty. Click Submit.
Dynamic User Assignment
You must have a control in any previous step with the specified name, i.e. in the example shown, you must have a control in the Leave Approval form from the first step with name ManagerId. This control must be populated with the frevvo user id of the specific person that you want to route to. At run-time, frevvo will resolve the target user id using the data in the ManagerId control and will route the workflow to that specific user.
You can populate this control manually (via a dropdown or by typing the user id) or preferably via a business rule that automatically pulls the information from a back end system or simply populates fields in your form/workflow step with the logged-in user's information.
You may want to route a step in a workflow to the user's manager. frevvo provides a built-in template that is available for every transaction. Select the template {subject.reports.to} from the Assign to User dropdown. The workflow will then be routed to the user who is specified in the Reports To field on the User's configuration screen
Using dynamic roles - determining the role at run-time
In some cases, the role is not known in advance. For example, you may have a workflow where the first step is a Purchase Order or a Loan Request and the second step is an approval; however the approval must be performed by a Manager if the amount is less than $1000 and a Supervisor otherwise.
Add a control with name ApproveRole.
Add a business rule that populates ApproveRole with Supervisor if Amount is <1000, and Manager if Amount is >1000.
Click the approval step to open the Workflow Step Properties, and select the Assignment tab.
Enter the template e.g. {ApproveRole} in the Assign to Role field.
Workflow steps that are assigned to a user, role, anonymous or dynamically are each considered their own 'task.' In the example above for Using Dynamic Workflows, there are two steps which are also two tasks. This workflow task design consideration is helpful to know when designing approve/reject steps, applying business rules and viewing audit trails.
Task Collaboration Workflow Patterns
Task Collaboration workflow patterns capitalize on the Save to User and Save to Role features to pass a workflow step between multiple users in a role, between users determined at run-time, or a combination of both of these methods in an ad hoc manner.
If you plan to use Save to User or Save to Role on the first step of a workflow, please review this documentation.
Save to Role - Looping between multiple users in a role
In some cases, you may want multiple actions taken during a step in the workflow. For example, consider an Issue Tracking workflow where the first step is an Issue entered by an employee or a customer and the second step is Actions taken by support staff. There could be multiple actions before the issue is resolved; however all actions are performed by a member of the support staff.
Click on the Actions workflow step. Click the Settings tab. Check Saved to the task list and Save to Role.
Navigate to the Assignment tab. Add the appropriate role or dynamic role as described above to the Assign to Role field. In our example, the assigned role is SupportStaff.
Click on the Guided Designer: Settings editing mode
and check Save/Load. This enables Save/Load for the workflow as a whole.
At run-time, a member of the support staff performs this step, takes an action and logs it in the workflow. While this user is performing the steps, other users in the Support-Staff role are locked out. When the user is done, he/she can click the Save button in the workflow rather than the Continue or Finish button as shown below. This will place the step back into the Task List of all members in the Support-Staff role.
If you want to avoid users accidentally clicking the Continue/Finish button, place a required control in the form such as a checkbox that must be checked before continuing to the next step. In this case, the Continue/Finish button will not be enabled until the checkbox is checked thereby preventing accidental clicks.
Viewing the status of an issue
Users can view the status of an issue using the Task List and its built-in search capabilities. You can search for any workflow tasks that you have performed. The audit trail also shows the progress of the workflow through various approval stages so you can always see where the workflow is currently sitting and the history as it was routed from person to person. Clicking on the View icon also shows the data.
Save to User - pass steps between arbitrary users
Watch this 3-minute video to see how we at frevvo are using the Save to User feature to allow multiple users to collaborate on a workflow step in a flexible, ad hoc manner.
In some cases, you may want multiple actions taken during a step in the workflow but in an ad-hoc manner. For example, consider a workflow to review a proposal. The first step is the Proposal entry and the second step sends the Proposal for review. However, a number of users may review the proposal in any ad-hoc order.
Reviewer 1 selects another reviewer from a dropdown control and a task to review the Proposal is sent to Reviewer 2's Task List.
Leave the Assign to Role(s) field blank and use a dynamic User as described above.
Click on the Reviews workflow step. Click the Settings tab. Check Save to the task list and Save to User.
Navigate to the Assignment tab. Add the {Reviewer} template to the Assign to User field.
Click on the Guided Designer: Settings editing mode
and check Save/Load. This enables Save/Load for the workflow as a whole.
At run-time, frevvo will resolve the dynamic user id using a control in the form and the proposal will first be routed to that user. The user can make comments and decide to pass it on to a different reviewer. To do so, he/she selects the next reviewer from a control in the form e.g. a drop down and clicks the Save button in the workflow rather than the Continue or Finish button as shown below. This will place the step into the Task List of the selected Reviewer.
If you want to avoid users accidentally clicking the Continue/Finish button, place a required control in the form such as a checkbox that must be checked before continuing to the next step. In this case, the Continue/Finish button will not be enabled until the checkbox is checked thereby preventing accidental clicks.
Save to User or Role Dynamically
Let's consider a scenario where you want a step initially assigned to a Role, but also want the user to be able to enter some information and then save a task to their own task list to work on later. For example, here is a Contact Request form. Any user can perform step 1. Then the workflow routes to step 2 "Account Management", which is initially assigned to the role "Manager", so all managers are notified and any one of them can perform the task. Perhaps Jerry performs the task. He wants to make a note, and save it to his own task list so he can return to it later.
If the step is assigned to the role Manager and Save to Role is checked, when Jerry clicks Save, the task notifies everyone in the Manager role again, and is also on everyone's task list. To give Jerry the ability to save the task to his own task list, follow this pattern.
Set the Step 2 Role assignment to a template.
Then use a business rule to set that control to "Manager" on Step 1 (so that Step 2 initially goes to the all of the Managers' task lists), and null on Step 2. We're using the step as a condition here, but you could use any other condition that make sense for your use case.
If the Role assignment resolves to null, the Save button will automatically save the task to the user's own task list. This audit trail shows the task initially assigned to the Manager role, then Saved to Jerry's task list.
You can take this one step further, giving Jerry the choice of saving to his own task list, another user's task list, or back to the role. Use templates for both User and Role Assignment, and check both Save to User and Save to Role properties on that step. We'll use a business rule to dynamically set either the User or Role to a valid value and the other to null.
If Jerry indicates he wants to save the task to his own task list, set the User control to "jerry" and the Role control to null, activating the Save to User feature.
If Jerry indicates he wants to save the task to another user's task list, set the User control to that user's id, and the Role control to null, activating the Save to User feature.
If he indicates he wants to save the task back to the role, set the Role to 'Manager' and the User to null, activating the Save to Role feature.
Save to User with Auto-assignment
This use case demonstrates how to build a workflow pattern where the number of approvers is dynamic and based on the items selected in a purchase order (PO). Each item in the PO may have a different Item Manager for approval, and all approvals must occur in the same workflow step.
The workflow pattern handles:
Number of approvers unknown at design time (determined by selected items)
Sequential approvals within a single step
Dynamic user assignment and save button labels
Consider a Purchase Order form where:
Different items require approvals from different Item Managers.
The number of approvers is not fixed and depends on the items added.
All Item Managers must approve before the workflow proceeds.
The first Item Manager approves and clicks “Send to next Item Manager”. The form automatically assigns the next Item Manager. When the final manager approves, the “Continue” button is enabled to move the flow to the next step.
Create a workflow with three steps.
Purchase Order
Item Manager Approval (Linked approval step)
Business Office.(Linked approval step)
On the form add the following controls from the palette.
Control Type | Label | Name | Properties |
|---|---|---|---|
TextArea | Item JSON | ItemJSON | Hidden |
Text | Save Button Label | SaveButtonLabel | Hidden |
Table | POItemtable | ||
Column (Text) | Item | Item | |
Column (Text) | Quantity | Quantity | |
Column (Text) | ItemManager | ItemManager | |
Table | ApprovalTable | ||
Column (Text) | Item Manager Name | ItemManagerName | |
Column (T/F) | Approval | Approval | |
Column (TextArea) | Comments | Comments | |
Column (Text) | Signature |