bugfix
This commit is contained in:
parent
6ba3b544c0
commit
0f79e07c12
@ -351,16 +351,19 @@ where backid=${backid}$
|
|||||||
continue
|
continue
|
||||||
cond = edge.get('when')
|
cond = edge.get('when')
|
||||||
if cond and not safe_eval_condition(cond, {'ctx': ctx}):
|
if cond and not safe_eval_condition(cond, {'ctx': ctx}):
|
||||||
|
debug(f'{cond=}, {ctx=},不匹配分支,{edge=}')
|
||||||
continue
|
continue
|
||||||
m_on = edge.get('foreach')
|
m_on = edge.get('foreach')
|
||||||
if m_on:
|
if m_on:
|
||||||
on_array = safe_eval_condition(m_on, ctx)
|
on_array = safe_eval_condition(m_on, ctx)
|
||||||
for e in on_array:
|
for e in on_array:
|
||||||
nnodes.append((edge['to'], str(e)))
|
nnodes.append((edge['to'], str(e), edge.copy()))
|
||||||
else:
|
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]
|
node = dsl['nodes'][node_id]
|
||||||
if isinstance(ctx_ext, dict) or isinstance(ctx_ext, list):
|
if isinstance(ctx_ext, dict) or isinstance(ctx_ext, list):
|
||||||
ctx_ext = json.dumps(ctx_ext, ensure_ascii=False)
|
ctx_ext = json.dumps(ctx_ext, ensure_ascii=False)
|
||||||
@ -402,6 +405,8 @@ where backid=${backid}$
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
await sor.C('node_execution', ns)
|
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):
|
async def is_ok_to_create_new_node_exe(self, sor, node, edges, inst):
|
||||||
join = node.get('join')
|
join = node.get('join')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user