State machine - Referencing a natural person
Description
The following state machine presents a natural person creation process. The process starts with an INITIAL state. Throughout its creation process, the natural person object created could have the following state :
REFERENCED: object has been correctly sent and recordered into the BE, and, through its Id, can become referenceable by other object.Guard : in order to avoid duplicate, a guard checks the existence of prerequisite data, like for instance an email address. If this address already exist in the database, it won't be possible to reference a person with this same address
PROVISIONED: once referenced, object can receive complementary informations if not yet existing. If informations are already existing, they will be replaced by the one coming from the provision action.
NOTE : the cloud function "naturalPersonOnGenericContract" calls this state machine when a generic contract is trigerred after the scan process