State machine - creating a rental delegate contract
Description
The following state machine presents a rental delegate contract creation process.
Rental delegate contract shows that a person (whatever its type, except unknown person and group person) who owns 1 or more parts, is contracting with a real estate agency for managing and renting all or party of its parts to a tenant. E.g. a flat only ; or a flat + a garage...
Throughout its creation process, the rental delegate contract object created could have the following state :
DRAFT: first state of the creation process. After completing some information, contract has been correctly sent and recordered into the BE, and, through its Id, can become referenceable by other object. The contract can be updated (e.g the payload can be freely change in one or more attribute.s)READY TO SIGN: the action "finalyse offer" allows to transition fromDRAFTtoREADY TO SIGN. That means that the offer (the RDC) is ready to be printed out, sent for signature to the customer.
important : to be in READY TO SIGN state, an easyId must be given. see Attributes Dictionary, chapter related to "master contract data"
The contract can be updated (e.g the payload can be freely change), but can't go back to DRAFT state
CANCELLED: it might happen that for any reason, the customer won't sign. In such a case, the RDC canot be deleted, because the easyId that had been given in the previous state must be kept, and won't be used again.SIGNED: once printed, contract will be signed by both parties and scanned. The uplaod of the scanned document by a end-user, that will confirm that the RDC is ok, will turn the delegate contract in final stateSIGNED.TERMINATED: a contract might end for different reasons
Diagram
Note : this diagram contains no guards nor validation. Those are included in a separate file.