ELSA Workflow:The ReceiveMassTransitMessage activity does not resume after the suspended state

117 Views Asked by At

ELSA Workflow Issue: The ReceiveMassTransitMessage activity does not resume after the suspended state. The MassTransit bus message is normally consumed, but the workflow itself is suspended and does not resume back. does anyone know what is the problem.

Here is the sample code which I was trying

  [HttpPost("test")]
    public async Task<IActionResult> TestAsync()
    {
        await _publishEndpoint.Publish(new Test());
        return Ok();
    }
        
`    public class ApprovalWorkflow : IWorkflow
    {
        public void Build(IWorkflowBuilder builder)
        {
            builder
                .WithDisplayName("My Workflow")
                .WithId("My Workflow")
                .Then<InitWorkflow>()
                .Then<ReceiveMassTransitMessage>(activity => activity.Set(x => x.MessageType, x => typeof(Test)))
                .WriteLine(context => $"Received Test message");
        }
    }`
0

There are 0 best solutions below