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.

  1. From the K2 Designer, submit two leave requests using the Runtime URL. The Runtime URL launches the most current version of the form that was published to the K2 server. Use this link on web pages and other locations to launch the Leave Request Form.
    1. 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.
      Runtime URL in Properties Pane
    2. The form opens. The Employee Name and Employee Email fields should be pre-populated with the values of the currently 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.
      Sample Leave Request Basic Form
    3. 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.
      Spinner Graphic While Form Submits
  2. 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).

    Next, you will access the manager's Outlook 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 Outlook account for your manager (or other person if you configured the task to route to someone else).

    1. If using a K2-provided VM, close all open browser windows. Click the User Shortcuts arrows found in the lower-right corner of the screen. Expand the Legal folder. Click IE (Jonno).
      Selecting Jonno From User Shortcuts
    2. Click the OWA (Outlook Web Access) link in the Favorites bar.
      The OWA Link
    3. When OWA launches, enter Jonno's login credentials.
      Domain\user nameDenallix\Jonno
      Password: K2pass!
      then click sign in.
      Sign In To OWA
    4. If you see Outlook settings such as Language and Time zone, select the Pacific time zone, then click Save.
    5. 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.
      Task Notification Email
    6. 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 approver. From the Select Action list, choose an action, the click Submit.
      Submit A Decision
    7. You will see a generic message the that form submitted, click OK. Close the browser tab.
  3. From the manager's mailbox, 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.
    1. Launch a worklist item from a different email. Confirm that the Previous Leave Requests list view reflects the decision you just made.
      Updated Previous Leave Requests
Summary

If everything worked as you expected: congratulations! 

Having completed this tutorial, you learned about three main K2 application components: data, forms and workflow. At this point, you should have a basic understanding of how to build SmartObjects, views, forms and workflows, and how to combine them together in the context of a workflow-centric application.