37. (Optional) Clean up your K2 environment by deleting the application artifacts

This optional step describes how you can clean your K2 environment by deleting the artifacts that you created in this tutorial. For example, if you are working in a shared environment, you may want to delete your tutorial applications to keep your environment clean and tidy.

Deleting artifacts (such as views, forms, SmartObjects, workflows, service instances and so on) removes them from the K2 server permanently and you cannot retrieve or restore them easily. You should only delete artifacts once you are certain that they are no longer needed. Also, once you start deleting application artifacts, other application artifacts might stop working, because they depend on the item that you just deleted.

Delete application elements for the Expense Claim list.

In this step, you delete the workflow, views, forms, and SmartObjects that you generated for the Expense Claim list.

  1. From the Expense Claim application elements page, select the Expense Claim Workflow and click Delete. You see a message that gives you the option to delete all versions and historical log data. Check both of these options and click Yes.
    1. You delete artifacts from the Expense Claim application elements page. To navigate to the application elements page, open the Expense Claim list. Click the K2 menu and Application.
    2. On the application elements page, you see a list of artifacts K2 generated when you first created the elements, plus the artifacts you added later. Begin by deleting the workflow. Select the Expense Claim Workflow and click the Delete button.
      Expense Claim Artifacts
    3. You see a confirmation message asking if you want to delete all versions and running instances, as well as historical log data. Check the box for each option and click Yes.
      Workflow Delete Confirmation
    4. It may take a few minutes for K2 to process the command. First, K2 deletes any active process instances, then it deletes all versions of the workflow. Typically, there is a new version each time you deploy the workflow, so you may have several versions to delete. The process is complete when you no longer see the workflow listed in the artifacts.
      Application Elements Page

    5. Next, you delete forms. You should delete forms before views. Select the Expense Claim Workflow Reports form and click Delete. Click Yes for the confirmation. Repeat this step and delete the remaining forms.
      Delete Forms
    6. Now, you can delete the views. Select the Task Comments view and click Delete. Click Yes for the confirmation. Repeat this step and delete the remaining views.
      Delete Views
    7. In the steps above, you deleted artifacts individually. To complete the process however, you need to delete the remaining four SmartObjects. You cannot delete the SmartObjects individually from the application elements page. This is because of the underlying associations between SmartObjects generated by K2, and associations you applied. For example, you created an association between the Expense Claim Line Item SmartObject and the Expense Claim and Expense Claim Currency SmartObjects.

    8. Click Delete All.
      You may be wondering if you can just click the Delete All button in the first place. You can! Be aware however, that you are deleting all the artifacts at one time.
      Delete All
    9. You see a confirmation message that tells you all items are removed, including categories. Click Yes.
      Confirmation Message

From the K2 Management site, delete the SQL and EndPoints service instances.

In this step, you delete the two service instances created for this application.

  1. Delete the K2 Tutorial SQL Database and K2 Tutorial Currency Web Service service instances.
    Location: Integration > Service Instances.
    1. In K2 Management, expand the Integration node. In the central pane, enter
      K2
      into the search box, then click the refresh button. This narrows the results returned. You want the two K2 Tutorial service instances.
      Delete Finance Role
    2. Select K2 Tutorial Currency Web Service and click Delete. Click OK when you see the confirmation.
      Delete Service Instance
    3. Select K2 Tutorial SQL Database and click Delete. Click OK when you see the confirmation.

Finish the clean-up by deleting the SharePoint groups, Expense Claim list, site page, and subsite.

In this step, you return to SharePoint and delete the two groups created for approving and processing expense claims. You delete the Expense Claim and finally, you delete the subsite (if you created one).

  1. In SharePoint, delete the Expense Claim Approvers and Expense Claim Processing groups. Delete the Expense Claim list and the ExpenseClaimDashboard site page. Delete the subsite (if you created one for this project).
    1. In SharePoint, open the Site Settings page, then click the People and groups link. Click the Groups heading at the top of the left column to expose all the groups in the central pane. Locate the Expense Claim Approvers group and click the Edit icon.
      Delete Expense Claim List
    2. Scroll down to the bottom of the screen and click Delete. Click OK when you see the confirmation message.
      Delete Group
    3. Repeat the steps above and delete the Expense Claim Processing group.
    4. Next, you can delete the Expense Claim list. Navigate to the list, then open List Settings. Under the Permissions and Management heading, click the Delete this list link. Click OK for the confirmation.
      Delete Expense Claim List
    5. Delete the subsite (if you created one). Contact your SharePoint administrator for instructions on deleting sites in your environment.
Summary

You have completed the Expense Claim (SharePoint) tutorial! You learned how to create a more advanced application incorporating the four primary K2 components: data, forms, workflow, reports.

Now that you have completed this tutorial, you should know:

Expense Claim Application