Workflow Started by Start Workflow Action executes actions multiple times

  • 24 June 2015
  • 4 replies
  • 13 views

Badge +5

I have a workflow with a state machine governing an approval process. As it was becoming too large I split it out into separate workflows and call those child workflows from within the branches of the state machine. I have 4 branches with child workflows, 3 of which behave perfectly. The 4th however is behaving very strangely.

 

When the workflow runs, initiated by the start workflow action, the single flexi task that is contained within it is created 4 times! I have added logging before the task and that too is shown 4 times. There are no loops in my workflow, it's a simple linear process, do some stuff before the task, create the task and do some stuff afterwards. The start workflow action is configured to wait until the workflow finishes before progressing and not to start if already running.

 

What I have also observed is that if I run the child workflow manually it behaves as expected, a single task is created...it is only when started with Start a Workflow that it behaves this way. Note also that when started with Start a Workflow action only a single instance of the child workflow is shown as running.

 

Of the 4 tasks that are created, only the only with the highest ID can be opened, the others give 'Sorry, something went wrong'.

 

Can anyone suggest what's going on here?

 

I have tried replacing the Start a Workflow action but the result is the same.

 

NW2013 3.1.3


4 replies

Badge +3

Interesting. A commit pending changes before the start workflow action and after your 'wait until' might give you some peace of mind..

Badge +3

Looks like this is an old post but possibly updated yesterday? Either way, I just ran into the same issue and came across this post.

If you turn off 'wait until workflow finishes' then it will behave as expected. If you are like me and need it to wait until the workflow finishes then you will have to move the start workflow out of the state machine. State machines are made up of loops and I suspect it has something to do with that. Possibly a bug in the action.

Edit: I spoke too soon. Looks like the 'wait until workflow finishes' option just doesn't work. I also noticed it hangs on starting for a while when using that option.... What I did to get around it was set a boolean field at the end of the child workflow then wait for that field to update immediately after the start workflow action in the parent workflow.

Userlevel 5
Badge +14

place a 'pause for' action at the very beginning of the child workflow and set it wait for some small timeout.

make see interesting article

Defensive Workflow Design Part 4 - Slow Down and Speed Up 

Badge +2

@Nintex, this problem is still prevalent in your latest release for SharePoint 2016. Please can it be fixed.

Reply