15. Test the Leave Request (Basic Version) Application
In this step you will test the Leave Request (Basic Version) application by submitting two leave requests. As the approver, you will open the workflow task form, then respond to the first request. After responding to the first request, you will open the workflow task form for the second request and confirm the list view displays correct request status. If time allows, submit several more leave requests so that you have content to administer or report against in other tutorials.
-
From the K2 Designer, submit two leave requests using the Runtime URL. The Runtime URL launches the most current version of the form published to the server. Use this link on web pages and other locations to start the Leave Request Form.
- Return to K2 Designer. Navigate to your Leave Request category. Click to highlight the Leave Request Form. From the central pane, click the Runtime URL. This will launch the most current version of the form in a web browser.
- The form opens. The Employee Name and Employee Email fields should be pre-populated with the values of the current logged-in user. Complete the remaining form fields, except the Request Status field. The workflow updates this value (using the SmartObject Method steps). Notice there are no previous leave requests just yet. Click Create.
- When the spinner disappears, the form submitted. For now, there is no formal indicator that the form submitted. You will add those features in the extended tutorial. Close the browser tab.
- Return to K2 Designer. Navigate to your Leave Request category. Click to highlight the Leave Request Form. From the central pane, click the Runtime URL. This will launch the most current version of the form in a web browser.
- As the approving manager, action the first leave request submittal. From the approving manager's mailbox, open the first task notification email, then click the Worklist Item link. The Worklist Item link opens the Workflow Task form. (Remember, that is the state you created for the approving manager's form.) Respond to the request with one of the actions (Approved or Denied). (Remember, if you are working in your own environment and assigned the task to a co-worker, ask that person to action the task for you. If you assigned the task to yourself, you can action the task.)
Next, you will access the manager's (or other person if you configured the task to route to someone else) email client to view the task notification emails.
- You should see task notification emails for each of the leave requests you submitted. Open one of the emails, then click the worklist item link to open the manager's approval form.
- Review the request details. Notice that the Workflow view has been added to the top of the form. This view contains the actions available to the approver. From the Select Action list, choose an action, the click Submit.
- You will see a generic message that the form submitted, click OK. Close the browser tab.
- You should see task notification emails for each of the leave requests you submitted. Open one of the emails, then click the worklist item link to open the manager's approval form.
-
From the manager's email client, open the second task notification email, then click the Worklist Item link. Confirm the list view at the bottom of the form displays the previous leave request. Confirm the Request Status reflects the action you took in the previous step.
- Launch a worklist item from a different email. Confirm that the Previous Leave Requests list view reflects the decision you just made.
- Launch a worklist item from a different email. Confirm that the Previous Leave Requests list view reflects the decision you just made.
Review
In this step, you tested your basic Leave Request application by submitting requests. You responded to one of the tasks as the manager. When submitting another request, you could see where the workflow updated the status property with the response value. In the next optional step, you learn how to clean your environment by deleting the application you built in this tutorial.