elsa-core icon indicating copy to clipboard operation
elsa-core copied to clipboard

Error CollectAndExecuteWorkflowsAsync version Elsa 2.9.0

Open TreF555 opened this issue 2 years ago • 1 comments

Error await _workflowLaunchpad.CollectAndExecuteWorkflowsAsync(query, input);


private readonly IWorkflowLaunchpad _workflowLaunchpad;

var @event ={
 public string WorkflowInstanceId { get; set; }
public string ActivityId { get; set; }
public string ContextId { get; set; }
public Guid CorrelationId { get; set; }
public string DictionaryValue { get; set; }
}
		
var input = new WorkflowInput(@event);
var activityType = nameof(ValueSetStateActivity); //ValueSetStateActivity - custom activity
var bookmark = new ValueSetStateBookmark(@event.DictionaryValue);
var query = new WorkflowsQuery(activityType
, bookmark
, CorrelationId: @event.CorrelationId.ToCorrelation() //stringValue
, WorkflowInstanceId: @event.WorkflowInstanceId
, ContextId: @event.ContextId
);
var workflowList = await _workflowLaunchpad.CollectAndExecuteWorkflowsAsync(query, input); <= Error 
◢ | exception | {"The entity type 'string' was not found. Ensure that the entity type has been added to the model."} | System.Exception {System.InvalidOperationException}
			
ErrorText
The entity type 'string' was not found. Ensure that the entity type has been added to the model.
StackTrace:
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.GetOrCreateEntry(Object entity)
   at Microsoft.EntityFrameworkCore.DbContext.EntryWithoutDetectChanges[TEntity](TEntity entity)
   at Microsoft.EntityFrameworkCore.DbContext.Remove[TEntity](TEntity entity)
   at Elsa.Persistence.EntityFramework.Core.Extensions.QueryableBulkExtensions.<BatchDeleteWithWorkAroundAsync>d__0`1.MoveNext()
   at Elsa.Persistence.EntityFramework.Core.Stores.EntityFrameworkStore`2.<>c__DisplayClass11_0.<<DeleteManyAsync>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult()
   at Elsa.Persistence.EntityFramework.Core.Stores.EntityFrameworkStore`2.<DoWork>d__21`1.MoveNext()
   at Elsa.Persistence.EntityFramework.Core.Stores.EntityFrameworkStore`2.<DoWork>d__21`1.MoveNext()
   at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult()
   at Elsa.Persistence.EntityFramework.Core.Stores.EntityFrameworkStore`2.<DeleteManyAsync>d__11.MoveNext()
   at Elsa.Services.Bookmarks.BookmarkIndexer.<IndexBookmarksAsync>d__13.MoveNext()
   at Elsa.Handlers.UpdateBookmarksAndRunPostTasks.<Handle>d__3.MoveNext()
   at MediatR.Mediator.<PublishCore>d__9.MoveNext()
   at Elsa.Services.Workflows.WorkflowRunner.<RunWorkflowInternalAsync>d__11.MoveNext()
   at Elsa.Services.Workflows.WorkflowRunner.<RunWorkflowAsync>d__10.MoveNext()
   at Elsa.Services.Workflows.WorkflowRunner.<RunWorkflowAsync>d__10.MoveNext()
   at Elsa.Services.Workflows.WorkflowResumer.<ResumeWorkflowAsync>d__11.MoveNext()
   at Elsa.Services.Workflows.WorkflowInstanceExecutor.<ExecuteAsync>d__8.MoveNext()
   at Elsa.Decorators.LockingWorkflowInstanceExecutor.<ExecuteAsync>d__6.MoveNext()
   at Elsa.Decorators.LockingWorkflowInstanceExecutor.<ExecuteAsync>d__6.MoveNext()
   at Elsa.Decorators.LockingWorkflowInstanceExecutor.<ExecuteAsync>d__6.MoveNext()
   at Elsa.Services.Workflows.WorkflowLaunchpad.<ExecutePendingWorkflowAsync>d__23.MoveNext()
   at Elsa.Services.Workflows.WorkflowLaunchpad.<ExecutePendingWorkflowsAsync>d__22.MoveNext()
   at Elsa.Services.Workflows.WorkflowLaunchpad.<CollectAndExecuteWorkflowsAsync>d__30.MoveNext()

TreF555 avatar Oct 15 '22 14:10 TreF555

Have you tried with the latest preview version of nuget ?

jdevillard avatar Oct 16 '22 12:10 jdevillard

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 15 '22 21:12 stale[bot]