mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-14 21:46:35 +08:00
流程返回值改为FlowResult,记录节点信息、上下文信息,为以后的流程调用回溯做准备
This commit is contained in:
@@ -36,7 +36,7 @@ namespace Serein.NodeFlow.Model
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <returns></returns>
|
||||
public override async Task<object?> ExecutingAsync(IDynamicContext context, CancellationToken token)
|
||||
public override async Task<FlowResult> ExecutingAsync(IDynamicContext context, CancellationToken token)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -45,7 +45,7 @@ namespace Serein.NodeFlow.Model
|
||||
{
|
||||
if (token.IsCancellationRequested)
|
||||
{
|
||||
return null;
|
||||
return new FlowResult(this, context);
|
||||
}
|
||||
var state = await node.ExecutingAsync(context, token);
|
||||
if (context.NextOrientation != ConnectionInvokeType.IsSucceed)
|
||||
@@ -56,7 +56,8 @@ namespace Serein.NodeFlow.Model
|
||||
}
|
||||
|
||||
//var previousNode = context.GetPreviousNode()
|
||||
return context.TransmissionData(this); // 条件区域透传上一节点的数据
|
||||
var result = context.TransmissionData(this); // 条件区域透传上一节点的数据
|
||||
return new FlowResult(this,context, result);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user