13. Test the Site Requests Application

In this step, you test your new application by submitting two site requests. The Site Requests Workflow starts each time you add a new item to the Site Requests list. As the assigned task recipient (originator), you respond to the requests, approving both. After you approve the requests, the workflow assigns the second task to you - keep or delete the site (again, as originator). Here, you delete one site, then observe how the Site Requests list updates with the deleted site values.

  1. Add two new items to the Site Requests list. Complete the Title and Description fields (only) as the workflow updates the remaining fields. Use the table below for reference if needed.
    TitleDescription
    First Test SiteThis is the first test site.
    Second Test SiteThis is the second test site.
    1. Begin by adding two new items to the Site Requests list. You only need to complete the Title and Description fields, as the workflow updates the remaining fields. Use the table below for reference. (In a later step, you remove the unused fields from the form.)
      TitleDescription
      First Test SiteThis is the first test site.
      Second Test SiteThis is the second test site.
      New List Item
    2. Behind the scenes, a workflow instance starts for each item you added. Refresh the page. Remember that the first step in your workflow is an Update List Item, which sets the Site Status value to pending. (You can use the pending status as a confirmation the workflow started.)
      Site Status Pending

  2. The next step is to approve the site requests. Approve both requests using any of the following methods:
    • K2 Workspace: Action the task from the Inbox.
    • Task notification email: Reply to the email with your decision.
    • Workflow view: Open the form from the worklist link in the email, then submit the form with your decision.
    1. For this tutorial, you use K2 Workspace to action the tasks assigned to you. Launch K2 Workspace.
      If you do not know how to access K2 Workspace, see Accessing K2 Sites.
    2. Click the Inbox to open the list of tasks currently assigned to you.
      K2 Workspace Inbox
    3. Notice the two tasks titled Approve Site Request. Click the First Test Site task to open the form on the right side of your screen.
    4. You see the details entered for the First Test Site request. Notice you cannot change any of the values in the Display Site Requests form, since the display form is read-only. In the Workflow section, select Approved for the action and click Submit. Click OK for the confirmation dialog.
      K2 adds the Workflow view to the form when you configure a Task step to use SmartForms. This view displays the instructions you entered for the task, along with the actions you configured (Approved, Rejected).
      Action Approve Site Request Task
    5. Refresh the Inbox by clicking the icon at the bottom of the column. Notice the First Test Site - Approve Site Request task no longer appears since you have actioned it. Now you see the Keep or Delete Site task. This is the second task step configured, where you must decide to keep or delete the new site.
      Refresh Task List
    6. Select the Second Test Site - Approve Site Request task to open the form on the right side of your screen. Select Approved and submit the form. Click OK when you see the confirmation dialog.
      Approve Second Site Request
  3. From the Site Requests lists, open the newly-created sites and review the Site Settings to confirm the Title and Description are correct.
    1. Return to the Site Requests list. Notice the list now contains updated values in the Site Status column and there are values in the Link to Site and Site Created On columns as well. Click the Link to Site link for the First Test Site list item.
      Link to Site
    2. Open the Site information dialog for the new site. You should see the correct "first site" data displayed.
      Site Information
  4. From K2 Workspace, open the form for the Second Test Site - Keep or Delete Site. Select Delete Site and submit the form. Review the Site Requests list and how it updates after you delete a site.
    1. From K2 Workspace, open the form for the First Test Site - Keep or Delete Site task. Select Delete Site and submit the form. Click OK for the confirmation dialog.
      K2 Workspace Workflow Form
    2. Return to the Site Requests list. Review the Site Status and Link to Site values. The Site Status should show the site deleted and the Link to Site should be empty.
      Site Requests List
Review

In this step, you tested the Site Requests application. You observed how the Site Requests Workflow started each time you added a new list item. After approving the site request, K2 created a new site. After deleting the site, K2 updated the SharePoint list reflecting the site no longer exists. If everything worked as expected, congratulations on building a site provisioning solution! In the next step, you will view the standard reports K2 generates for SharePoint applications.

Next Step: 14. (Optional) Report on the Site Request Application