mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-26 11:06:35 +08:00
重写了节点主动中断功能,修改了运行环境持久化注册已有实例的逻辑。
This commit is contained in:
@@ -24,11 +24,7 @@ namespace Serein.NodeFlow
|
||||
/// </summary>
|
||||
public NodeModelBase NodeModel { get; private set; }
|
||||
|
||||
public IDynamicContext? Context{ get; set; }
|
||||
|
||||
private string _paramsKey => $"{Context?.Guid}_{NodeModel.Guid}_Params";
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建流程脚本接口
|
||||
@@ -46,9 +42,10 @@ namespace Serein.NodeFlow
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public object? GetArgData(int index)
|
||||
public object? GetArgData(IDynamicContext context, int index)
|
||||
{
|
||||
var obj = Context?.GetFlowData(_paramsKey);
|
||||
var _paramsKey = $"{context?.Guid}_{NodeModel.Guid}_Params";
|
||||
var obj = context?.GetFlowData(_paramsKey);
|
||||
if (obj is object[] @params && index < @params.Length)
|
||||
{
|
||||
return @params[index];
|
||||
@@ -57,9 +54,9 @@ namespace Serein.NodeFlow
|
||||
}
|
||||
|
||||
|
||||
public object? GetFlowData()
|
||||
public object? GetFlowData(IDynamicContext context)
|
||||
{
|
||||
return Context?.GetFlowData(NodeModel.Guid);
|
||||
return context?.GetFlowData(NodeModel.Guid);
|
||||
}
|
||||
|
||||
public object? GetGlobalData(string keyName)
|
||||
|
||||
Reference in New Issue
Block a user