<inport name="InputVariablesSizes" type="intvec"/>
<inport name="OutputVariablesNames" type="stringvec"/>
<inport name="OutputVariablesSizes" type="intvec"/>
+ <inport name="has_observers" type="bool"/>
+ <inport name="observers" type="pyobj"/>
<outport name="Study" type="pyobj"/>
</inline>
]]></code></script>
<outport name="output" type="SALOME_TYPES/ParametricOutput"/>
</inline>
+
+ <inline name="SetObserversNode">
+ <script><code><![CDATA[
+print "Setting observers"
+]]></code></script>
+ <outport name="has_observers" type="bool"/>
+ <outport name="observers" type="pyobj"/>
+ </inline>
</proc>
proc.edAddChild(CAS_node)
+
+ # Adding an observer init node if an user defines some
+ factory_init_observers_node = catalogAd.getNodeFromNodeMap("SetObserversNode")
+ init_observers_node = factory_init_observers_node.cloneNode("SetObservers")
+ if "Observers" in study_config.keys():
+ node_script = init_observers_node.getScript()
+ node_script += "has_observers = True\n"
+ node_script += "observers = " + str(study_config["Observers"]) + "\n"
+ init_observers_node.setScript(node_script)
+ proc.edAddChild(init_observers_node)
+ proc.edAddDFLink(init_observers_node.getOutputPort("has_observers"), CAS_node.getInputPort("has_observers"))
+ proc.edAddDFLink(init_observers_node.getOutputPort("observers"), CAS_node.getInputPort("observers"))
+ else:
+ node_script = init_observers_node.getScript()
+ node_script += "has_observers = False\n"
+ node_script += "observers = \"\"\n"
+ init_observers_node.setScript(node_script)
+ proc.edAddChild(init_observers_node)
+ proc.edAddDFLink(init_observers_node.getOutputPort("has_observers"), CAS_node.getInputPort("has_observers"))
+ proc.edAddDFLink(init_observers_node.getOutputPort("observers"), CAS_node.getInputPort("observers"))
+
# Step 0.5: Find if there is a user init node
init_config = {}
init_config["Target"] = []