cancel
Showing results for 
Search instead for 
Did you mean: 
Levy
Nintex Newbie

TerminateWorkflowByNameForListItem in a loop stopps

Jump to solution

Due to wrong defined Workflows, at my customers site, they have a lot of Workflows which are in Workflowstatus 'In Progress' and did not complete.

I created a Site Workflow with following actions:

Query List to filter all these items.

Iterate over items (having a List Item ID variable)

Calling TerminateWorkflowByNameForListItem with needed settings.

After around 150 items (the Workflows of the items got correctly canceled), the Workflow errord and in ULS-Log I find 'Thread abort exception'

Sometimes the Workflow stopps after 144 items processed or 136 and so on.

Do I hit some sort of limit here?

 

Btw: It would be nice to set the Workflowstatus to Completed when using TerminateWorkflowByNameForListItem.

Please vote for my User-Voice

 

 

 

 

Labels: (1)
Tags (1)
0 Kudos
Reply
1 Reply
SimonMuntz
Nintex Employee
Nintex Employee

Re: TerminateWorkflowByNameForListItem in a loop stopps

Jump to solution
Try looping in batches of 100 with a pause in between.

View solution in original post

Reply