cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Terminated workflow still running when item is modified

Hi Community! Wassim Ghadban has asked the following question after completing the How to Create a Leave Request Workflow tutorial.

 

Hi,

I have developed the leave application using nintex 2007, My workflow was set to start automaticaly once a leave is created, but i would like to allow the employees to edit their leave applications, i have modified the workflow start and add the option "start when item is modified", to terminate the running workflow a to start the new one, i have added the action at the start "stop workflow". i didn't work properly and the old workflow still running!

is there a solution for this ?

Labels: (1)
0 Kudos
Reply
4 Replies
Not applicable

Re: Terminated workflow still running when item is modified

Seems there was a glitch in the system, and we lost the responses from Mike M‌ and Brendan Murphy‌ to this community question. But lucky, I have them all in an email notification record, so I've replaced them in this post here:

1. From Mike M

Hello,

The reason this would not work is because the "End Workflow" (stop workflow) would be running within the context of the workflow that is currently being launched.  Simply putting an End Workflow action within a workflow does not End all instances of the workflow itself.   It only ends the current instance of the running workflow.

The business process he's trying to accomplish will be better suited to a state machine if that is available to him (in v.2007?)

2. The response from Brendan Murphy

How would you use a state machine in this scenario?  So a person creates a request and a task has been generated and is sitting with the manager.  While the task is still with the manager, the requester realizes they entered some incorrect information.  So they go and modify their request.  So the workflow needs to cancel the first task, and generate a new one with the updated information.  I’m not seeing how to accomplish this with a state machine.  Do you have an example?

3. Mike M‌ comes back with this:

I was thinking in the scenario where for example they were using a Flexitask, they could allow for a "Redo" option, which would then send the workflow back to state "X" to allow the employee redo the process in the event the approver wanted to allow that.  How this "redo" process is initiated is really up to the organization, be it they have to notify the approver, or inform them in some way. 

4. Wassim Ghadban‌ joins the conversation with the following response: Any suggestions guys?

Thanks for your reply, but still no clear for me, in the description of "stop warkflow" action it says that it will terminate all running workflows except the new one which lead to termination of all pending tasks.

please refer to below - Wassim Ghadban‌ - I think you'll need to upload your image again.

https://community.nintex.com/servlet/JiveServlet/downloadImage/2-4558-18058/Stop+Workflow.png

Thanks all, hopefully you can continue your conversation!

Em

0 Kudos
Reply
murphybp2
Nintex Newbie

Re: Terminated workflow still running when item is modified

Wassim Ghadban‌, in the 2010 help file for the Terminate Workflow Action, which is what the Stop Workflow was renamed to, it has some troubleshooting information.


The work load for this action is added to a job queue, meaning it will not execute immediately. The workflow will execute jobs in the queue as a batch when it reaches a "commit" point.


So you may want to try adding a "Commit Pending Change" after your action to terminate the workflow.  See if that helps.

0 Kudos
Reply
Automation Master
Automation Master

Re: Terminated workflow still running when item is modified

Sorry Wassim, I originally thought you were referring to the End Workflow action, but then realized you were talking about the Terminate Workflow action which indeed has those options.  Disregard my initial post!

Thanks

0 Kudos
Reply
Not applicable

Re: Terminated workflow still running when item is modified

Stop Workflow.png

0 Kudos
Reply