Same DB search yielding different results in very next workflow step

I am running a process where I create or update a list of Instances, and then add them to a list field on a Revision. It seems pretty straightforward, but for some reason not all the Instances are being added to the Revision.

I set up a Write to Console immediately before the Revision update, and that is giving the expected list of Instances:

However, in the very next step, I run the same search, and I’m not getting the same Instances added to the Revision in the DB after:

Instead it adds an incomplete list of Instances - there are no incorrect Instances added, but not all that should be there are. This happens occasionally, and I can’t really determine why or any sort of pattern.

I’m running out of ways to test this. Any ideas why this could be happening?

Any other steps before this whole process that would interfere with the search results? Like changing a field value or something?

Also don’t mess with the console log just go in debug mode and watch the data sources step by step.

But if you have some previous actions interfering debug mode might not give you the same results because it forces the WF to go slower step-by-step.

When you are doing the thing to change in the last screen shot, it is thing to change “index new-revision” and the search for products instances has a constraint of Latest Revision = This Revision

What that means is you are trying to set the value of itself to itself. “This Revision” references the revision that is the thing to change, ‘Index’s new-revision’

This topic was automatically closed after 70 days. New replies are no longer allowed.