Skip to main content
Nintex Community Menu Bar
Solved

Automate Instance Deletion

  • July 18, 2024
  • 2 replies
  • 89 views

Forum|alt.badge.img+5

Is it possible to automate the deletion of a completed instance at a specified timeframe e.g. 48 or 72 hrs. 

Best answer by SimonMuntz

Hi @AdrianGaribdass01,

 

That is a very interesting question.
Instances can be deleted by using the Nintex Automation Cloud API.

https://developer.nintex.com/docs/nc-api-docs/3824117218984-delete-a-workflow-instance

First, ensure you Enable instance deletions in the tenant Settings.


I suggest calling a component workflow at the end of your workflow to do the deletion.
The first action in the component workflow will be a pause.
If the pause duration differs for different workflows, you could pass a variable for how long to pause.
The next action is a call a web service action that deletes the instance.
The workflow instance ID is required and is available as a variable from the Context section. It needs to be passed to the component workflow.
An authentication token is required for the API call. A personal token is all that is needed.
 

Hope this helps.

2 replies

SimonMuntz
Nintex Employee
Forum|alt.badge.img+23
  • Nintex Employee
  • Answer
  • July 19, 2024

Hi @AdrianGaribdass01,

 

That is a very interesting question.
Instances can be deleted by using the Nintex Automation Cloud API.

https://developer.nintex.com/docs/nc-api-docs/3824117218984-delete-a-workflow-instance

First, ensure you Enable instance deletions in the tenant Settings.


I suggest calling a component workflow at the end of your workflow to do the deletion.
The first action in the component workflow will be a pause.
If the pause duration differs for different workflows, you could pass a variable for how long to pause.
The next action is a call a web service action that deletes the instance.
The workflow instance ID is required and is available as a variable from the Context section. It needs to be passed to the component workflow.
An authentication token is required for the API call. A personal token is all that is needed.
 

Hope this helps.


MillaZ
Nintex Employee
Forum|alt.badge.img+22
  • Nintex Employee
  • July 22, 2024

Hi @AdrianGaribdass01 
Did Simon’s response answer your question?