Routing
Hi
I've been using the Do While loop a lot which works well i.e. in the do-while loop, the body of a loop is always executed at least once.
I now have a requirement that needs a "while loop" i.e. wont even execute once if the condition is not true. I want do to this so i can route the flow through the graph at run time based on values of the data that is flowing through.
Is there any way to do that in D360 Analyze?
thanks!
Scott
-
I would put a Transform node directly after your Do While Conditional that has some logic in it to determine if you want to proceed at all. Let's say you have performed some logic to see if a file was found and you stored the result of that in a field called FileFound. You could let the loop proceed but immediately after it have a Transform node that would output records based on a condition (in this case if in1.FileFound == True, should it be false you will get 0 records out and potentially terminate the flow). If it's a case of stopping completely, you can use a Meta Check node for that. Or you could run 0 records through your data flow and let the Do While Conditional node finish by itself.
Also I should point you can add various conditions within the Do While Conditional itself. Personally I tend to just leave it as true and perform the logic in Transform nodes outside of it. In this case, like you said, it's an initial run that may stop, so I think you'll have to put any stop/proceed logic in a Transform node.
Please sign in to leave a comment.
Comments
1 comment