Workflow Parallel Foreach flow controls including client-side activities not respecting variable thread-locality
I have a lovely workflow that we're developing for a client which uses parallel foreach loop to execute some queries and (maybe) produce reports. I was having some report issues, so threw in some external log activities to watch what was going on. When I did this, I began encountering odd behavior which was eventually discovered to be my querys' returned featureset variable getting accessed by EACH of my parallel processes in tandem, that is, I now have one featureSet instead of, say, seven distinct featuresets (one for each n in list(of n)).
Is this expected behavior that I am simply not understanding, and if so is there anything that I can do within the parallel scope to force this local variable to stay where it belongs? Again, the logic runs fine without the logging acitivity, so I suspect that this is related to serialization. Am I forced to avoid client-side activities within this kind of loop?
0
Please sign in to leave a comment.
Comments
0 comments