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.
Interesting. A commit pending changes before the start workflow action and after your 'wait until' might give you some peace of mind..
We have same issue.
I my case comes form the option "wait until WF has Competed". Until I dispabeled this option, it did not happen again. This option did not worked well either, because up to 6 WF Start to wait the main WF did did not resumed without an error.
I have the exact same issue - child workflow works fine when run manually but when called it assigns the task 4 times. It's happening to 2 of my 5 child workflows. The only difference is that I'm looping but the logging shows that the WF starts just once and that the task is assigned four times with only one being actionable.
I spent a day tinkering with both the parent and child WFs and nothing worked. I ended up deleting one of the child workflows and recreating it. That one now seems to work ok. I was hoping there was a better solution as I don't want to recreate the other child workflow.
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.
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
@Nintex, this problem is still prevalent in your latest release for SharePoint 2016. Please can it be fixed.