Skip to main content
Nintex Community Menu Bar

Ending an active workflow via form button or workflow event.

  • October 30, 2015
  • 2 replies
  • 12 views

Forum|alt.badge.img+10


 

Symptoms


Wanting to emulate SharePoint designer's action.
 

Diagnoses


Currently there is no single event that can achieve this, but it is possible with some Management SmartObjects calls.
 

Resolution

There are two possible ways to achieve this. One is to use the SmartObject method "Workflow.Management.Activity" -> "Goto Activity" to force the workflow to a dummy event at the end of the workflow. When the workflow passes the dummy it will go into the ideal "Completed" state and cease to be active.

Another way is to use the SmartObject method "Workflow.Management.ProcessInstanceInfo" -> "Remove" to halt the workflow instance. You can pass in a parameter to save log data for reporting purposes, and the workflow will show up as "Deleted".

Both SmartObjects are found in "SystemManagementWorkflowsSmartObjects". To use them in a workflow, they must be given scope via the Manage SmartObjects page.




 

2 replies

Forum|alt.badge.img+5
  • August 1, 2017

Team,

 

Is there any possibility to end the K2 designer workflow .


  • September 6, 2017

Hello,


 


If it is running, then yes. Simply go to Workspace > Workflow Server > Processes > Workflow Name > Instances. Select your Workflow instance and choose Stop. 


 


If it is in an error state, then no you cannot stop it, without some direct DB modification.