How to Delete Site Using NINTEX Workflow in SharePoint

In this article you will see how to delete a site using NINTEX workflow in SharePoint.

Introduction

In my previous article you saw how to create a site using NINTEX workflow in SharePoint 2010. In this article you will see how to delete the site using the NINTEX workflow in SharePoint. I have created a custom list named "Site Provisioning" in which I have the following columns:


The Title column specifies the site title and description column to specify the site description and Delete is a Boolean value to specify whether the site must be deleted.

Create of site deletion workflow

The following is the procedure for creation of the site deletion workflow:

  • Navigate to the "Site Provisioning" list.

  • Click on the List tab and then click on "Workflow Settings".

  • Click on "Create a Workflow in Nintex Workflow".

  • Click on "Cancel".


  • Drag and drop the "Run if" (used to check if the "Delete" column has a yes value then only the "Delete Site" action will be executed) action from the "Logic and flow" section.








































  • Drag and drop the "Delete Site" action from the "Provisioning" section.


  • Click on "Configure" from the drop down list in the "Run if" action.












  • Set the condition as shown below.


  • Click on "Configure" from the drop down list in the Delete site action. Click the on "Insert Reference" button for the "URL name" column and then click on the "Item Properties" tab. Select "Title" and then click on "Ok".


  • Click on "Select a parent site" link to select the parent site from where the site must be deleted.




















  • Click on "Save".


  • Click on "Workflow Settings" in the ribbon interface.


  • Enter the "Name" and select the check box for "Start manually".


  • Click on "Save".


Publish the workflow

  • Click on the "Publish" button in the ribbon interface.


  • Ensure the "Title" is set; optionally you can set the values for "Description" and "Change Comments."Click on the "Submit" button.


  • The workflow is published successfully.



Test the workflow

  • Navigate to the "Site Provisioning" list.Edit the item (for the following item I have already run the Create Site workflow as mentioned in my previous article and the site is created) and select "Yes" for the "Delete" column.


  • Select the item and then click on "Workflows" in the ribbon interface.


  • Click on "Delete Site" workflow and then click on the "Start" button.


  • After a few minutes the workflow status will be changed to "Completed".


  • The Site is deleted successfully.

Summary

Thus in this article you have seen how to delete a site using NINTEX workflow in SharePoint.