Workflow with conditional start is re-starting after completion

  • 30 October 2015
  • 6 replies
  • 18 views

Badge +5

I have workflow that is working well, with about a dozen flexi tasks and half a dozen branches. I have tested it thoroughly, and for some reason it sometimes re-starts the workflow when the workflow completes. This only happens for some items, not for all.

 

The workflow is set to start on a condition - this condition is that a certain field contains the word 'submitted', which is triggered when the user hits the 'submit' button. This was so that I could have 'save' and 'submit' button that saves the item to a SharePoint list and start the workflow (respectively).

 

I cannot identify what is causing this re-start issue, and I'm becoming a little frustrated (not at the programme, at myself!).

 

Does anybody have any idea what may be causing this? I can attach the workflow to this thread if someone would be kind enough to look into it.

 

Thanks all


6 replies

Userlevel 6
Badge +16

Have you designed it to start on modifications?

Could you send the workflow?

Badge +5

Hi Fernando - I've actually fixed it. I set an additional condition so that the workflow would only start if a certain field (in this case, the 'Final Approval Date' field) is empty. This works well because at the end of the workflow, this field is populated as a final step.

Badge +5

Hi Fernando - It appears my fix didn't actually work. So, a little guidance from you on this would be great!

The workflow is very simple (three flexi tasks), and starts both 'when items are created', and 'when items are modified', but only when two conditions that are met:

1) If a field called 'submitted' contains the value 'submitted'.

2) If a field called 'finalapproval' contains any value (this field is written to at the end of the workflow).

... This is so that I can have a button to save the form and a button to submit the form. The save button updates the 'submitted' field to 'not submitted', and the submitted button updates it to 'submitted.'

The workflow seems to re-start once it reaches the end, and I cannot understand why.

I have attached it, if you'd be kind enough to take a look at it.

Many thanks in advance.

Badge +5

Hi Shaun,

download yourself the Nintex Workflow Analyzer (Workflow Analyzer - Stable) and go to the Best Practice Tab to analyse your workflow or check these articles:

Service Pack 2 prevents an on-change workflow from starting itself - Microsoft SharePoint Designer Team Blog - Site Home…

If that does not fix the problem, implement a "Commit pending changes" because sometimes SharePoint batch takes longer than Nintex batch or vice versa. This causes the workflow not to recognise that there is already a value for your finalapproval. Because on of them is faster than the other...

Designing your Workflow - Commit Pending Changes Action NW2010 & NW2013

Userlevel 6
Badge +15

‌ Hi there! Did you ever get this one figured out?

Badge +5

Hey - Yes I found a workaround (it's a bit of a hack).

You need to create a dedicated field that has a value written to it at the end of the workflow (eg: 'Completed'). Then create a condition at the start of the workflow that if the field = 'Completed', then go to the end of the workflow. If not, execute workflow.

Reply