Hi,
I've had some experience with the Magnum state machine which works great with masstransit.
but I saw that the Automatonymous state machine is the most recent project between the 2 and so i tried it.
I've given it few hours of experimenting, overcame few bumps along the way, but eventually reached a "brick-wall" - which could be a bug or misuse by me.
I've attached my state machine definitions below. note that the states and events declarations are built using compiled expression at runtime (so this is not the issue).
i'm currently getting "The message cannot be accepted by an existing saga" exception which is fired by InitiatingSagaPolicy class for PushNotificationRequest .
I'm trying to figure out the machine flow, but it seems this happens since InitiatingSagaPolicy is assigned to handle this message type.all because of this lineIEnumerable<State> states = _stateMachine.States.Where(state => _stateMachine.NextEvents(state).Contains(@event));at StateMachineConnector class, which returns only the initial state - since it's the only state that its next states are EvaluateRequest.
Note that i'm doing something that worked without any problem with magnum - at the initalizeSaga method i'm publishing the next message in the machine,thus - advancing the machine's state myself (rather than waiting for external message to be received.the mentioned method looks like this:public void InitializeSaga(PushSagaEntity entity, PushNotificationRequest msg) { entity.MessageId = msg.MessageId; entity.AppId = msg.AppId; entity.Originator = msg.Originator; entity.CreatedDate = entity.UpdatedDate = msg.Timestamp; entity.DeviceType = msg.DeviceType; entity.Message = msg.Message; entity.BadgeCount = msg.Badge; entity.PushData = msg.PushData; Bus.Publish<PushNotificationRequestEvaluation>(m => { m.CorrelationId = msg.CorrelationId; m.MessageId = msg.MessageId; m.AppId = msg.AppId; m.Originator = msg.Originator; m.Timestamp = msg.Timestamp; m.DeviceType = msg.DeviceType; m.Message = msg.Message; m.Badge = msg.Badge; m.PushData = msg.PushData; m.Range = msg.Range; }); }additional info:
- when removing the publish call in InitializeSaga method - machine work ok (although i'm stuck at initial state)
- when uncommenting the DuringAny call in machine declaration enters the machine into infinite loop calls to InitializeSaga method
I'm think to fallback to the regular Magnum machine, but would really like to keep my current work with Automatonymousthanks in advanceMaor--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/496de601-4fcd-4bc4-a6e1-647f447f3864%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/cbe898a1-1e87-4ea5-b569-eb5ca0501daa%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsubscribe...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/496de601-4fcd-4bc4-a6e1-647f447f3864%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.