Send into Catch

7 views
Skip to first unread message

Алексей Токарев

unread,
Dec 26, 2018, 7:20:18 AM12/26/18
to masstransit-discuss
Hi there, I have a problem. I need use "Send" into "Catch" if I get an Exception. This code in never enter in method GetUriFor. What I have made wrong, help please

Code example:

When(SignDealEvent)
                    .ThenAsync(ctx =>
                        _applicationManager.SignDeal(MapEventFromTo<SmApplicationSignDealEvent, SignDealDto>(ctx.Data)))
                    .TransitionTo(DealSigned)
                    .Send((saga, ce) => GetUriFor(GetForLotSignDealApprovedEvent(ce.ProcedureType)),
                        ctx => MapEventFromTo<SmApplicationSignDealEvent, LotSignDealApprovedEvent>(ctx.Data))
                    .Catch<BusinessLogicException>(ex =>
                                                         ex.Then(ctx => _logger.Info($"There is an error. {ctx.Data.Id}. {ctx.Data.ProcedureType}"))
                                                             .Send<ApplicationSaga, SmApplicationSignDealEvent, BusinessLogicException, LotSignDealRejectedEvent>(
                                                                  (saga, ce) => GetUriFor(GetForLotSignDealRejectedEvent(ce.ProcedureType)),
                                                                  MapEventFromTo<SmApplicationSignDealRejectedEvent, LotSignDealRejectedEvent>
                                                                      (new SmApplicationSignDealRejectedEvent())))
Reply all
Reply to author
Forward
0 new messages