Fix ValidateHealthState null issue by correcting facade lifecycle and base class integration#1073
Fix ValidateHealthState null issue by correcting facade lifecycle and base class integration#1073robertsmns wants to merge 1 commit intodevfrom
Conversation
… redundant ValidateHealthState, switching Activate/Deactivate to overrides, and invoking base lifecycle methods.
|
Some things which are important here:
Answer to your questions:
This depends highly on the implementation. Maybe we could analyze the usages and find a more general solution or better automatism in MORYX 12. We also thought about Facade-proxies which provides the ValidateHealthState before each call to the facade.
As I said before. This depends on the implementation. This must be analyzed. The ProcessEngine-facades register the events on activate and then start the internal components. This will raise events from the facade during the start process. I don't know if this has side-effects until now. I remember the NotificationSource-facade was activated very early to publish notifications during the start process. This was more or less an issue that the NotificationPublisher was not getting the actual state from the facade when it was activated.
|
Description
In OrderManagement, the OrderManagementFacade exposed ValidateHealthState as null during early calls from external endpoints (e.g., Factory Monitor) that resolve the facade via its interface before the facade is activated. This leads to a
NullReferenceExceptionon the first method invocation.As a precedent, the ProcessEngine’s ModuleController activates its facades first, preventing this issue; OrderManagement behaved differently.
Already changed
What still needs to be done