12. Test the Leave Request (Extended Version) Application
Now we are ready to test the Leave Request (Extended Version) Application by submitting two new leave requests. After you submit the requests, you will access the approving manager's email. From the task notification email the manager's receives, you will open the request form, then select "Rework" for your decision. From the requester's email, you will open the rework task notification email, then resubmit the request. The last steps will be to either approve or deny the request, once again as the approving manager, then confirm the decision notification email reflects the correct decision.
-
Using the Runtime URL, submit two Leave Request Forms. Make the Leave Start Date for one of the requests today's date. This will fire off the reminder since you have it configured to start within two days of the Leave Start Date. You should see two email notifications, one being the task notification email and the second being the reminder email.
- Return to K2 Designer. Click to highlight the Leave Request Form. From the properties pane, click the Runtime URL. This will launch the form in a web browser. Remember too, this is the external link to the Leave Request Form. Use this link on web pages or emails to provide access to this form.
- You should see some leave requests in the Previous Leave Requests list view from testing the Leave Request Basic application. Complete the form fields, making sure that the Leave Start Date is today. This fires off the reminder email, which you will see later. Confirm that you cannot edit the Approver Comments text area. This control is read-only for the requester. Click Create.
When the form submits, the form fields should clear out and the Employee Name and Employee Email values should repopulate. The leave request you submitted should appear in the Previous Leave Requests list view.
- Submit one or more leave requests. Use any start date you choose. Close the browser tab.
-
Access the approving manager's email and using the Worklist Item link, open the approval form. Select Rework for the action and submit the form. For this test, you will send the request back to the leave requester, who must resubmit or cancel the request.
-
Access the requester's email and using the Worklist Item link, open the form. Edit the form entry in any manner you like, then resubmit it.
- Now you will switch back and view the email for the requester to rework their request. Open Outlook for the currently loggged-in user. Confirm there is a Rework task notification email for the user that submitted the leave request. Click the Click to open worklist item link so that you can open and edit your original request. (Remember if you are working in your own environment, you most likely will need to open your own Outlook.)
- Make a change of some kind to your form entries. Select Resubmit from the Action options and click Submit. You should see a confirmation dialog, click OK. Keep Outlook open for now.
-
Access the approving manager's email and using the Worklist Item link, open the approval form. Add some comments in the Approver Comments text area box, then select either Approved or Denied and submit your decision. From the requester's email, confirm the email notification you receive contains the correct decision.
- Switch back to the managers Outlook (in a K2-provided environment this should be Jonno). Once again, you should see a new task notification email. This time, you will respond using SmartActions. Reply to the email with either Approved or Denied as the message body. Send the email.
- Switch back to Administrator's Outlook. Confirm the final email arrived and it reflects the correct decision made by the manager.
Review
In this step, you tested your extended version of the Leave Request application. You learned how you can add properties to existing SmartObjects, then use those properties as view controls. You learned how to use a data source for drop-down list values, and finally, you learned how to implement a rework loop to your workflow. In the next optional step, you learn how you can clean your K2 environment by deleting unused artifacts.