Here is a situation
AR raises multiple events in its business method
AR1.dosomething(somedata sData) {
do some logic
apply(new Event1)
do some logic
apply(new Event2)
}
AR1.onEvent1() {
change ARstate
}
Now AR2 needs to handle Event2, but it has not been created via command handler or retrieved from a repository i.e. it does not exist, however…this event2 needs to generate a new AR and handle event2…and it needs to generate event3 which is handled by AR1
AR1.onEvent3() //this was generated by AR2
…don’t think this can be done…this is cross bounded context communication and handling.
Any thoughts?? Is this appropriate for Saga use?? any elaboration of ideas by leveraging above example would be great.
Thanks