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. If you are working on a K2-provided VM, you are likely logged in as Denallix Administrator. Administrator's manager is Jonno, so you will open Jonno's Outlook. If you are working in your own environment, access the email account for the approving manager. The screen shots and instructions below reflect a K2 VM environment.

    1. Click the User Shortcuts arrows found in the lower-right corner of the screen. Expand the Legal folder. Click IE (Jonno).
      User Shortcuts on a K2-Provided VM
    2. Click the OWA (Outlook Web Access) link in the Favorites bar.
      Accessing Outlook Web Access from the Favorites Bar
    3. When OWA launches, enter Jonno's login credentials.
      Domain\user name:Denallix\Jonno
      Password: K2pass!
      then click sign in.
      Sign In To OWA
    4. 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
    5. Review the request details. Notice that K2 has added the Workflow view 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 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.)
    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 Outlook 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 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.
    2. Switch back to Administrator's Outlook. Confirm the final email arrived and it reflects the correct decision made by the manager.
Summary

Having completed this tutorial, you should know how to perform some more advanced application building tasks with K2, such as integrating with external systems and showing that data on a SmartForm, adding more advanced workflow functionality like rework loops and reminders, and configuring rules on forms to allow the form to behave differently depending on the form state.