on State Changed
public final void onStateChanged(EntityRecordChange change, Set<? extends MessageId> messageIds, Origin origin)
Posts the EntityStateChanged system event and the events related to the lifecycle flags.
Only the actual changes in the entity attributes result into system events. If the previous and new values are equal, then no events are posted.
Parameters
change
the change in the entity state and attributes
message Ids
the IDs of the messages which caused the change
; typically, EventIds or CommandIds