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.
...
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. will frevvo will automatically enforce this constraint similar to the way forms cannot be submitted unless they are valid.
...
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.
Image RemovedImage Added
Expand |
---|
title | Click here for steps to create this workflow... |
---|
|
- Start by creating a workflow with four steps. In the Workflow Design Wizard, you will set them up as follows:
Step 1: Professional Development Request - Create New Form - Assignment is None. Step 2: Manager Approval (Professional Development) - Approval Step* - Assign to a User: jerry (or your Manager's UserId). *This links to the parent step Professional Development Request. Step 3: Check Request - Create New Form - Assignment is None. Step 4: Manager Approval (Check Request) - Approval Step^ - Assignment is None. ^This links to the parent step Check Request.
Notice that this initial design is not the final step order that we will use. This is because when you create an Approval Step, it links to the nearest Parent Step above it. So, by designing steps in this order initially we allow frevvo to automatically create approval steps with their corresponding Business Rules and Assignments. In the next stage, we will move these steps around so they are performed in the correct order.
- Click the second step, Manager Approval (Professional Development) and drag it down to the + icon between the third and fourth steps. This places the steps in the correct order in which they will be performed.
Image RemovedImage Added Since Steps 1 and 2 have no assignment, they will be performed by the initial user as a screenflow. The new Step 3 (Manager Approval (Professional Development)) is assigned to the Manager. Step 4 (Manager Approval (Check Request)) has no assignment, so it will also be performed by the Manager as a screenflow. - Edit the form(s) as desired. In this case, we added some fields to the Professional Development form regarding event name, type and cost. We added fields to the Check Request form regarding Payee and Mailing address. The My Items (relabeled My Info in this example) section appears on both forms - it prefills on the first form with the logged in user's details. In the second form, since the controls all have the same name and nesting level, the data entered in Step 1 will be passed into those fields in Step 2. So, on Step 2 (Check Request) we have disabled those fields. We also deleted the Initialization Rule on Step 2, as it is not needed. Both forms have Manager Approval sections and respective rules to show/hide those sections on the appropriate steps.
Image RemovedImage Added Image Removed Image Added - Save and Test the Workflow. Notice that the initial user fills out the Professional Development Request, clicks Continue, and fills out the Check Request in a screenflow. Then, the Manager picks up the task for Manager Approval (Professional Development) and sees the Professional Development form with their approval section. They sign and click continue, and see the Check Request with another approval section in a screenflow. After approving the Check Request they can submit the workflow.
|
...
In this example Step 2 can be performed by any user with the "Nurse" role, and Step 3 can be performed by any use user with the "Doctor" role.
Sending a workflow step to a specific user
...
Leave the Assign to Role field empty. Click Submit.
Image RemovedImage Added
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 user frevvo user id of the specific person that you want to route to. At run-time, will 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 drop down 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.
Note |
---|
You may want to route a step in a workflow to the user's manager. provides 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
|
...
- 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.
Image RemovedImage Added
Tip |
---|
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. |
...
- 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.
Image Removed
Image Added
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.
Image RemovedImage Added
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.
...
- 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.
Image RemovedImage Added
At run-time, will 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.
...
- Set the Step 2 Role assignment to a template.
Image RemovedImage Added - 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.
...
Expand |
---|
title | Click here to walk through this example step by step... |
---|
|
We'll walk through this example step by step. Create the Workflow- Create a workflow with two steps: Contact Request and Account Management.
Image RemovedImage Added - Set up the form as desired, but be sure to add the following fields in the Account Management Section:
- Radio: What would you like to do with this request? with three options: Take, Assign, and Return. Set the option labels as desired.
- ComboBox: Assign To User (set to frevvo Users). If the user chooses to save the task to a different user, they will enter the userId here. You could use a dropdown or even a text control, but be sure it will resolve to a valid userId.
- Text: UserID. This can be hidden as it will be set by a business rules.
- Text: Role. This can be hidden as it will be set by a business rule.
- Text: Save Label. This is optional but can help personalize the form and give the user more context for what Save action they are performing. It is also hidden. We'll use it as a template to dynamically change the text on the Save Button based on the option the user selects.
- In our example form, we've also provided a Comments TextArea in a Repeat, so users can provide additional comments if the task is saved multiple times.
Image RemovedImage Added
Add the Business RuleAdd a Business Rule like the following. This rule sets the UserID, Role, and Save Label fields based on the selection made in the radio What would you like to do with this request?. It also shows the Assign to User control if the user selects "Assign" so that they can enter a specific user to assign the task to.
Code Block |
---|
var event = form.load;
// If the user wants to save the task to their own task list, set the userID to their id and other fields to null.
if (WhatWouldYouLikeToDo.value === 'Take') {
UserID.value = _data.getParameter('subject.id');
Role.value = null;
AssignToUser.value = null;
AssignToUser.visible = false;
AssignToUser.required = false;
SaveLabel.value = 'Save to your task list.';
// If the user wants to reassign the task to a specific user, allow them to select that user.
} else if (WhatWouldYouLikeToDo.value === 'Assign') {
AssignToUser.visible = true;
AssignToUser.required = true;
UserID.value = AssignToUser.value;
Role.value = null;
SaveLabel.value = 'Save to ' + UserID.value + "'s task list.";
// If the user wants to save the task back to Manager task list, set the Role Manager and clear the user values.
} else if (WhatWouldYouLikeToDo.value === 'Return') {
AssignToUser.visible = false;
AssignToUser.required = false;
AssignToUser.value = null;
UserID.value = null;
Role.value = 'Manager';
SaveLabel.value = 'Return task to the Manager Role';
// Set Role to Manager by default if nothing is selected to avoid invalid task assignment
} else {
AssignToUser.visible = false;
AssignToUser.required = false;
AssignToUser.value = null;
UserID.value = null;
Role.value = 'Manager';
SaveLabel.value = 'Please select an option above if you would like to save this task.';
} |
Edit Workflow SettingsIn Settings editing mode, check Save/Load, which will show a Save button on the form. Image RemovedImage Added Workflow Step Settings and AssignmentReturn to Workflow editing mode. - On the Account Management Step, check Save to the Task List, Save to Role, and Save to User.
- In the Save Label property, enter the template {SaveLabel}. This will show the Save Label that you set in your business rule on the form's Save Button.
Image RemovedImage Added - In the Assignment Tab, set Assign to User to the template {UserID}, then set Assign to Role(s) to the template {Role}. You must use templates here; if you enter a specific user or role(s) this workflow will not work as expected.
Image RemovedImage Added
Test the Workflow- Click Save and Test. Enter any info in the first step, Contact Request, and click Continue. The business rule sets the control Role to Manager by default, and the control UserID to null, so Step 2 Account Management will be assigned to the role Manager. Every user in that role will get a Task Notification email, and will have the option to perform the step.
- Login as a user with the role Manager and go to the Task List. Click on the task for this workflow, and view the Audit Trail. Notice that the step is assigned to the role Manager.
- Perform the step. Choose the Option "Take it", and click the customized Save to your task list button at the bottom. Then, view the audit trail again and notice that the task has been saved to this user's (in this case, Jerry's) task list. This happened because the business rule has set the UserID control to "jerry" and the Role control to null, and the Save to User option is checked.
- Perform the task again. This time, select Assign to a Specific User. Notice that the Assign to User field becomes visible and required. Enter or select a valid user, and notice that the Save button's label updates to Save to <user>'s task list. Click that Save button. The task disappears from your task list, and Sue (or the user you selected) gets a Task Notification email.
- Login as the user you just assigned this task to, and find the task on their Task List. Check the Audit Trail, and see that the business rule set the UserID field to the user you entered in AssignToUser, and the Role field to null, which triggered Save to User to assign the task to this user.
Image RemovedImage Added - Perform the task, and this time select Return it to the Manager Role. Notice your custom Save button label updates, and click it. The business rule will set the Role control to Manager and the UserID field to null, which allows the Save to Role feature to run. This returns the task to the task list of all users in the Manager role, and also notifies them.
Image RemovedImage Added - Login as any user in the Manager role. Locate the task and check the audit trail, noticing the most recent Save operation which assigned this task to the role Manager. When you perform the task, you see all comments previously added by the other users. You can add more comments, and Finish the Workflow.
Image RemovedImage Added Image RemovedImage Added
|
Anonymous Participant
Sending a workflow step to an Email address allows the step to be performed by an anonymous user. An anonymous user is a person who does not have an account in your tenantfrevvo tenant.
This a common workflow scenario. Some examples are:
- a Membership workflow that requires reference letters from an external person.
- a Purchase Order Approval requiring the customers customer's review and signature.
- a workflow that is sent to an External Vendor for a Quote.
...
- Step 1 is filled out by the company sales personsalesperson. The sales person is logged into for frevvo for this step.
- An email is sent to the customer with a link to Step 2 for the customer's review and signature. The customer is an anonymous user as they are not required to log into to frevvo to perform this step. The workflow is suspended until the customer performs step 2.
- Step 3 routes the workflow back to the sales person salesperson for continued processing. The sales person salesperson is logged into for frevvo for this step.
In the Workflow Designer:
Step 1 contains an Email control, named ClientEmail, where the sales person salesperson enters the customer's email address.
Step 2 is the the step that the Anonymous user sees. In this example, it is assigned to the {ClientEmail} form field template. To route the workflow to an email address in your workflow
Click the three-dot action menu on the anonymous step. Select Edit Properties.
Select the Assignment tab.
Add the email address or the control template to the Assign to Email (No login required) field.
This step sends a task notification email to the customer's email address provided by the template. The email contains a link to Step 2. When the customers customer clicks on the link, the workflow is suspended until step 2 is completed.
Step 3 in our example is assigned the role of Sales. When the customer approves/rejects the Purchase Order, a task is sent to the Sales person Salesperson - an authenticated user with a Sales role. The Sales person Salesperson must log into to frevvo to complete the workflow.
Image RemovedImage Added
Note |
---|
The anonymous user can click the link more than once.
|
Refer to the Workflow Tutorial for step-by-step instructions to create the Purchase Order workflow described above and for more information about other features available in in frevvo.
Anonymous Screenflow
A screenflow is a series of consecutive workflow steps performed by the same user. Consider the situation where you want to collect a large amount of information from an anonymous user Some examples are:
...
Step 1: Collect Email Address
Image RemovedImage Added
Step 2: Enter Data. This step is dynamically assigned to the email entered in Step 1.
...
Here is what it might look like in use mode:
Image RemovedImage Added
Optionally, you could add screenflow (unassigned steps) after Step 2. Then, check Save on Navigate for the workflow. This will automatically save the user's data as they move forward thru the flow. Whenever they open the link in the Step 2 email, they will be automatically taken to the last step they were filling.
...
Step 3: Approval Step (notice that Reject is available here, so this workflow could be sent back to the anonymous user for corrections.)
Image RemovedImage Added
Automated Step
...
- The first step is the Membership Renewal form filled out by the member.
- The second Step step uses http HTTP Wait-Notify to send the data to an external payment processing system. The workflow suspends until that system replies.
- The third step sends the workflow back to a an unauthenticated user in a tenant frevvo tenant to process the membership.
...
- Some of the simplest methods involve the creative use of Save to User or Save to Role design patterns, which can collect multiple approvals on the same step. By using dynamic assignment and business rules to add or remove approval sections, you can create a flexible workflow where the number of approvers and specific approvers are determined at run-time.
- Use an Activity Doc Action email to send a task to a user that occurs outside of the frevvo workflow. For example, an Employee OnBoarding Workflow needs the marketing team to create business cards. The workflow can simply send an email to this person to prompt them to perform that task, without needing to perform a step in the workflow. Using a screenflow you can send a second parallel email to HR asking them to add the employee information to the company contact list.
- Start a new workflow from another form or workflow. This allows you to create separate, parallel workflows that can happen simultaneously. If branching data back to the original workflow is not necessary, this design may be enough.
- If you wish to join data back to the original workflow, you can integrate our Google Connector or Database Connector with #3 above. Each separate workflow will write data to a Google Sheet or database. A rule will help determine with each submission if the data is complete. When it is complete, the next step of the original workflow reads the data from the Google Sheet or Database, effectively continuing the original workflow with data from the branched workflows.
...
Start a new workflow from another form or workflow
It is possible to "kick-off" workflow tasks for more than one user from a form. The HR or Finance person fills in the form and selects a user(s) to send the task to. A task for the workflow will appear on the Task List of the selected users.
...
Expand |
---|
- Build the Employee Review Workflow first. This is the workflow that is launched by the Employee Review Launch Form. Follow these steps:
- Create a new workflow and name it Employee Review workflow. If you want to know more about creating workflows refer to Workflow Tutorial.
- Drag and drop 4 text fields from the palette.
- Name them EmployeeID, ManagerID, FirstName, LastName respectively in the properties panel of each text control.
- You can add any additional fields you want but that is optional.
- Click Workflow to return to the Workflow Diagram. Click the first step to display it's properties.
In the Assignment tab enter {ManagerID} in the Assign to User field. Note |
---|
If assigning the first step to an email address template, you must set encode=false to prevent the "@" symbol from being encoded in your rule. The designer should use the template {EmailAddress!encode=false}. |
- Select Save & Exit from the menu at the top right.
- Copy the Share Dialog Raw Link URL for the Employee Review workflow (the workflow you want to launch for each employee) into that field. To do this:
- Go to the Forms and Workflows homepage.
- Click the Action Menu for the Employee Review Workflow and select Share.
- This will open a Share workflow wizard . Click on the Raw workflow link. Copy the URL in the left textarea. NOTE: any other share URL type will not work.
- Follow these steps to build the Employee Review Launch Form. This form will start multiple new Employee Review workflows.
- You cannot launch a workflow sent to the currently logged in user’s task list. You can only send it to another user’s task list. Make sure you are not logged into the other user’s frevvo account when running the Employee Review Launch form. This is being improved in a future release.
- Create a form named Employee Review Launch Form. To know more about creating form refer to Forms Tutorial.
- In the form drag and drop a text control from the palette.
- In the control’s properties on the left, name the control WorkflowToLaunchURL. You can enter any label you like.
- Uncheck the visible checkbox in the control’s properties to make the control hidden.
- Paste the copied URL in the Employee Review Launch Form WorkflowToLaunchURL field
- Make the following changes to the URL pasted in the field,
- Cloud customers must change http://app.frevvo.com//443/ to frevvo:// in the URL to the workflow.
- In-house customers must change the http:<domain>:<port> to frevvo:// in the URL to the workflow.
- Save the form.
Add an EmployeeID dropdown field. The HR manager will select the employees to be reviewed from this dropdown. You can either add the userId in the Options field in the properties panel of the dropdown control or fetch all the users from the tenant through business rule as below: Code Block |
---|
var event = form.load;
var Users = [];
Users = frevvo.userIds();
EmployeeID.options = Users; |
Add a ManagerID dropdown field. The HR manager selects the manager responsible for reviewing this employee. This is the task list you want the Employee Review form to be sent to. The ManagerIDs can be added through the Options property of the dropdown or fetched from the tenant through Business rules as below: Code Block |
---|
var event = form.load;
var Managers = [];
Managers = frevvo.userIds(“<Your Manager Role>");
Manager.options = Managers; |
Add text controls named FirstName & LastName. The HR manager can enter the employee’s name or they can be fetched through Visual rule builder: - Click Rules in the Guided Designer navigation bar at the top.
Click on the + icon for Create New Rule Click Run Builder Button to open the wizard On the first step enter condition EmployeeID in the first dropdown and select Is filled in the second dropdown Click Next, Select FirstName in first Dropdown, ‘to’ in the second dropdown and userFirstName() function in the third. Click Add Action in the right hand top corner. In new added line Select LastName in first Dropdown, ‘to’ in the second dropdown and userLastName() function in the third. Click Next. Add 2 Actions and set the FirstName and LastName to ‘to empty’ in the second dropdown. Click Finish. This rule will automatically populate the FirstName and LastName for the selected EmployeeID.
Add a trigger control named Launch to the form. When the trigger is clicked the form will launch a new Employee Review workflow and put the first step task on the selected Manager’s Task List. Add a Business Rule to call your Employee Review Workflow via the http.get method. The rule shown below runs when the user clicks a Launch trigger button. The rule appends frevvo _data URL parameters to initialize each Employee Review workflow. The rule allows you to trigger the workflow for a different user or role when you browse the workflow URL.
Code Block |
---|
if (Launch.clicked){
var myurl = WorkflowToLaunchURL.value;
http.get(myurl + "&_data=(EmployeeID:{EmployeeID},ManagerID:{ManagerUserId},FirstName:{FirstName},LastName:{LastName})");
} |
To test: - Open the Employee Review Launch Form. Select a user from the Employee ID dropdown. The First and Last Name fields are populated with the selected user's information. Select a Manager from the Manager ID dropdown. Click the trigger to run the rule.
- Log out. Log back in with the Manager ID you selected. Verify that an Employee Review workflow task is on the Manager's Task List.
|
In a real case scenario, it is recommended that you:
Create a separate form with all the basic information fields in it. Then add a field where the user filling in that form can add the list of users for whom he wants to start the workflow.
Create a Business Rule which uses http.get method to call your workflow URL. You will have to call this URL multiple times depending on how many users you want to create the task for. You can pass the usernames of those users and basic information data to the workflow in this URL by using _data URL parameter.
Note |
---|
If assigning the first step to an email address template, you must set encode=false to prevent the "@" symbol from being encoded in your launch rule. The designer should use the template {EmailAddress!encode=false}.
Expand |
---|
title | Expand Rule for assigning steps to emails... |
---|
| To assign the first step to an email address, follow similar steps as above. Instead of a control that collects UserIDs, have a TextArea control in your kickoff form where the user can enter multiple email addresses separated by a comma (in this example, the TextArea control is named UsersProcessed.) Write a rule like this to split the email addresses and send them as _data in the workflow kickoff URL: Code Block |
---|
var count = 0;
var i, url;
var usersProcessed;
if (TriggerFlows.clicked) {
usersProcessed = UsersProcessed.value.split(",");
for (i = 0; i < usersProcessed.length; i++) {
count++;
url = FlowTypeUrl.value + "?_method=post&embed=true&_data=(SubmitterUserId=" + usersProcessed[i] + ")";
http.get(url);
}
SuccessMessage.value = count + " tasks created";
SuccessMessage.visible = true;
} |
The rule to generate tasks will not work unless you are authenticated to frevvo when using that form. frevvo doesn’t allow you to create tasks for other users unless you are logged in. This is a security measure to prevent a a malicious user who has the link to that form from creating spam tasks. |
|
...
In some cases, a workflow needs to go backwardsbackward. Non admin Nonadmin users can accomplish this by clicking a configurable Reject button on the form/workflow where the user can select the step in the workflow to go back to. Tenant and workflow administrators use the task the frevvo task list and its built-in modify task feature to reject, reassign or abort tasks. Refer to Using the Task List for information about how these features work.
...