Skip to content

Commit

Permalink
bugfix: 优化节点运行之后独立子流程的展示
Browse files Browse the repository at this point in the history
  • Loading branch information
hanshuaikang committed Sep 5, 2023
1 parent c94c968 commit 260675b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gcloud/taskflow3/domains/dispatchers/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,8 @@ def get_node_data_v2(
node_id=self.node_id, pipeline=pipeline_instance.execution_data, subprocess_stack=subprocess_stack
)

node_code = node_info.get("component", {}).get("code")

if state:
# 获取最新的执行数据
if loop is None or int(loop) >= state[self.node_id]["loop"]:
Expand Down Expand Up @@ -502,6 +504,9 @@ def get_node_data_v2(
if node_info["type"] == "SubProcess":
# remove prefix '${' and subfix '}' in subprocess execution input
inputs = {k[2:-1]: v for k, v in data["inputs"].items()}
elif node_info["type"] == "ServiceActivity" and node_code == "subprocess_plugin":
raw_inputs = data["inputs"]["subprocess"]["pipeline"]["constants"]
inputs = {key[2:-1]: value.get("value") for key, value in raw_inputs.items()}
else:
inputs = data["inputs"]
outputs = data["outputs"]
Expand Down Expand Up @@ -576,6 +581,8 @@ def get_node_data_v2(
if node_info["type"] == "SubProcess":
# remove prefix '${' and subfix '}' in subprocess execution input
inputs = {k[2:-1]: v for k, v in preview_inputs.items()}
elif node_info["type"] == "ServiceActivity" and node_code == "subprocess_plugin":
inputs = {k[2:-1]: v for k, v in preview_inputs.items()}
else:
inputs = preview_inputs

Expand Down

0 comments on commit 260675b

Please sign in to comment.