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
Hi @sfmskywalker, I am encountering an issue with workflows when using int variables stored in the workflow instance. Can you take a look at here? Thank you so much!
Steps to Reproduce
Add a variable type Int32 with Storage Workflow Instance
Add activity Set Variable to set it to 0, 1, 2… with default input type (not C# or JavaScript)
Add Delay activity and set delay time to 10s
Execute Workflow
Result
Workflow stuck at Suspend state and the Delay activity also got stuck but did not throw any exception
Expect behavior
Workflow resume and continue
Exception:
System.Text.Json.JsonException: The JSON value could not be converted to System.Int32. Path: $ | LineNumber: 0 | BytePositionInLine: 5.
---> System.InvalidOperationException: Cannot get the value of a token type 'String' as a number.
at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(JsonTokenType tokenType)
at System.Text.Json.Utf8JsonReader.TryGetInt32(Int32& value)
at System.Text.Json.Utf8JsonReader.GetInt32()
at System.Text.Json.Serialization.Converters.Int32Converter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, Utf8JsonReader& reader, Exception ex)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.Deserialize(Utf8JsonReader& reader, ReadStack& state)
at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsObject(Utf8JsonReader& reader, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadFromSpanAsObject(ReadOnlySpan`1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable`1 actualByteCount)
at System.Text.Json.JsonSerializer.ReadFromNodeAsObject(JsonNode node, JsonTypeInfo jsonTypeInfo)
at System.Text.Json.JsonSerializer.Deserialize(JsonNode node, Type returnType, JsonSerializerOptions options)
at Elsa.Expressions.Helpers.ObjectConverter.ConvertTo(Object value, Type targetType, ObjectConverterOptions converterOptions)
at Elsa.Extensions.VariableExtensions.ParseValue(Variable variable, Object value)
at Elsa.Workflows.Services.VariablePersistenceManager.LoadVariablesAsync(WorkflowExecutionContext workflowExecutionContext)
at Elsa.Workflows.Runtime.Middleware.Workflows.PersistentVariablesMiddleware.InvokeAsync(WorkflowExecutionContext context)
at Elsa.Workflows.Runtime.Middleware.Workflows.PersistWorkflowExecutionLogMiddleware.InvokeAsync(WorkflowExecutionContext context)
at Elsa.Workflows.Runtime.Middleware.Workflows.PersistActivityExecutionLogMiddleware.InvokeAsync(WorkflowExecutionContext context)
at Elsa.Workflows.Runtime.Middleware.Workflows.PersistBookmarkMiddleware.InvokeAsync(WorkflowExecutionContext context)
at Elsa.Workflows.Runtime.Middleware.Workflows.ScheduleBackgroundActivitiesMiddleware.InvokeAsync(WorkflowExecutionContext context)
at Elsa.Workflows.Middleware.Workflows.EngineExceptionHandlingMiddleware.InvokeAsync(WorkflowExecutionContext context)
Note:
This issue does not happen with storage Workflow or memory and C#, JavaScript also return int. So there maybe a problem in the process deserialize data in workflow instance
Need to explore more case with set variable because it do not throw exception at the set step.
Hi @sfmskywalker, I am encountering an issue with workflows when using int variables stored in the workflow instance. Can you take a look at here? Thank you so much!
Steps to Reproduce
Result
Workflow stuck at Suspend state and the Delay activity also got stuck but did not throw any exception
Expect behavior
Workflow resume and continue
Exception:
Note:
This issue does not happen with storage Workflow or memory and C#, JavaScript also return int. So there maybe a problem in the process deserialize data in workflow instance
Need to explore more case with set variable because it do not throw exception at the set step.
Environment
Export json
workflow-1.json
The text was updated successfully, but these errors were encountered: