Open unkcpz opened 1 week ago
The problem I can see with the implementation is the default label is
CALL
so if the label for every child process is not set, then there can be same keys and multiple entities to return.
A side idea to improve can be instead of the CALL
as default, maybe we can tag the number to CALL_0
, CALL_1
... automatically to distinguish them and to make the keys of LinkManager unique.
Hi all, maybe it is something already exist or had some way to support, otherwise could be a good feature to add.
I have a process call stack as shown below, and I want to quickly anchor the last nested
PwCalculation<1420195>
. From my run script I have the pk of most outside parent nodeConvergenceBandsWorkChain<1416934>
. I have two ways now to get the node programmaly.orm.load_node(1416934).called[2].called[2].called[0]
, but it is obvious this is flasky and I found it has the problem when working on the cached workchains.outgoing = node.base.links.get_outgoing()
first and thenoutgoing.get_node_by_label("<link_label>")
to get the the nodes. If I understand correctly, under the hood the querybuild can use such information to follow and get the node.So for 3, I think it would be useful to provide an API
node.get_called_node_by_link_label
to get the child nodes hidden in the nested calling path. The problem I can see with the implementation is the default label isCALL
so if the label for every child process is not set, then there can be same keys and multiple entities to return.