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.

  1. 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.
    1. 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.
      Runtime URL in Properties Pane
    2. 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.
      Sample Leave Request Extended Form
      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.
      Previous Leave Requests List View wtih new Request
    3. Submit one or more leave requests. Use any start date you choose. Close the browser tab.
  2. 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.

    Next, you will access the manager's email to view the task notification emails. Access the email account for the approving manager.

    1. You should see task notification emails for each of the leave requests you submitted. You should also see the escalation email. Open one of the emails, then click the worklist item link to open the manager's approval form.
      Task Notification Email
    2. 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 approving manager. From the Select Action list, choose Rework. Before you submit your decision, enter a few comments into the Approver Comments text area. This will let the requester know why you are sending the request back for rework. Click Submit. Close the browser tab.
      Submit A Decision
  3. 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.
    1. Now you will switch back and view the email for the requester to rework their request. Open the email client for the currently logged-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. (You most likely will need to open your own email client.)
    2. 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 the email client open for now.
  4. 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.
    1. Switch back to the managers email client. 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.
    2. Switch back to Administrator's email client. 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 environment by deleting unused artifacts.

Next Step: 13. (Optional) Clean up your environment by deleting the application artifacts