System devices, and walking a tree through workflow


At the moment there is no node in workflow for running a query for all possible children (maybe limit depth) of a System Device.

So we have been trying to write recursive tree walk workflow with custom nodes. You can’t place a custom node inside it self. So we split it into to parts, where the inner custom node calls the outer custom node.

Unfortunately we get an error in workflow node, but no indication of what the error is.

My guess is custom nodes can’t call themselves indirectly to prevent recursion errors.

Is this the case ?

It would be great if there where a workflow node that is given a device, can query and return the full chain of parents.

Any other approaches or suggestions are welcome.



Hi @Tim_Hoffman,

Can you clarify what you mean by “call themselves indirectly”? I believe I understand your current configuration to look like so:

Custom Node 1:

Custom Node 2:

Outer workflow:
Screen Shot 2020-01-21 at 10.26.15 AM

Please let me know if I have misinterpreted or if this is not your current configuration. This workflow has not yet resulted in an error, but I would like to better understand your workflow as it currently stands.

I will also add a +1 to the current Feature Request for a node with this functionality, and update you should it be released soon.


Hi Julia

My first post wasn’t super clear :wink:

I found a custom node, can’t call it self, so I tried to use two custom node, each calls the other to implement a recursive walk down the tree, to find all devices that exist in a part of the tree.

Whilst I could create the two nodes when reaching the call tree Node1 -> Node2 -> Node1 it would provide an error.

To find all devices, in a part of the tree, I have taken the approach of finding all devices (could be a lot) (unfortunately there is no query to fine all devices with parent defined but not specify the id). Then on each device using a custom node to walk up its parent list (returning the chain of parents) and then we match all nodes that have the desired parent in its parent chain. (this can be short circuited if filtering parents or parent nodes for a specific ID)




Thanks for that clarification. It was super helpful. Your approach now is unfortunately the best way to do it. We are working through now what a more advanced device querying model looks like. I added this post to the request.

Let me know if I can answer more questions for you!.