You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by franjosuerr November 29, 2024
at Elsa.Expressions.Models.ExpressionExecutionContext.GetBlock(MemoryBlockReference blockReference) at Elsa.Expressions.Models.ExpressionExecutionContext.Get(MemoryBlockReference blockReference) at Elsa.Expressions.Models.MemoryBlockReference.Get(ExpressionExecutionContext context) at Elsa.Workflows.Expressions.VariableExpressionHandler.EvaluateAsync(Expression expression, Type returnType, ExpressionExecutionContext context, ExpressionEvaluatorOptions options) at Elsa.Expressions.Services.ExpressionEvaluator.EvaluateAsync(Expression expression, Type returnType, ExpressionExecutionContext context, ExpressionEvaluatorOptions options) at Elsa.Extensions.ActivityExecutionContextExtensions.EvaluateInputPropertyAsync(ActivityExecutionContext context, ActivityDescriptor activityDescriptor, InputDescriptor inputDescriptor) at Elsa.Extensions.ActivityExecutionContextExtensions.EvaluateInputPropertiesAsync(ActivityExecutionContext context) at Elsa.Workflows.Middleware.Activities.DefaultActivityInvokerMiddleware.EvaluateInputPropertiesAsync(ActivityExecutionContext context) at Elsa.Workflows.Middleware.Activities.DefaultActivityInvokerMiddleware.InvokeAsync(ActivityExecutionContext context) at Elsa.Workflows.Middleware.Activities.NotificationPublishingMiddleware.InvokeAsync(ActivityExecutionContext context) at Elsa.Workflows.Middleware.Activities.ExecutionLogMiddleware.InvokeAsync(ActivityExecutionContext context) at Elsa.Workflows.Middleware.Activities.ExceptionHandlingMiddleware.InvokeAsync(ActivityExecutionContext context)
When I run a flowchart workflow where I pass a numeric value to an activity as a parameter, I get this error. I fix it by removing the default constructor in this activity, but when I remove it, I get a JSON exception. According to the documentation, the default constructor is necessary, but it blocks the execution of the activities.
The text was updated successfully, but these errors were encountered:
thanks to @sfmskywalker i solved it
He recommended me:
1-On the Activity class, make sure it has a default constructor that is decorated with the [JsonConstructor] attribute.
2-In the workflow class, make sure that the variables are scoped to the workflow. builder.WithVariable is a helper for that.
Discussed in #6167
Originally posted by franjosuerr November 29, 2024
at Elsa.Expressions.Models.ExpressionExecutionContext.GetBlock(MemoryBlockReference blockReference) at Elsa.Expressions.Models.ExpressionExecutionContext.Get(MemoryBlockReference blockReference) at Elsa.Expressions.Models.MemoryBlockReference.Get(ExpressionExecutionContext context) at Elsa.Workflows.Expressions.VariableExpressionHandler.EvaluateAsync(Expression expression, Type returnType, ExpressionExecutionContext context, ExpressionEvaluatorOptions options) at Elsa.Expressions.Services.ExpressionEvaluator.EvaluateAsync(Expression expression, Type returnType, ExpressionExecutionContext context, ExpressionEvaluatorOptions options) at Elsa.Extensions.ActivityExecutionContextExtensions.EvaluateInputPropertyAsync(ActivityExecutionContext context, ActivityDescriptor activityDescriptor, InputDescriptor inputDescriptor) at Elsa.Extensions.ActivityExecutionContextExtensions.EvaluateInputPropertiesAsync(ActivityExecutionContext context) at Elsa.Workflows.Middleware.Activities.DefaultActivityInvokerMiddleware.EvaluateInputPropertiesAsync(ActivityExecutionContext context) at Elsa.Workflows.Middleware.Activities.DefaultActivityInvokerMiddleware.InvokeAsync(ActivityExecutionContext context) at Elsa.Workflows.Middleware.Activities.NotificationPublishingMiddleware.InvokeAsync(ActivityExecutionContext context) at Elsa.Workflows.Middleware.Activities.ExecutionLogMiddleware.InvokeAsync(ActivityExecutionContext context) at Elsa.Workflows.Middleware.Activities.ExceptionHandlingMiddleware.InvokeAsync(ActivityExecutionContext context)
When I run a flowchart workflow where I pass a numeric value to an activity as a parameter, I get this error. I fix it by removing the default constructor in this activity, but when I remove it, I get a JSON exception. According to the documentation, the default constructor is necessary, but it blocks the execution of the activities.
The text was updated successfully, but these errors were encountered: