Start workflow on condition causing slow submit action

  • 6 October 2015
  • 6 replies
  • 5 views

Badge +5

I have a browser-enabled InfoPath form linked to a SharePoint list and a Nintex Workflow.

 

I have designed the form to submit and start the workflow only when a particular field 'field1' is set to 'Submit', which is triggered by the 'Submit' button. This is so that I can have a separate 'Save' button which simply saves the form to the SharePoint list.

 

The problem I'm having is that this conditional setting in Nintex is causing the form to delay very significantly when being submitted. It takes an average of 45-60 seconds to submit whereas previously it was 2-5 seconds. Sometimes, it simply times out.

 

Does anybody have an explanation for this, or a work-around?

 

Thank you

 

Shaun


6 replies

Badge

Hi Shaun,

 

that’s the „normal“ behavior of a conditional workflow and the workflow infrastructure itself. If you’re using conditional settings your workflow will run synchronously until the first wait action (pause, task, wait until, etc.) or until the workflow ends. And, because of the workflow infrastructure, the first execution of your workflow is much slower.

Without the conditional start options your workflow is executed asynchronously – that means your workflow starts a couple of seconds later after submitting your InfoPath form.

 

Technically we are talking about SharePoint event receivers handling item added/adding or updated/updating events. When you use the conditional start options your workflow is handled by the adding or updating event receivers – thus, the workflow is running synchronously.

Unfortunately you cannot completely overcome this problem unless you don’t use the conditional start option.

 

What you can do is a little bit of optimizing:

  • Don’t use the conditional start (as described before) but add a “Filter”-Action as first action to your workflow designer. If the filter is not valid your workflow stops immediately (workaround to "simulate" a conditional workflow)
  • Execute only a couple of actions within a conditional workflow – small workflows will be executed faster
  • if it’s not a time-critical workflow, add a “pause for 1 minute” action as first action to your workflow. Your workflow is executed synchronously only until this first wait action.
  • increase the DataConnection timeout settings in Central Administrations for InfoPath

 

Hope this helps,

Christoph

Badge +5

Hi Christoph - Thanks for taking the time to consider my problem, and thanks for the detailed reply. I'll look into your suggestions to see if they improve the situation.

Thanks again!

Badge +5

I tried the simplest solution above (the 1 min pause), and it actually seems to have done the trick. It still takes about 5-10 seconds to submit, but that's a huge improvement on timing out altogether.

Thanks again for your help!

Badge

Great! You are welcome. Thanks for your feedback.

Badge +1

Hi Nintex Team, 

I have a time critical workflow. where everything should completed within 10 seconds. Issue is everyday for the first button click in an Info path form, screen will struck in "Sending Data to Server" for one minute. then it will redirect back to "Source" page. Workflow setup as to start only on "Conditional". For Ex: On A button click i am setting "Status"= "Closed". so i have put same condition in workflow settings["Conditional"]. my question here is everyday for the "First Click of submit button" why screen will struck in "Sending data to server", interesting thing here  is . subsequent submissions through out the day works fine[within 10 seconds it will redirect to "Source"]. please let me know if you have any solutions or workarounds for this. #Conditionalworkflow 

Badge +11

I have the same issue here:

When the form is submitted, the page loads / processes for 1minute and then goes to the page showing the status.

I have a "Conditional" action within the workflow and also set the workflow "Start when items are created" > conditional.

My Topic:

https://community.nintex.com/thread/20117-nintex-workflow-slow-takes-up-to-60-seconds-to-refresh-the-page-itself

As already suggested it is the Conditional Action which is causing the slow workflow process.
I am thinking to remove it and replace by a Parallel Action followed by IF Statements to run only if condition is met.

 

Reply