child workflows erroring or duplicating actions


Badge +4

I need to find out from other installations because I can't figure if this is just me. However it is making me really hate Nintex Workflows 2013. I'm in the middle of migrating from 2010 and this is setting me back.

Child Workflow

Step 1: Send email to yourself  (subject: Starting Child WF)

Step 2: Update any column info with anything

Step 3: Wait for any column to equal text

End workflow

Parent Workflow (run when item is created)

Step 1: send email to yourself (subject: Starting Parent WF)

Step 2: Start child workflow and check the boxes to “wait until finished” and “Do not start if already started”

End Workflow

What happens to me:

Email for “Starting Parent WF”

Email for “Starting Child WF”

Email for “Starting Child WF”

Email for “Starting Child WF”

Email for “Starting Child WF”

The version history will now be up to 5 versions when it should have just 2

Workflow history messages will show four entries for “Waiting for Update”

Removing the Parent Workflow and making the child workflow run on creation will work fine.

Having the Parent and Child WFs and adding a “Wait 5 minutes” before the “Wait for Update” will also work fine but now we are waiting about 10-15 minutes to complete simple steps and my workflow has several child workflows.  This didn’t happen in WF2010, but is occurring on both my WF2013 sharepoint environments.  I want to confirm if this is a bug, known bug, or by design and I have to re-think my workflow strategy.

I've been updating my existing workflows but it's not constant and I'm needing to add several wait actions. Also it breaks my User Defined Actions. However, if I run my child workflow manually, it works better. I can't tell what to look for that is different or what to look for in my event receivers to make it run smoother.


13 replies

Badge +4

didn't help in my case. I created a brand new web app, built two workflows as written on top and it had the same reactions.no other workflows on the whole app or any prior version this whole thing doesn't make since because everything worked great in 2010. only thing different is the new farm is built with claims based auth. so I had normal issues there, but for it to flip out on sub-workflows or update item, I seriously can see what is causing it. even batching doesn't sound like it can cause this.

Badge +4

It worked without any pauses or anything other than what I had written as the scenario?  Do you have MS Workflow Manager configured on the SP 2013 environment?

All I can figure that is different from my 2010 environment is I'm using Claims on my new system. Also I just realized I don't have Workflow Manager installed so I don't have access to SharePoint 2013 workflows via SPD.

Any other ways to diagnose what step or where or why is it creating duplicate actions?

If I wanted to re-install from scratch, would I lose my workflows I saved?

Userlevel 5
Badge +12

Hello,

Is there a chance that your Parent or Child workflow is timing out sometime after it executes the child workflow - and then restarts on its own and then keeps doing that until it finally has a chance to finish.  This would explain the behavior you are seeing.   It would also explain why the "Pause" you added seems to fix the problem.

You could increase the timeout in IIS to see if that helps solve the issue.

Badge +4

I'm interested in trying this IIS timeout thing. Can you tell me a little bit more.  I've gone through and adjusted the SharePoint Workflow throttling stuff and haven't see a change.

"Set-SPFarmConfig –WorkflowPostponeThreshold 20"

"Set-SPFarmConfig –WorkflowBatchSize 200"

"Set-SPFarmConfig –WorkflowEventDeliveryTimeout 20"

"Set-SPTimerJob –Identity job-workflow -Schedule  "Every 2 minutes between 0 and 59""

As for it timing out, the sample above is a very quick workflow. Upload an item, Nintex sends a message, starts a second workflow, that sends a message and updates an item, and bam the file gets 4 updates in one minute. I'm not truly understanding why the actions are multiplied even though the event/workflow is only shown as starting once. 

We tested the exact same workflow sample in a third environment and it has the same behavior. This multiple actions issue is causing some other nintex actions to be troublesome. It kills me because the same workflow worked on SP 2010.

Userlevel 5
Badge +12

Here is a link dealing with setting the timeout in IIS:

iis - How to increase request timeout in IIS7.0? - Stack Overflow

The only other time I have seen something similar was dealing with scheduled workflows, but you can see if it applies to you as well:

The Nintex Workflow Scheduler job should only have one instance listed

in the Timer Job Definitions page. To check, please go to Central

Administration > Monitoring > Timer Jobs > Review job definitions.

Paginate through until you get to Nintex Workflow Scheduler. There

should be only one instance there. If there are more, all but one will

need to be deleted, ensuring the one that is left is on a web

application on a server running the “Microsoft SharePoint Foundation Web

Application” service.

Userlevel 5
Badge +12

Hopefully one of the fixes above works, but also does your Child workflow have any start conditions on it?

Badge +4

The only start conditions I have are on the parent workflow. Auto start on create or conditional starts, not both. the child workflows are only started when the parent workflow calls them and then waits until they are completed before continuing.

If the parent workflow is triggered by "when item is created" I get 4 actions repeated. When I manually start it, I get 2 actions. If I manually start the child workflow, it works without duplicates. That's why the number of pauses I need to add just to "reduce" the number of duplicates seems like a band aid to a bigger issue. This doesn't seem like the typical "batching" issues.

Currently checking time out settings and other advice and comparing to our old 2010 environment.

Badge +4

Dang, none of those helped.

<httpRuntime executionTimeout=”3600” />

Single instance Nintex Workflow Scheduler job

Userlevel 5
Badge +12

It is probably obvious, but you restarted IIS after you made the change, right?

Userlevel 5
Badge +12

See if this helps in setting additional time for timeouts:

Breaking up a large workflow, to split or not to split?

Badge +4

Actually after getting support on the phone, they found there is a bug related to Workflow 2013, and using a Wait for Update while in the process of a secondary/child workflow. They are working on getting it patched for the next update.

Userlevel 5
Badge +12

Oh cool, thanks for sharing!

Badge +4

Update: Nintex support looked in to it and determined it wasn't a bug but a MS SharePoint behavior that is on Microsoft's issue to fix. They said they tested a similar scenerio using the SharePoint Workflow 2013 designer with no Nintex, and it also occurs.

When using child workflows and the Parent workflow is on Pause until the child is completed, you need lots of pauses. Almost anytime you have a wait for update or update item, web service calls, and others, you need pauses before and after and all over the place.  Not happy about it and I'll need to restructure my workflows around running one workflow at a time when there are multiple stages.

Reply