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
Quick summary and/or background
I'm contemplating incorporating elsa3 in a project that I'm working on, currently validating through a POC which involves some custom blocking activities that produce bookmarks, as documentation is still work in progress, i got used to examining the source code to try to figure things out on my own, for example (passing callbacks when creating bookmarks)so far so good. Until I ran into a scenario where i have to use ParallelForEach Activity.
**I'm using **
Elsa 3.23 packages with server persistence EF Postgres (Although i doubt that it's relevant)
My theory based on what i understood from the source, is that ParallelForEach maintains a list of tags List and assigns each child loop an Guid tag, on child complete , the main activity (ParallelForEach) tracks if any other children are still active and needs to obtain the variable (either from runtime memory or persistance, depending if it got suspended or not) when it needs to suspent the serialization process is bugged where its unable to deserialize it back to List and an exception is thrown originating from
In designer, create a simple workflow definition that includes only one ParallelForEach activity, pass any input list in it's item to have it run some child activities.
Inside the body of ParallelForEach add a Delay activity with any timespan (the body needs to be blocking activity to put the flow in suspend and force it to store it's variables in store)
run an instance
Expected
The flow runs to completion
What actually happens
Right after the a delay completes the activity is faulted with
Elsa.Expressions.Exceptions.TypeConversionException
Failed to deserialize {"$values":["5f2d3133-ec5e-47ec-98a9-b8a3363ad936","709392ce-55e7-4b97-9e5f-a6c303c21201"],"_type":"Guid[]"} to System.Collections.Generic.List`1[System.Guid]
Elsa.Expressions.Helpers.ObjectConverter.ConvertTo(Object value, Type targetType, ObjectConverterOptions converterOptions) at
Elsa.Expressions.Helpers.ObjectConverter.ConvertTo(Object value, Type targetType, ObjectConverterOptions converterOptions) at
Elsa.Expressions.Helpers.ObjectConverter.ConvertTo[T](Object value, ObjectConverterOptions converterOptions) at
Elsa.Extensions.DictionaryExtensions.ConvertValue[T](Object value) at
Elsa.Extensions.DictionaryExtensions.TryGetValue[TKey,T](IDictionary`2 dictionary, TKey key, T& value) at
Elsa.Extensions.DictionaryExtensions.TryGetValue[T](IDictionary`2 dictionary, String key, T& value) at
Elsa.Workflows.ActivityExecutionContext.GetProperty[T](String key) at
Elsa.Workflows.Activities.ParallelForEach`1.OnChildCompleted(ActivityCompletedContext context) at
Elsa.Workflows.Behaviors.ScheduledChildCallbackBehavior.OnActivityCompletedAsync(ActivityCompleted signal, SignalContext context) at
Elsa.Workflows.Behavior.Elsa.Workflows.Contracts.ISignalHandler.ReceiveSignalAsync(Object signal, SignalContext context) at
Elsa.Workflows.Activity.Elsa.Workflows.Contracts.ISignalHandler.ReceiveSignalAsync(Object signal, SignalContext context) at
Elsa.Extensions.ActivityExecutionContextExtensions.SendSignalAsync(ActivityExecutionContext context, Object signal) at
Elsa.Workflows.ActivityExecutionContext.CompleteActivityAsync(Object result) at
Elsa.Workflows.Activities.Flowchart.Activities.Flowchart.OnChildCompletedAsync(ActivityCompletedContext context) at
Elsa.Workflows.Behaviors.ScheduledChildCallbackBehavior.OnActivityCompletedAsync(ActivityCompleted signal, SignalContext context) at
Elsa.Workflows.Behavior.Elsa.Workflows.Contracts.ISignalHandler.ReceiveSignalAsync(Object signal, SignalContext context) at
Elsa.Workflows.Activity.Elsa.Workflows.Contracts.ISignalHandler.ReceiveSignalAsync(Object signal, SignalContext context) at
Elsa.Extensions.ActivityExecutionContextExtensions.SendSignalAsync(ActivityExecutionContext context, Object signal) at
Elsa.Workflows.ActivityExecutionContext.CompleteActivityAsync(Object result) at
Elsa.Workflows.Behaviors.AutoCompleteBehavior.ExecuteAsync(ActivityExecutionContext context) at
Elsa.Workflows.Behavior.Elsa.Workflows.Contracts.IBehavior.ExecuteAsync(ActivityExecutionContext context) at
Elsa.Workflows.Activity.Elsa.Workflows.Contracts.IActivity.ExecuteAsync(ActivityExecutionContext context) at
Elsa.Workflows.Middleware.Activities.DefaultActivityInvokerMiddleware.ExecuteActivityAsync(ActivityExecutionContext context) at
Elsa.Workflows.Runtime.Middleware.Activities.BackgroundActivityInvokerMiddleware.ExecuteActivityAsync(ActivityExecutionContext context) at
Elsa.Workflows.Middleware.Activities.DefaultActivityInvokerMiddleware.InvokeAsync(ActivityExecutionContext context) at
Elsa.Workflows.Middleware.Activities.Notificat
ionPublishingMiddleware.InvokeAsync(ActivityExecutionContext context) at
Elsa.Workflows.Middleware.Activities.ExecutionLogMiddleware.InvokeAsync(ActivityExecutionContext context)
Thank you very much for your efforts and a great project!
The text was updated successfully, but these errors were encountered:
Quick summary and/or background
I'm contemplating incorporating elsa3 in a project that I'm working on, currently validating through a POC which involves some custom blocking activities that produce bookmarks, as documentation is still work in progress, i got used to examining the source code to try to figure things out on my own, for example (passing callbacks when creating bookmarks)so far so good. Until I ran into a scenario where i have to use ParallelForEach Activity.
**I'm using **
Elsa 3.23 packages with server persistence EF Postgres (Although i doubt that it's relevant)
My theory based on what i understood from the source, is that ParallelForEach maintains a list of tags List and assigns each child loop an Guid tag, on child complete , the main activity (ParallelForEach) tracks if any other children are still active and needs to obtain the variable (either from runtime memory or persistance, depending if it got suspended or not) when it needs to suspent the serialization process is bugged where its unable to deserialize it back to List and an exception is thrown originating from
elsa-core/src/modules/Elsa.Expressions/Helpers/ObjectConverter.cs
Line 127 in ff0b5ee
Steps to reproduce
Expected
The flow runs to completion
What actually happens
Right after the a delay completes the activity is faulted with
Thank you very much for your efforts and a great project!
The text was updated successfully, but these errors were encountered: