Live Forms v7.4 is no longer supported. Please visit Live Forms Latest for our current Cloud Release. Earlier documentation is available too.

Flow Design Patterns

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.

On This Page:

 

Screenflow (no users or roles)

A screenflow consists of workflow steps that are performed by the same user. To create a screenflow with a navigation toolbar, simply drag and drop forms from the palette into the flow. You can also drag in a New Form, edit it and create the form on the fly. Do not assign any roles to the steps as shown below. 

You can set Form and Document actions as usual. Click Finish and try the flow. 

 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 automatically enforce this constraint similar to the way forms cannot be submitted unless they are valid.

Role-based workflow

See the Patient Referral Workflow Tutorial for detailed, step-by-step instructions.

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. Once this is done, you will see the list of available roles in the properties for the step. Simply pick one or more roles as shown in the image below.

In this example, the second step can only be performed by a user with the role Doctor.

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. In this situation, do not select any role and in the User field of the step properties, enter a template e.g. {ManagerId} as shown in the image below.

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 id of the specific person that you want to route to. At run-time,  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 or by typing the user id) or preferably via a business rule that automatically pulls the information from a back end system.

You may want to route a step in a workflow to the user's manager.  provides a built-in template that is available for every transaction. Simply type the template {subject.reports.to} in the User property for that step in your flow. 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. In this situation, do not select any role from the list of available roles. In the Role text field of the step properties, enter a template e.g. {ApproveRole} as shown in the image below.

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 Order form from the first step with name ApproveRole. This control must be populated with the name of the specific role that you want to route to. At run-time,  will resolve the target role using the data in the ApproveRole control and will route the workflow to that specific role.

You can populate this control manually (via a drop down or by typing the role) or preferably via a business rule that automatically sets the role depending on criteria such as order amount.

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. In this situation, you should select the appropriate role from the list of available roles or you can use a dynamic role as described above. In addition, make sure that the Save to Role and Save/Load checkboxes are checked. You should also make sure that Save/Load is enabled for the flow 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 flow 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 workflows that you have participated in. For all such workflows, you can view its history. The history can also contain annotations e.g. a brief summary of the last action taken.

Ad hoc workflow - pass steps between arbitrary users

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 is the Reviews. However, a number of users may review the proposal in any ad-hoc order. In this situation, you should leave the roles blank and use a dynamic User as described above. In addition, make sure that the Save to User and Save/Load checkboxes are checked. You should also make sure that Save/Load is enabled for the flow as a whole.

At run-time,  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 flow 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.

Anonymous Participant

Sending a workflow step to an anonymous user ( a person who does not have an account in your tenant) is 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 review and signature.
  • a workflow that is sent to an External Vendor for a Quote.

Imagine a Purchase Order workflow consisting of three steps:

  1. Step 1 is filled out by the company sales person. The sales person is logged into for this step.
  2. 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 perform this step. The workflow is suspended until the customer performs step 2.
  3. Step 3 routes the workflow back to the sales person for continued processing. The sales person is logged into for this step.

In the flow designer:

  • Step 1 contains an Email control, named ClientEmail, where the sales person enters the customer's email address.

  • Step 2 is the Anonymous Task step.  It is configured with the {clientemail}  form field template . This step sends a task notification email to the customer's email address. The email contains a link to Step 2. When the customers clicks on the link, the flow is suspended until step 2 is completed.

  • The anonymous user receives the Task Notification email, clicks on the link and accesses the task without logging in, performs the anonymous step and clicks continue. The flow is routed back to the sales person who is an an internal, authenticated user.

    The anonymous user can click the link more than once. 

  • The step(s) following the Anonymous Task step are the ones the anonymous user sees. This step must not have values in the Role List, Role or User properties. If it did then the anonymous user would get an access denied error.

  • The email sent to the anonymous user is a Task Notification email that contains the special template {task.notify.url}. Without this, the anonymous user would not be able to access the flow.

  • The flow navigates back to the task list of an internal user when the flow reaches a step with a Role or User configuration. Step 3 in our example is assigned the role of Sales.


Refer to the Flow Tutorial for step by step instructions to create the Purchase Order workflow described above and for more information about other features available in 

Anonymous Screenflow

A screenflow is a series of 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:

  • Real Estate Listing
  • Job Application
  • Membership Renewal

You could design a long form with many fields to fill in on a single page. The user might have to scroll down to complete it. An Anonymous Task step followed by a screenflow sends an email with a link to access a series of screens to collect the information. If the Save on Navigate feature is configured, the anonymous user can complete the flow in multiple sessions. Clicking the email link in the Task Notification email takes the user back to the last submitted step.

Anonymous users can navigate to previous steps in the workflow if the Navigation toolbar is configured

 Click here to see an example

Let's consider a Job Application workflow with the following requirements:

  • The workflow is going to be performed by anonymous users. Anonymous users do not sign in to .
  • The anonymous user receives an email that includes a link to the workflow.
  • The workflow must collect a lot of information from the applicant: Contact Information, Education and Employment history, References and more. You can create one long form or design a screenflow with an Anonymous Task step and subsequent steps as separate screens to collect the information.
  • The user must have the option to compete the screenflow in multiple sessions. Clicking on the email link takes the user back to the last step in the screenflow where the Continue button was clicked. 
  • The user must be able to navigate back to previous steps to review or update information that was previously entered.
Flow Designer
  • The Save on Navigate checkbox is checked and the Navigation Toolbar is configured on the Flow Property Panel
  • Step 1 of the screenflow has a field named EmailAddress that collects the applicant's email address.
  • Step 2 is an Anonymous Task step.
  • All remaining steps in the screenflow are designed to collect the applicant's information: Contact Info, Education and Employment history, references etc. Remember, these steps cannot have a role, dynamic role or user property assigned to them.

The image shows an example of a possible screenflow design:

Use Mode

Anonymous Users can return to a previous step by clicking on the Navigation Toolbar.

Automated Step

Workflow data can be sent to an external processing system by adding a http Wait-Notify step to a flow. When the flow executes this step, it will be suspended until the external system replies.

For example, consider a Membership Renewal workflow consisting of three steps:

  1. The first step is the Membership Renewal form filled out by the member.
  2. The second Step uses http Wait-Notify to send the data to an external payment processing system. The flow suspends until that system replies.
  3. The third step sends the workflow back to a unauthenticated user in a  tenant to process the membership.

Start a new workflow from another form or flow

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.

Let's take a look at a simple example first. You want to create a form that launches an Employee Review workflow task and adds it to the employee manager's Task List. The form is executed by an HR employee when Employee Review time comes around. We will build an Employee Review Workflow and  Employee Review Launch Form  to see how this works.

 Click here for the instructions
  1. Build the Employee Review Workflow first. This is the workflow that is launched by the Employee Review Launch Form. Follow these steps:
    1. Create a new flow and name it Employee Review workflow. If you want to know more about creating flows refer to Flow Tutorial

    2. Drag and drop 4 text fields from the palette.

    3. Name them EmployeeID, ManagerID, FirstName, LastName respectively in the properties panel of each text control.

    4. You can add any additional fields you want but that is optional. Click on the  icon. It will bring you to the flow steps.

    5. Click the first step and click the settings icon  on that step.

    6. It will open the settings wizard.

    7. In the Assignment tab enter {ManagerID} in the Assign to User field.

    8. Click Submit to save and close the wizard.

    9. In the flows property panel on the left check the Task for First Step checkbox.

    10. Click on the save icon to exit the flow

  2. Follow these steps to build the Employee Review Launch Form. This form will start multiple new Employee Review workflows.

    You cannot launch a flow 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.

      

    1. Create a form named Employee Review Launch Form. To know more about creating form refer to Forms Tutorial.

    2. In the form drag and drop a text control from the palette. 

    3. In the control’s properties on the left, name the control FlowToLaunchURL. You can enter any label you like.

    4. Uncheck the visible checkbox in the control’s properties to make the control hidden. 

    5. Save the form.

    6. Copy the Share Dialog Raw Link URL for the Employee Review workflow (the flow you want to launch for each employee) into that field. To do this:

      1. Go to the Flows tab.

      2. Click the link under the Employee Review Workflow 

      3. This will open a Share flow wizard . Click on the Raw flow link. Copy the URL in the left textarea. NOTE: any other share URL type will not work.

    7. Paste the copied URL in the Employee Review Launch Form FlowToLaunchURL field

    8. Make the following changes to the URL pasted in the field,

      1. Cloud customers must change http://app.frevvo.com/443/ to frevvo:// in the URL to the workflow.

      2. In-house customers must change the http:<domain>:<port> to  frevvo:// in the URL to the flow.

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

    var event = form.load;
    var Users = [];
    Users = frevvo.userIds();
    EmployeeID.options = Users;
  4. Add a ManagerUserID 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,

    var event = form.load;
    var Managers = [];
    Managers = frevvo.userIds(“<Your Manager Role>");
    Manager.options = Managers;


  5. Add text controls named FirstName & LastName for the HR manager to enter the employee’s name or they can be fetched through Visual rule builder:

    1. Click on the + icon for Create New Rule

    2. Navigate to the new rule created and click on the to open the rule window.

    3. Click on the Run Builder Button to open the wizard

    4. On the first step enter condition EmployeeID in the first dropdown and select Is filled in the second dropdown

    5. Click Next, Select FirstName in first Dropdown, ‘to’  in the second dropdown and userFirstName() function in the third.

    6. Click Add Action in the right hand top corner.

    7. In new added line Select LastName in first Dropdown, ‘to’  in the second dropdown and userLastName() function in the third.

    8. Click Next. Add 2 Actions and set the FirstName and LastName to ‘to empty’ in the second dropdown.

    9. Click Finish

    10. The above rule will automatically populate the FirstName and LastName for the selected EmployeeID

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

  7. 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 flow for a different user or role when you browse the flow URL.

    if (Launch.clicked){
       var myurl = FlowToLaunchURL.value;
       http.get(myurl + "&_data=(EmployeeID:{EmployeeID},ManagerID:{ManagerUserId},FirstName:{FirstName},LastName:{LastName})");
    }


  8. To test:
    1. 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.
    2. 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:

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

    2. 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 flow in this URL by using  _data URL parameter 

Rejecting a step: sending it back to the original user

In some cases, a workflow needs to go backwards. Non admin users can accomplish this by clicking a configurable Reject button on the form/flow where the user can select the step in the flow to go back to. Tenant and flow administrators use the  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.