Live Forms v5.3 is no longer supported. Click here for information about upgrading to our latest GA Release.
Getting Started with Flows
This guide takes you through the process of creating a Leave Approval workflow using the Leave Approval form created in the Getting Started with Forms tutorial.
A common example of a workflow is a Leave Approval workflow, where an Employee requests vacation and the Manager must either approve it, reject it or send it back to the Employee for corrections. Typically, the process is paper or email-based. The Employee fills out a paper form and hands it to the Manager for a signature. The form is then faxed or delivered to HR where it is saved in a folder or scanned into the HR or document management system.
Using Live Forms, you can automate this workflow so that it is completely electronic and paperless. Further, you can integrate the workflow with Google Apps, a document management system such as Digitech ImageSilo/PVE, your database or custom business system so that the leave approvals are stored online.
The steps for the Leave Approval workflow are as shown in the figure:
- The Employee goes to a web page that embeds the workflow. Live Forms makes this very easy to do.
- The form is configured so that the Employee only sees the relevant portion of the form, i.e. the Employee does not see the Manager approval section or the HR Review section. The Employee information and Manager id are automatically populated by .
- The Employee fills in the form, digitally signs it and clicks a Submit Request button.
- puts the leave approval request on the specific Manager's task list, [optionally] notifies the Manager by email and displays a confirmation message to the Employee.
- The Manager logs in, and visits a web page that displays an electronic task list.
- All pending leave approval requests will be displayed in the task list.
- The Manager clicks to perform an approval. The Manager-specific portions of the form are now visible. The data entered by the Employee is automatically populated for the Manager to review.
- If the Manager requires corrections, the form can be sent back to the Employee to make changes.
- Once approved, the manager digitally signs the form and clicks Submit Request.
- In the final step, the workflow is sent to the HR department to update records and/or comments.
On This Page:
Live Forms In-house Only
If you are using Live Forms In-house software installed locally on your own machine, then the 1st step is to login as the admin user and create your 1st tenant. Follow the steps below:
- Login as admin@d and type in the default password: admin.
- Click Manage Tenants.
- Click the icon to create a new tenant
4. Do not check the "Are you creating a tenant for Confluence" checkbox. Leave the Max Concurrent Users and the Security Manager Class blank.
5. Fill in the rest of the fields for your tenant. Click Submit.
Live Forms In-house and Online
The next steps are for both Live Forms In-house and Online tenant users:
- Login as the tenant admin user. An example of the tenant admin user id is: admin@mycompany.
- Each tenant has it's own admin user that has permission to create new users, roles and perform other management functions for the tenant. For Live Forms In-house software users it is important to note the distinction between the frevvo admin user and the tenant admin user. Next we need to create a few users and roles in this tenant that we'll use in our Leave Approval workflow..
Setup users and roles
This is a one-time setup that will have to be performed by an administrator.
We will need to create three roles for the Leave Approval workflow:
- Click Manage Roles. Notice that the role frevvo.designer already exist by default and cannot be deleted.
- Click the icon to create a new role. Add the role name "Employee" and click Submit
- Repeat step 2 to add the "Manager" and "HR" roles.
- Click the Back to Manage Tenant link.
- Click Manage Users. Notice that the user admin already exists by default and cannot be deleted.
- Click the icon each time to create a new user.
- Add the user named "jerry" and assign jerry the role Manager. Remember to click submit for each one.
- Add the user named "tom". Do not assign a role for tom. Since jerry is tom's manager, select jerry from the dropdown list in the Reports to field.
- Add the user sue and assign sue the role of HR.
- Add the user named "designer" and assign the special role of frevvo.designer
- Logoff as the tenant admin.
- You now have your tenant setup and ready to create and test a simple Leave Approval workflow.
Creating the Leave Approval Workflow
- Logon to your tenant as the designer.
- Click the Edit icon for the My Company HR application.
- Click the Flows menu item to open the Flow designer.
- Click the New icon to create a new flow. Change the name of the flow to Leave Approval Workflow. Check the Save PDF checkbox so that a pdf image of the flow is saved in the submission repository.
- If you completed the Getting Started with Forms exercise, you should have a Leave Approval Form listed in the palette. Drag and drop the Leave Approval form into the flow. This creates the first step (activity) in the workflow. Name the activity 'Employee' by typing the name in the Name property.
- In our example, we will use the same form three times, once for the Employee, Manager and HR. Select the Employee activity and click the icon twice. This will create two linked activities. A linked activity refers to the same form as the original activity. The form cannot be edited from the linked activity but any edits made to the original form are reflected in the linked activites.
- Name the second activity Manager and the third activity HR.
Setup the steps in your workflow
- Click on the Employee step. Leave the role dropdown blank so anyone that logs into the tenant can perform step 1.
- Change the text of the Submit Button label by typing it in the Button Label field. Ex: Send to Manager
- Assign the role of Manager to the second step.
- Add a customized message in the Pending Message field. Tom will see this message when he clicks the Send to Manager button. Ex: Your request has been forwarded to your manager for approval.
- Add some text in the Task Info field so manager Jerry can identify the task when he sees it on the Task List. You can use a template in the message. A template is a control in your form encased in curly brackets. will resolve the template at runtime and replace the field in the Task Info with the data that is entered into it. If you want to use the workflow for more than one employee, enter Leave Approval for {EmployeeName} in the Task Info field so the approving manager will know who the request is for when it appears on their task list.
- Change the button label to Send to HR. Manager Jerry will click on this button to send the workflow to the HR department.
- For the third activity, set the role to HR.
- Enter "Leave Approval for {EmployeelName}" in the Task Info field.
- Enter a Pending Message that Jerry will see when he clicks the Send to HR button. Ex: The Leave Approval for {EmployeeName} has been forwarded to HR.
- You can customize the message the HR user will see when the workflow is completed.
- Click on the Form Action icon in the tool bar.
- Click on the Display Message wizard.
- Enter your customized message
- Click the save and exit icon to save the work your have done so far.
Make Changes to the Leave Approval Form
You can edit a form in the Flow designer as well as the Forms designer.
Be aware that changes made to a form in the Flow designer are not reflected in the original form in the Forms designer. If you want your changes reflected in both designers, make the changes in the original form in the Forms designer, then replace the updated form in your workflow in the Flow designer.
Let's make some changes to the Leave Approval form so we can add a rule to prefill the user name, id, email address and manager's name on each step of our flow. Follow these steps:
- Click the Edit icon on the Employee Activity in the Leave Approval Workflow. This launches the Leave Approval Form in the form designer so you can edit the it.
- Change the label of the First Name control to Employee Name. Change the Name of the First Name control to EmployeeName (no space).
- Change the label of the Last Name field to Employee Id.
- Change the Name of the Last name field to EmployeeId.
- Make sure that the Name field of each control is properly set. This is a critical step to ensure that business rules work. The controls are named as shown in the table below. Make sure that the Control Name field is exactly as shown below including case-sensitivity.
- Uncheck the Enabled checkbox for each control and check the Required checkbox. The control values will be automatically filled in by a business rule.
Control Label | Control Name | Description |
---|---|---|
Employee Name | EmployeeName | the current user's full name |
Employee Id | EmployeeId | the login id of the current user |
Manager Id | ManagerId | the login id of the current user's manager |
Employee Email | EmployeeEmail | the current user's email address |
Add the Manager Approval Section
- Drag and drop a Section control below the Leave Approval Request section. Name the section Manager Approval.
- Drag a text field from the palette and drop it in the section. Type Manager Name as the label and ManagerName as the control name.
- Click on the Style tab and change the width to 6 columns on the grid.
- Drop an Email control the the right of the Manager Name control. Type Manager Email as the label and ManagerEmail as the control name.
- Add a text area control with 3 lines and name the control Comments.
- Select the section by clicking on its header.
- In the properties panel, select the Security Tab.
- In the Roles multi-select, select the roles Manager and HR by holding down the shift key and clicking. This section will only be visible to the Manager and to the subsequent HR reviewer.
- Select Wet signature from the signature dropdown. Check the Must Sign checkbox to require a signature and verify that the Lock checkbox is checked to prevent tampering with the signed data .
Add the HR Section
- Drag and drop a Section control below the Manager Approval section. Name the section HR.
- Drag and drop a text control into the HR section. Type HR Name for the label and HRName as the control name.
- Click on the Style tab and change the width to 6 columns on the grid.
- Drag and drop another text control to the right of the HR Name field in the HR section. Type HR Email for the label and HREmail as the control name.
- As before, in the Security Tab, select the HR role to restrict viewing of this section to HR Employees.
- Select Text/Signature Image from the Signature dropdown and check the Must Sign checkbox to make the signature required.
Add Another Business Rule
Add a rule that will populate the Employee Name, user id, email and manager when the form loads, the manager name and email if the flow is on the Manager Approval step and the HR employee's name and email when the flow is on the HR step.
It is very important to ensure that the Names of the controls in the form exactly match the names used in the rule below and that the names used in a rule are unique across the form.
- Click the rules icon in the flow designer toolbar.
- Click the plus icon to add a rule.
Name the rule Initialize Fields for Employee, Manager and HR Steps.
Copy/Paste the rule below into the rule box.
if (form.load) { var an = _data.getParameter ("flow.activity.name"); if (an === 'Employee') { EmployeeId.value = _data.getParameter('subject.id'); EmployeeName.value = SubjectUtil.getFullName(_data.getParameter ('subject.first.name'), _data.getParameter ('subject.last.name')); EmployeeEmail.value = _data.getParameter('subject.email'); ManagerId.value = _data.getParameter('subject.reports.to' ); } else if (an === 'Manager') { ManagerName.value = SubjectUtil.getFullName(_data.getParameter ('subject.first.name'), _data.getParameter ('subject.last.name')); ManagerEmail.value = _data.getParameter('subject.email'); } else if (an === 'HR') { HRName.value = SubjectUtil.getFullName(_data.getParameter ('subject.first.name'), _data.getParameter ('subject.last.name')); HREmail.value = _data.getParameter('subject.email'); } }
Click the save and exit icon to save the rule.
- Click the save and exit icon to save the workflow.
Testing the Leave Approval Workflow
A great way to test your flow is to use a space. A space is a frevvo website that is very easy to create. Your deployed forms/workflows are automatically added to it. Follow these steps to create the space:
- Ensure the visibility of your Expense Report flow is set to public and that it is deployed to production:
- Click on the Spaces Tab. Click the icon. Enter an id and name for your space. Click Create.
- Click the Edit icon. Click on the Space Home page.
- Click the icon to hide the left panel.
- Click the save and exit icon to save the changes to your space.
- Click the Share icon. Copy the share url for your space then logoff .
- Paste the space url into another browser or a new tab of the browser you are using. Login as tom@<your tenant name>. automatically makes your application a tab on the space menu and your Leave Approval Workflow an option on the menu under the tab. Your space should look something like this:
- Click on the tab for your application and then click on the Leave Approval workflow. This brings you to the first step in your flow. The workflow automatically has a navigation bar to indicate which step you are currently in as well as the next steps that are coming.
- Fill in the fields in the 1st step, remember to sign and click the Send to Manager button to route the workflow to the next step - manager approval.
- Tom should see the cusotmized pending message that you set up on the manager activity in the workflow.
- Logout of your space then login to the space as the manager jerry - jerry@<your tenant>.
- Click on the Important Items tab, then click the Task List. Jerry will see the pending Leave Approval request from Tom. Note the Task information that we set up on step 2 of the flow using the template - Leave Approval for {EmployeeName}
- Click the Perform icon to display the task. Notice Manager Jerry sees the Employee Information section filled in by Tom and the Manager Approval section so he can approve or reject the request.
- The manager name and email fields are populated by our business rule.
- Add a comment and sign the section.
- Click the customized Send to HR button. The pending message that you set up on the HR step of the workflow displays.
- Logout of your space and login as sue@<your tenant>.
- Click on the Important Items tab and then on the Task List. The pending task for the HR department displays. Note Sue, the HR employee, sees the Employee Information section, the Manager Approval section and the HR section.
- Click the Finish button to complete the workflow. The flow's configured form action message displays.
- Logout of your space.
Related Topics
- Read the general documentation on designing flows for a detailed discussion of workflows and their features
- See the /wiki/spaces/frevvo53/pages/841646163 for the details about integrating with Google Apps or ImageSilo/PVE to save your workflow.
- Like forms, a workflow has three accessibility states. See making forms/flows public for more details.
- Like forms, a flows's doc and form actions are configurable. Go back into the frevvo flow designer for one of your flows to use the Form Action and Doc Action buttons. See submitting your form for more details.
Flows can be custom styled to fit the look & feel of your existing web site. See Layouts and Styles.
Refer to Flow Examples for step by step instructions for designing a real useful workflows, such as an Expense Report, Leave Approval or Vendor Quote workflow.
See the Business Rules chapter for the details and examples of how to add behaviors to your forms/flows.
- Make your forms/flows more interactive by using templates.