When a workflow starts, does it use the data from when it started?


Badge +4

A few months ago, I made a workflow that was to send an email every month with data from the list.  It had an inifinite loop that would wait month at the end before it went back up to cycle through again.  However, as the list was changing, the email was sending the same thing every month.  I assumed this was because when a workflow is started, it runs with the data of the list at that time and doesn't upate with the list.  I made another workflow to hold the loop and start the original one each time it looped back around like before.  This solved the problem and the email is sent out with updated information.  Is it safe to assume that once a workflow starts, the data is uses is fixed and doesn't update? Or is there a way to have it update?


3 replies

Userlevel 5
Badge +13

@odennis1 Was the query list inside or outside of the loop? If the query is inside the loop then the data should be updating. Or are you just using the variables for the current item? 

 

Usually with a workflow like this I would recommend doing a scheduled workflow rather than a loop(https://help.nintex.com/en-US/nintex2013/help/#Workflow/RootCategory/SharePoint/Nintex.Workflow.SchedulingWorkflow.htm).

Badge +4

@leighburke, I was querying the list inside the loop but it was updating for some reason.  Thank you for the tip on scheduling workflows.  I thought they only applied to site workflows but that is obviously not the case.

Unfortunately I won't be able to use it everytime, because I have some workflow that have weird intervals of wait times.  For example, I have a few workflows that need to run on the first and fifteenth of every month.

Userlevel 5
Badge +13

@odennis1 That's weird, i just did a quick test and confirmed a query list variable should update on each loop. It may be something in your configuration with which variable you are using that is causing the issue. 

 

In terms of scheduling a workflow on the 1st and 15th. You could add multiple schedules in advance or create a scheduler workflow using the start a workflow action(https://help.nintex.com/en-US/nintex2013/help/#Workflow/RootCategory/Actions/Nintex.Workflow.StartWorkflowAction.htm) that creates those schedules for you.

Reply