persistence - Design - how do i handle events on persisted objects as they change state? -


Maybe it's a silly question, but I'm a cheat developer.

Data-driven CRM's app, I have a customer type that can go through several steps - that is step 1 - 5.

As a change in a customer step - Events should be triggered - Example - A customer enters from step 2 to step 3, an email is sent, some lists are updated and some calculations Is executed.

I'm thinking that changing the status of a customer can be the result of the user's application to manually update the client through some graphic interface.

So I am thinking - should I handle this matter that is the only way to update the stage phase of the customer, and then insure that whenever this action is completed, a list of tasks Is prepared?

In my mind (and scenario) it means that to get a customer back from a relational database, updating the area of ​​one step, to keep the customer back, and to always give feedback to this verb Whatever action is taken, it depends on that particular phase change. Although I am not sure if I want to change the batch phase of 10.000 customers, then it will be smart.

Any thoughts on this? I'm really looking for any kind of input - let's say I'm totally unaware.

I think it's okay to do different things, the same customer for phase changes and another one For batch change The latter will not do additional activities as needed or it can do it more efficiently, or even tasks, or a part of them, such as sending e-mails, for background processing, if additional work is long There are times and steps necessary to complete the phase change.

Changes in phase due to some manual phase changes, possibly complex, phase changes due to the conditions being generated. Then you should check any condition in your business logic, very little to capture all the update operations that affect the phase. But as you have written, it is not because the phase changes in your situation have been manually released.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -