Adding workflow Stages to a form
Leap uses Stages to add workflow to your form. Workflow describes various lifecycle steps that are associated with the form. Defining multiple connected Stages creates the workflow, where each stage defines its own form behavior, access rights, and navigation steps. In this tutorial, define the workflow steps that are required for the approval of the form.
- The behavior of the form while it is in a stage, including what portions of the form are visible or read only.
- The flow of the form, determining navigation between stages. For example, a form goes to a manager for general expense approval, but to another manager if the amount of the expense exceeds a predefined amount.
- Who has access to the form while the form is in that stage.
- Go to the Workflow tab.
- Add new stages and modify various stage properties.
- Make form items read-only in a specific stage.
- Make form pages read-only and hidden in specific stages.
- Set navigation between stages to create a workflow.
Adding Stages to your form
The workflow for this form is summarized as follows: The user accesses the form in the Start stage. When the user submits the form, it goes to the Awaiting Approval stage, where an approver can either accept or reject the Expense Report. If the reviewer accepts the Expense Report, the form goes to the Accepted stage. If the reviewer rejects the Expense Report, the form goes to the Approval Request stage so the submitter can make corrections and resubmit.
Procedure
-
Click the Workflow tab.
The view is made of the diagram canvas and the properties side panel.
-
In the Start stage, the user who enters data into the form does not need
to see the Approval page. To ensure that the user cannot find their way to
that page, hide it from view. Click the Visibility button at the top of
the screen, then in the side panel, click the Hide icon for the Approval page.
The Approval page is hidden from view when the form user first submits the form.Note: The hidden or read-only status applies to a form item in a particular stage. If you add another stage, the hidden or read-only status does not carry forward to the new stage. -
The user does not need to see the page navigation buttons
to the Approval page. Hide them by clicking
the Expenses page.
-
Create a stage to add the Approval page
that is created in the previous section. Click the Add
a new stage icon while the Start stage
is in focus.
A new stage is inserted after the Start stage and before the Submitted stage.
-
Click the label “Stage n” to change the name of the stage to “Approval Request”.
This stage allows users to open the form again and edit the expense report if it is rejected by an approver.
-
Click on the Visibility button at the top of the screen.
Set the Approval page to read-only by clicking on the lock icon with the “Approval Request” stage selected.
You want the user to see the comments that are written by the reviewer, but do not want the user to be able to modify the choices that are set by the reviewer.
-
Add another stage, and title it Awaiting Approval.
The form progresses to this stage after the user submits it.
- In the Visibility View, set the Basic Information and Expenses pages to be read-only.
- At the end of the form, Submit and Cancel buttons are automatically added. Click the Add Action icon, and add another Submit button.
-
Click the Submit action on the diagram, or with the stage
selected click the Edit Properties icon for the Submit button. Change the title
to Accept.
So users know whether their Expense Reports were accepted or rejected, send them an email.
-
With the stage selected, click the label for the second
Submit button and change the title to “Decline”.
- Go to the Approval Request stage. Set which stage the button activates by clicking on the submit button on the diagram and in the Properties side panel change the Next Stage to “Awaiting Approval”.
- In the Visibility view, click the “Approval Request” stage and then click the lock icon next to the page to make it read-only in this stage.
-
Click the Start stage. Click the Edit Properties icon for Submit.
- Change the Action Completion Message: to read: Your data was submitted and will be reviewed soon.
- Change the Next Stage to “Approval Request”.
-
Save your application.
When the user completes and submits the form, it is sent to an approver for review.
Results
When the user submits the form, it goes from the Start to the Awaiting Approval stage. If the approver accepts, the form is sent to the End stage, and the workflow is complete. If the approver rejects the Expense Report, it is sent to the Approval Request stage so the user can fix errors and resubmit.
If the approver rejects the Expense Report, the form is sent to this stage so the user can open the form, change it, and resubmit. When the user submits the corrected form, it goes to the Awaiting Approval stage again.
Optional: Applying conditional workflow to the form
There is a rule on the form that states any expense reimbursement must be approved by a reviewer. However, you can create a stage in the workflow to request special approval for amounts larger than $2000.
Procedure
-
In the Workflow tab, create a stage
and title it Special Approval.
- Click “+ Add Action” in the properties side panel or hover over the stage card in the diagram and click the “+” to create a second submit button.
-
Click the Edit Properties icon for new Submit button.
The rule states that the button is hidden if the expense amount claimed is less than $2000. Now set the opposite rule on the first submit button.
-
Click Add Rule.
The conditional workflow is set. In the next section, add access control to each stage so the Approval Request stage is set to one set of reviewers, while the Special Approval stage is set to another set of reviewers.
- Save the form.