16. (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 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 Site Requests list.

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

  1. From the Site Requests application elements page, select the Site Requests Workflow and click Delete. You see a message that gives you the options to delete all versions and historical log data. Check both of these options and click Yes.
    1. Delete artifacts from the K2 Application elements page. Click Application in the K2 menu to open the application page.
      Delete Workflow
    2. The K2 Application page contains a list of all the artifacts for the Site Requests application. Notice the Site Requests Attachments SmartObject. This is specific to SharePoint applications and contains any attachments you add to the workflow forms. K2 adds this SmartObject and associated views and forms when you generate artifacts from a list or library. To clean your environment, begin by deleting the workflow. Select the Site Requests Workflow and click the Delete button.
      Site Requests 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, depending on how many times you deployed the workflow.
      Application Elements Page

    5. Next, you delete all the forms. (You must delete forms before views.) Select the Site Requests Workflow Reports form and click Delete. Click Yes for the confirmation. Repeat this step and delete the remaining forms.
      Delete Forms
    6. Select the Site Requests Workflow Reports 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, you need to delete the two SmartObjects. You cannot delete the SmartObjects individually from the application elements page. Click Delete All. (You could click this button in the first place if your intention is removing the entire application artifacts.)
      Delete All
    8. You see a confirmation message that tells you all items are removed, including categories. Click Yes.
      Confirmation Message

Finish the clean-up by deleting the SharePoint list and subsite.

You've deleted the K2 artifacts for the application (workflow, forms, views, SmartObjects). For a complete scrub of the application, delete the Site Requests list and your subsite (if you created one).

  1. Delete the Site Requests list and subsite (if you created one).
    1. Navigate to the Site Requests (list) > List Settings page.
      List Settings Page
    2. Under Permissions and Management, click Delete this list, then OK for the confirmation.
      Delete Site Requests List
    3. Delete the subsite (if you created one). Contact your SharePoint administrator for instructions on deleting sites in your environment.
Summary

The application you built in this tutorial provides a convenient system for users to request SharePoint sites in a self-service format.

After completing the tutorial, you should know:

  • How to create a new K2 application from a SharePoint list
  • How to use a SharePoint list to store application data
  • How to configure a Task step
  • How to configure an update List Item steps
  • How to configure a Create Subsite step
  • How to build reports for an application
  • How to edit existing SmartForms
  • How to clean your environment by deleting artifacts no longer needed