Section | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
...
- Click the Manage Users link.
- In the Alphabet at the top click All to display a list of the users in the tenant. Follow steps 4 - 7 to create four users:
- For each user, click the icon to add a new user profile.
- In the form that's displayed, fill in the information for each user.
- Assign the frevvo. designer role for one user, the Reviewer role for the next user, the Supervisor role for the third user and the Accounting role for the last user.
- Select the user's Reviewer from the Reports To drop down for the designer user. Make sure you select the user id for your user with the Reviewer role.
- Be sure to enter a valid email address that you can access when you are testing the flow.
- Click "Submit" to add the user.
Step 1: Download/Upload the Approval Forms/Workflow Application
Download the Approval Forms/Workflow application the partially created Expense Report flow to somewhere on your hard drive. The Download link is not active at this time but it will be functional when v5.3.1 is released on May, 2014. Until then, we can provide you access to a demo server and the Approval Forms/Workflow application. Please contact us if you would like access.
- Login to as a designer user in your tenant.
- Click the Upload button on the Application Home page. Browse to the location of the Approval Forms/Workflow application on your hard drive. Click Upload.
- The Approval Forms/workflow application will be added to the Application home page.
Step 2: Create the Workflow
In this step, we will complete ccreate the Expense Report workflow.
Click the Edit button for the Approval Forms/Workflows application on the Application Home page.
Click the Flows tab and then click Edit for the Expense Report flow:
At this time, the Expense Report flow only contains the form named Expenses. The Expense report form was created using simple visual drag & drop and edited to achieve the desired layout. To view the form, click the icon on the flow designer toolbar.
There are sections in this form for the Reviewer, Supervisor and Accounting approvals. A business rule controls when these sections are shown/hidden as the flow progresses. For Example, when the employee is filling out the Expense Report, the Reviewer, Supervisor and Accounting sections are hidden.
Expand title Click here for more information on these rules.This section will expand/collapse by clicking on the arrow. Column width 30%The simple business rule shown below controls when these sections are shown/hidden as the flow progresses. Code Block if (form.load) { ReviewerApproval.visible = false; SupervisorApproval.visible = false; AccountsPayableOnly.visible = false; var an = _data.getParameter ("flow.activity.name"); if (an === 'Reviewer') { ReviewerApproval.visible = true; } if (an === 'Supervisor') { ReviewerApproval.visible = true; SupervisorApproval.visible = true; } if (an === 'Accounting') { ReviewerApproval.visible = true; AccountsPayableOnly.visible = true; if (GrandTotal.value > 1000) { SupervisorApproval.visible = true; } } }
Column width 70% Rules will be even easier to implement in a future release of .
Other Business Rules autofill the Report Date, employee information and the Reviewer name using the credentials of the user who is logged in. Another rule enables/disables the Miles Travelled field based on a selection from the Category dropdown. There is a rule to calculate the mileage and a separate rule to calculate the expense report grand total.
Expand title Click here for more information on these rules.This section will expand/collapse by clicking on the arrow. This rule populates the Report Date field with the current date when the form loads:
Code Block if (form.load) { ReportDate.value = DateUtil.today(); }
This rule autofills the First Name and Last Name controls using the credentials of the user who is logged in. The Reviewer for the user filling out the Expense Report comes from the "subject.reports.to" field on the Add/Edit users screen.
Code Block if (form.load && EmployeeName.value.length === 0) { EmployeeName.value = _data.getParameter('subject.first.name') + ' ' + _data.getParameter('subject.last.name'); Reviewer.value = _data.getParameter("subject.reports.to"); }
This rule enable/disables the Miles Travelled field based on a selection from the Category dropdown. The Miles Travelled control will only be enable for user input when "MIleage" is selected as the Category dropdown choice. Otherwise, the user cannot enter data into the Miles travelled control.
Code Block for (var i = 0; i < Category.value.length; i++) { if (Category[i].value == "Mileage") { MilesTraveled[i].enabled = true; } else { MilesTraveled[i].enabled = false; } }
This rule calculates the mileage for each row in the Expenses Table:
Code Block for (var i = 0; i < MilesTraveled.value.length; i++) { if (MilesTraveled[i].value > 0) { Amount[i].value = MilesTraveled[i].value * IRSMileageRate.value; } }
There rule adds the amount for each row in the table to calculate the Expense Report Grand Total.
Code Block var tot = 0; for (var i = 0; i < Amount.value.length; i++) { tot = tot + Amount[i].value; } GrandTotal.value = tot; if (ExpenseRepeat.itemRemoved) {var x;}
Using the Linked Forms Feature of the flow designer, we can add a linked version of the parent form, Expenses, for each of the remaining steps in the flow. Click the Link icon three times to create three linked forms.
Click on the second activity in the flow. Change the name to Reviewer, by typing it in the name field on the left Activity Property pane. Rename the third activity in the flow, Supervisor and the last activity Accounting.
Click the icon to save the flow.
...
Step 4: Add a Precondition for the Supervisor Step
Preconditions are used to add logic to your flow to skip or perform a step when the condition is true. Add a precondition on the Supervisor step that will route the workflow to the Supervisor only if the Grand Total of the Expense Report is greater than $1000.00. If the amount of the workflow is less than $1000.00, the workflow will skip this step and route the task to the Accounting step.
...
Follow the steps below to add some examples to the Expense Report flow
- Click the Edit icon to return to the Expense Report flow.
Section | ||||
---|---|---|---|---|
|
...
Share URL: Click the Share icon for the workflow on the Flows Home Page and select the third option: Link (Email/Web page). Copy this link and paste it into a different browser. will display the login screen. Continue with the Employee Submission section below:
Spaces: A space is a frevvo website that can be used to test the Expense Report flow. It is very easy to create and add your forms and workflows 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 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 your designer user.
- Your space will look similar to the image below.
...
includes a built-in Task List for every user. To Login as jerry who has the role of Reviewer. To access your Task List, login and click on the Tasks menu item on the left . This will display any or if using a space, click the Important Items tab and then Task List. Tasks that are pending in your inboxinbox will display. You can perform a task, modify them (abort or route to a different person) and view the history (audit trail) of a particular workflow.
Login as jerry who has the role of Reviewer. Click on the Task List. He Jerry will see any pending Expense Report approvals submitted by any of the employees he manages . Click the Perform this Task icon for the task submitted by Tom Cat.
...
Enter comments and sign the section. Click Continue. LogoutIf you customized your pending messages as suggested above, the Reviewer will see "PM3: This request requires extra approval and has been sent to the Supervisor". Logout. Since the Grand Total of the Expense Report is greater than $1000.00, the workflow will be routed to the Supervisor for an added approval.
...
Login as a Supervisor. Click on the Task List or if using a space, click the Important Items tab and then Task List. Click the Perform this Task icon for the task submitted by Jerry Mouse. The Supervisor will see the Expense Report data, the Reviewer's approval and the Supervisor approval section.
Enter a comment and sign the section. Click Continue. Logoff. The Supervisor will see this message if you customized your pending messages as described above: "PM4: Your request has been sent to Accounting for payment." Logoff.
Accounting Final Processing
Login as a user with the Accounting role. Click on the Task List or if testing with a space, click the Important Items tab then Task List. Click the Perform this Task icon for the task submitted by the Supervisor. The accounting employee will see the Expense Report data, the Reviewer and Supervisor approvals and the accounting section for final processing.
Fill in and sign the Accounting section. Click Finish to complete the workflow. The Accounting user should see the message "Expense Report Processing for {emloyeename} is complete." Logoff.
Run the Expense Report workflow with a Grand Total that is less than $1000.00. Verify that the Supervisor step is skipped.
...