diff --git a/Library.Core/DynamicContext.cs b/Library.Core/DynamicContext.cs
index 735a5f7..8f4eae4 100644
--- a/Library.Core/DynamicContext.cs
+++ b/Library.Core/DynamicContext.cs
@@ -40,6 +40,11 @@ namespace Serein.Library.Core
///
public ConnectionInvokeType NextOrientation { get; set; }
+ ///
+ /// 运行时异常信息
+ ///
+ public Exception ExceptionOfRuning { get; set; }
+
///
/// 每个流程上下文分别存放节点的当前数据
///
@@ -138,6 +143,10 @@ namespace Serein.Library.Core
disposable?.Dispose();
}
}
+ else
+ {
+
+ }
}
foreach (var nodeObj in ContextShareData.Values)
{
@@ -158,5 +167,92 @@ namespace Serein.Library.Core
RunState = RunState.Completion;
}
+
+ private void Dispose(ref IDictionary keyValuePairs)
+ {
+ foreach (var nodeObj in keyValuePairs.Values)
+ {
+ if (nodeObj is null)
+ {
+ continue;
+ }
+
+ if (nodeObj is IDisposable disposable) /* typeof(IDisposable).IsAssignableFrom(nodeObj?.GetType()) &&*/
+ {
+ disposable?.Dispose();
+ }
+ else if (nodeObj is IDictionary tmpDict)
+ {
+ Dispose(ref tmpDict);
+ }
+ else if (nodeObj is ICollection