104 lines
2.8 KiB
JSON
104 lines
2.8 KiB
JSON
|
|
|
||
|
|
{
|
||
|
|
"name": "Complex Remote and Subgraph Test",
|
||
|
|
"nodes": [
|
||
|
|
{
|
||
|
|
"id": "main_input",
|
||
|
|
"class_id": "InputTraceNode",
|
||
|
|
"params": {
|
||
|
|
"main_text": { "mode": "context", "value": "inputs.main_text" },
|
||
|
|
"main_num": { "mode": "context", "value": "inputs.main_num" }
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"id": "remote_text_processor",
|
||
|
|
"class_id": "remote.process_text"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"id": "sub_graph_node",
|
||
|
|
"class_id": "core.Graph",
|
||
|
|
"data": {
|
||
|
|
"name": "My SubGraph",
|
||
|
|
"nodes": [
|
||
|
|
{
|
||
|
|
"id": "sub_input",
|
||
|
|
"class_id": "InputTraceNode",
|
||
|
|
"params": {
|
||
|
|
"sub_in_1": { "mode": "context", "value": "inputs.sub_in_1" },
|
||
|
|
"sub_in_2": { "mode": "context", "value": "inputs.sub_in_2" }
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"id": "local_add",
|
||
|
|
"class_id": "math.add"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"id": "remote_ratio_calculator",
|
||
|
|
"class_id": "remote.calculate_ratio",
|
||
|
|
"params": {
|
||
|
|
"denominator": { "mode": "static", "value": 10.0 }
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"id": "sub_output",
|
||
|
|
"class_id": "OutputTraceNode"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"edges": [
|
||
|
|
{
|
||
|
|
"source_id": "sub_input", "source_port": "sub_in_1",
|
||
|
|
"target_id": "local_add", "target_port": "a"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"source_id": "sub_input", "source_port": "sub_in_2",
|
||
|
|
"target_id": "local_add", "target_port": "b"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"source_id": "local_add", "source_port": "c",
|
||
|
|
"target_id": "remote_ratio_calculator", "target_port": "numerator"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"source_id": "remote_ratio_calculator", "source_port": "ratio",
|
||
|
|
"target_id": "sub_output", "target_port": "sub_ratio"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"interface": {
|
||
|
|
"inputs": { "sub_in_1": "integer", "sub_in_2": "integer" },
|
||
|
|
"outputs": { "sub_ratio": "float" }
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"id": "main_output",
|
||
|
|
"class_id": "OutputTraceNode"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"edges": [
|
||
|
|
{
|
||
|
|
"source_id": "main_input", "source_port": "main_text",
|
||
|
|
"target_id": "remote_text_processor", "target_port": "text_in"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"source_id": "remote_text_processor", "source_port": "length",
|
||
|
|
"target_id": "sub_graph_node", "target_port": "sub_in_1"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"source_id": "main_input", "source_port": "main_num",
|
||
|
|
"target_id": "sub_graph_node", "target_port": "sub_in_2"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"source_id": "sub_graph_node", "source_port": "sub_ratio",
|
||
|
|
"target_id": "main_output", "target_port": "final_ratio"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"interface": {
|
||
|
|
"inputs": {
|
||
|
|
"main_text": "string",
|
||
|
|
"main_num": "integer"
|
||
|
|
},
|
||
|
|
"outputs": {
|
||
|
|
"final_ratio": "float"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|