This commit is contained in:
yumoqing 2026-03-17 11:32:18 +08:00
parent 6ba3b544c0
commit 0f79e07c12

View File

@ -351,16 +351,19 @@ where backid=${backid}$
continue
cond = edge.get('when')
if cond and not safe_eval_condition(cond, {'ctx': ctx}):
debug(f'{cond=}, {ctx=},不匹配分支,{edge=}')
continue
m_on = edge.get('foreach')
if m_on:
on_array = safe_eval_condition(m_on, ctx)
for e in on_array:
nnodes.append((edge['to'], str(e)))
nnodes.append((edge['to'], str(e), edge.copy()))
else:
nnodes.append((edge['to'], None))
nnodes.append((edge['to'], None, edge.copy()))
for node_id, ctx_ext in nnodes:
if len(nnodes) == 0:
debug(f'{ne=}, {edge}, 没有找到下一个节点')
for node_id, ctx_ext, edge in nnodes:
node = dsl['nodes'][node_id]
if isinstance(ctx_ext, dict) or isinstance(ctx_ext, list):
ctx_ext = json.dumps(ctx_ext, ensure_ascii=False)
@ -402,6 +405,8 @@ where backid=${backid}$
continue
await sor.C('node_execution', ns)
else:
debug(f'{node=}, {edge=}, {inst=}is_ok_to_create_new_node_exe() 返回了{x}'
async def is_ok_to_create_new_node_exe(self, sor, node, edges, inst):
join = node.get('join')