mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-28 20:16:34 +08:00
将流程事件接口与流程运行环境解耦。
This commit is contained in:
@@ -227,12 +227,12 @@ namespace Serein.NodeFlow.Model
|
||||
};
|
||||
|
||||
var envEvent = (IFlowEnvironmentEvent)context.Env;
|
||||
envEvent.OnFlowRunComplete += onFlowStop; // 防止运行后台流程
|
||||
envEvent.FlowRunComplete += onFlowStop; // 防止运行后台流程
|
||||
|
||||
if (token.IsCancellationRequested) return null;
|
||||
|
||||
var result = await ScriptInterpreter.InterpretAsync(scriptContext, mainNode); // 从入口节点执行
|
||||
envEvent.OnFlowRunComplete -= onFlowStop;
|
||||
envEvent.FlowRunComplete -= onFlowStop;
|
||||
return new FlowResult(this, context, result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user