Skip to main content
Nintex Community Menu Bar

Terminate Workflow when List and Items no more exist

  • July 22, 2019
  • 1 reply
  • 90 views

SteveJonasson
Forum|alt.badge.img+3

Hi guys,

 

I've been reading quite a long time about terminating list items which don't exist. I've found a solution which says to remove some query strings Terminate WF when items do not exist. It helped me a lot, but I haven't found a solution on how to terminate workflows which are running in the "non-existing" list inside "non-existing" items.

All I have is 43 error workflows which are still running, but I cannot delete them, because SharePoint alerts me with an error depicting "error message, that list does not exist". 

I tried to call a web service on my site and set some variables at the beginning before executing WF.

3249i37FD9A25ABD977B9.png

This is URL of the non-existing list with the non-existing item. So, I had an idea to take ListID to var_listID, ItemID to var_itemID and InstanceID to var_InstanceID.

NintexWorkflow/preview.aspx?ListId=fa7c5f8e-729b-4532-b6f2-c2d464845d83&ItemId=4&WorkflowId=5fcf9aef-3db1-4c4a-812f-f0f39dd80a6d&mode=Runtime&InstanceId=321674ca-24c5-4741-b69e-98281aab0d22

 

All seemed to be working because, at first, I tried to push "Run now" and it answered "OK" when I hit "test connection".

I've created a new app (list) on the site and set up the workflow. The variables I set as required before executing the workflow at the beginning.

It showed "Completed," but nothing happened.

Can you help me more?

Thank you very much

Steve

1 reply

Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • July 22, 2019

Hi,
I suggest using the NWAdmin tool to terminate workflows that are running on deleted items using the -terminateDeletedItems parameters.
NWAdmin.exe -o SyncTerminatedWorkflows -url teamsiteurl [-preScan] [-verbose] [-confirm] [-showMissingItems] [-terminateDeletedItems]

NWAdmin documentation here: NWAdmin Guide.