In CQRS + ES how to change business rules (or a business rules parameter) affecting the state of an aggregate.
Simple example, the rule :
Pass account to prenium when the order count is more than 10 orders
Obviously, there is :
- AccountAggregate
- AddOrderCommand
- OrderAddedEvent
- AccountPassedPreniumEvent
(there are other commands et events but not mentioned here for simplify)
the rule is applied in AccountAggregate and generate AccountPassedPreniumEvent after a test on order count. This event is projected to a read model
this rule come with the first deployement. Ok, now there are 1000 prenium. The boss change the rule because the business is impacted, and want to pas prenium where the order count is more than 20.
How to pass to standard account the account with more than 10 orders but less than 20 ?
Thanks for your help.
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/dddcqrs.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/dddcqrs.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/dddcqrs.
For more options, visit https://groups.google.com/d/optout.