You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 node ConvergenceBandsWorkChain<1416934>. I have two ways now to get the node programmaly.
I do 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.
With the querybuilder, but as some of you (such as @edan-bainglass ) may know, I am very bad at writing querybuilder and I guess there can be a intuitive way for such case where I had clear process calling path to follow to get the target node.
Since I have link label for every sub workchain and calcjobs, I do get the outgoing = node.base.links.get_outgoing() first and then outgoing.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 is CALL so if the label for every child process is not set, then there can be same keys and multiple entities to return.
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.The text was updated successfully, but these errors were encountered: