I am building a TOP HDA, which includes several Python Script TOPs. When something goes wrong in one of these Python Script nodes, I issue a work item Error with a custom error message using
pdg.WorkItem.addError(error_message, fail_task=True)
My problem now is that, when inspecting the failed items on the HDA interface, it seems like the work item Error Message from my Python Script nodes inside the HDA does not bubble up correctly to the HDA interface.
On further investigation, I found out that the work item Error Message, which I can access from the HDA interface, seems to be dependent on which Output Flag is set inside the HDA. Here is a video (GIF) illustrating the behaviour on a very simple Subnet.
- When the Output flag is set on the Output TOP inside the Subnet, I get no Error Message on the Subnet Interface' work items, but just the State "Failed Dependencies".
- When the Output flag is set on the Python Script TOP inside the Subnet, I can display my custom Error Message on the Subnet Interface' work items.
For this Subnet example, I could just have the Output Flag set to the one Python Script TOP so that my Error Messages bubbles up correctly. But the problem in my HDA is, that I have several Python Script TOPs and if I set the Output Flag on the last Python Script and a work item fails in an upstream Python Script, then the Subnet Interface' work items will still only display the State "Failed Dependencies" without my custom error message.
Is this the desired TOP behaviour? Am i doing something wrong, or should i contact support and check if this is a bug?
I checked in SOPs and it seems like when there is an error inside a Subnet, then the errors are collected and bubble up to the Subnet interface like "Invalid Source. Error: Unable to evaluate expression...."