Hello,
Is there any node or something that I could use for change the workflow path while it is running? For example, some node has its output is linked to 2 different group of nodes and, if the input for this node is true, the workflow flows to the first linked group of nodes and if it is false, the workflow flows to the second group. I’ve attached an image to explain it better.
Another option would be a node that stops the workflow if the input is false and keep it running if its true, for instance.
Thanks for your reply, but that is not what we need. I would need something like this but with 2 outputs and then, depending of the input, just one of the outputs would return something and the workflow after the other output would stop running…
His suggestion gives me 2 different values in the same output, the output value depends of the input, that is true. However, I have 2 workflows after the node, and what I need is that, depending of the input, just one of the workflows woud keep running and the other one would stop.
I will try to make ir more clear with some images:
Again, that’s what the IF node does.
It’s just that the two possible results are fed as inputs.
Assuming I haven’t misunderstood your intent, hope the below illustration helps clarify.
Thanks for your help, but you are not understanding me. I need the workflow to not be executed if the input is false. I dont need the output to show me the values for true or false, I need it to stop the execution of the nodes if it is false. just like I’ve shown on the last image I sent. Something like: “if it is true, keep the workflow running, if it is false, freeze the following node”
Thanks for that, it stops the workflow as I asked. However, I thought there could be a way for doing it without warnings after, like freezing the node while the workflow is running, but I reccon there isn’t.
Don’t know if it’s helpful, but you can actually store functions in a dictionary.
That way you can apply different functions depending on some kind of metric/boolean value etc.
That’s a good topic actually. When evangelists of Dynamo say “You don’t need to script” they lie a little bit. A script has a straight order of how it is executed. You can break, switch or loop this flow explicitly. This gives you a natural and advanced control on your program.
Visual approach is more about transformation of some data as a whole. You can think of it as of one “arithmetical” function which has variables, parameters and outputs. You see connections between them but there is no explicit execution order, which you can change. This is the main difference between visual and scripting approaches. If you look at the most useful nodes in packages, you’ll see that most of them have python scripts inside.
Nevertheless, Dynamo has original nodes for loops and even transactions, but I’ve never seen someone using them, neither even their description.
My topic is little bit related to this. I have to set of list for example X list and Y list. My intension is, if the width is greater than length (false) then X list output is same but Y list has Y+100 value. If the length is greater than the width (true) then Y list is same but X list has X+100 value. It is possible in dynamo.
Hello @ricardoperucci and @jacob.small,
I have the same problem. I have two workflows with the periodical setting; I want to always run the first one but not the second one; I need the second workflow to be run once out of every ten runs. In other words, when I set the periodic time for 1 second, I want the execution of my first workflow every 1 seconds, and the second workflow every 10 seconds.
I attached the code I created, here. Basically, one out of ten runs it returns [time, time] and the other 9 it returns [time, ‘false’].decision maker.dyn (5.1 KB)