Please unsubscribe me from this group.

125 views
Skip to first unread message

Prafulla Madhavrao Kulkarni

unread,
May 31, 2018, 11:41:10 AM5/31/18
to ddd...@googlegroups.com

Please unsubscribe me from this group. Thanks.

 

From: ddd...@googlegroups.com <ddd...@googlegroups.com> On Behalf Of jwoets
Sent: Thursday, May 31, 2018 7:27 PM
To: DDD/CQRS <ddd...@googlegroups.com>
Subject: [Ext] Re: [DDD/CQRS] Re: Event sourcing and how to change business rules

 

 

Yes it's better... In my concrete case, my domain expert is not very expert... and it's a problem with event sourcing.

 


Le jeudi 31 mai 2018 15:46:46 UTC+2, Greg Young a écrit :

Business rules don't normally change retroactively this seems a bit confused. If it did change retroactively then you would issue correcting events.

 

On Thu, May 31, 2018 at 8:40 PM, jwoets <joffre...@gmail.com> wrote:

So if the business logic change , i must get all events to apply a command for generate new event aind thus update the read model...

 

it's complex for a simple update of business parameter. 

 

A solution can not be apply this rule on read side and on the write side ?

 

On a read side : 

    when access to the read model from ui, i apply  the rule (dynamicly) => the read side is always up to date according the rule

 

On the write side:

    classically when apply the command...

 

I don't know if it's a good solution 



Le jeudi 31 mai 2018 15:12:51 UTC+2, Brad Irby a écrit :

If you are using ES, the core requirement  is to create the proper events to adjust the state of the aggregates.  Depending on business rules, that can be done in a few ways.

 

There is no requirement that code generating events needs to be permanent.  If you want to "fix the data", creating a small utility that cycles through all aggregates testing each one and generating AccountPassedStandardEvent events is acceptable.  Once complete you can throw that utility away.

 

If the business rule is that you must have 20 orders per rolling 12 months, then the logic should be baked into the Aggregates to create the AccountPassedStandardEvent when appropriate.  

 



On Thursday, May 31, 2018 at 9:57:27 AM UTC-3, jwoets wrote:

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+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/dddcqrs.
For more options, visit https://groups.google.com/d/optout.



 

--

Studying for the Turing test

--
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+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/dddcqrs.
For more options, visit https://groups.google.com/d/optout.

 

Schlumberger-Private

Reply all
Reply to author
Forward
0 new messages