我正在使用CodeEffects规则编辑器来创建具有动态操作和属性的编辑器。由于需求是动态的,因此我在其文档中使用了CodeEffects提供的FlexSource类型选项。但是,当我尝试使用相同的规则保存规则时,出现了异常。
An unhandled exception has occurred while executing the request.
CodeEffects.Rule.Common.SourceException: No method with "[NULL]" value of the "token" attribute found. (#112)
at CodeEffects.Rule.Core.SourceLoader.GetMethodByToken(XmlNode sourceXml, String token, Boolean isMethod, ErrorIds errorTag, Type sourceObject)
at CodeEffects.Rule.Core.RuleValidator.ValidateSourceSection(List`1 items, XmlDocument sourceXml, String sourceName, XmlDocument help, Boolean noActionsAllowed, List`1 list, Int32& i, Type sourceObject)
at CodeEffects.Rule.Core.RuleValidator.DoValidate(XmlDocument help, List`1 items, XmlDocument source, Boolean noActionsAllowed, Type sourceObject)
at CodeEffects.Rule.Core.RuleValidator.Validate(List`1 items, XmlDocument source, Boolean noActionsAllowed, Type sourceObject)
at CodeEffects.Rule.Models.RuleModel.IsValid(GetRuleDelegate ruleDelegate)
at CodeEffects.Rule.Web.RuleEditor.LoadClientData(String ruleClientData)
at CodeEffect.FlexType.Controllers.HomeController.SaveRule(ClientRequest data) in /home/hbhudrani/Enviso/tmp/CodeEffect.FlexType/Controllers/HomeController.cs:line 65
at lambda_method(Closure , Object , Object[] )
at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
我还尝试检查他们的演示项目中是否发生了相同的事情,或者工作正常。因此,当我使用.net核心应用程序时,我将其演示项目源(在此处https://codeeffects.com/Doc/Business-Rule-Demo-Project找到)转换为.net核心应用程序。除了转换外,我什么都没改变。运行项目后,我遇到了同样的异常。