serverlessworkflow / synapse

Serverless Workflow Management System (WFMS)
https://serverlessworkflow.io
Apache License 2.0
226 stars 35 forks source link

Missing cloud event bus service #371

Closed JBBianchi closed 4 weeks ago

JBBianchi commented 1 month ago

What happened: When running a workflow with an emit event task, an error occurs:

  A critical exception occurred while executing the workflow instance 'emit-event-b0c37b9941c345f.default': System.InvalidOperationException: Unable to resolve service for type 'Neuroglia.Eventing.CloudEvents.Infrastructure.Services.ICloudEventBus' while attempting to activate 'Synapse.Runner.Services.Executors.EmitTaskExecutor'.
     at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
     at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
     at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance[T](IServiceProvider provider, Object[] parameters)
     at Synapse.Runner.Services.TaskExecutorFactory.Create(IServiceProvider serviceProvider, ITaskExecutionContext context) in C:\Dev\Neuroglia\Github\synapse\src\runner\Synapse.Runner\Services\TaskExecutorFactory.cs:line 34
     at Synapse.Runner.Services.WorkflowExecutor.CreateTaskExecutorAsync(TaskInstance task, TaskDefinition definition, IDictionary`2 contextData, IDictionary`2 arguments, CancellationToken cancellationToken) in C:\Dev\Neuroglia\Github\synapse\src\runner\Synapse.Runner\Services\WorkflowExecutor.cs:line 219
     at Synapse.Runner.Services.WorkflowExecutor.StartAsync(CancellationToken cancellationToken) in C:\Dev\Neuroglia\Github\synapse\src\runner\Synapse.Runner\Services\WorkflowExecutor.cs:line 136
     at Synapse.Runner.Services.WorkflowExecutor.ExecuteAsync(CancellationToken cancellationToken) in C:\Dev\Neuroglia\Github\synapse\src\runner\Synapse.Runner\Services\WorkflowExecutor.cs:line 107

What you expected to happen: The event to be emitted.

How to reproduce it:

document:
  dsl: 1.0.0
  namespace: default
  name: emit-event
  version: 0.1.0
do:
- emitAnEvent:
    emit:
      event:
        with:
          source: https://server.com
          type: com.server.type.v1
          data:
            payload: ${ .payload }

Anything else we need to know?:

Environment: Native .NET