Life ConnectLife Connect
Table of contents
Architecture
Services
Swagger Docs
GitHub
Table of contents
Architecture
Services
Swagger Docs
GitHub

Delete objects according to state machine

the following aims to give rules for deleting main objects : person, contract and part

PERSON

A person can be deleted if some conditions are met. The deletion (physical or not) will depend on the status of the person.

  1. CONDITIONS

    • it is not contained in another person. For instance a natural person can be member of union => If contained, return no deletion possible.

    • it is not part of a contract. E.g. a person can have a bank account (contract) => If part of a contract, return no deletion possible

    • it has no accounting entries related. A supplier can be stand alone, without any contract but can have accounting entries => If has entries, return no deletion possible

  2. STATUS

    Once conditions above have been checked, the deletion will take place according to the status

    • DRAFT : the record can be removed from the DB

    • ACTIVE : no physical deletion possible. The status of the person will be set to : ARCHIVED

  3. DIAGRAM

delete person diagram

CONTRACT

  • BANK CONTRACT

    A bank contract can be deleted if some conditions are met, and also depending on the status of the contract.
    note : a bank contract never triggers change of person status

    • CONDITIONS : the bank contract must NOT be used in another contract (e.g. in a rental contract)
    • STATUS : a physical deletion (only) can occur only if status is : DRAFT

delete bank contract diagram


  • LEGAL REPRESENTANT CONTRACT (04/2021 : old version, to be updated)

    a legal representant contract can always be deleted
    note : a legal representant contract never triggers change of person status (as of april 2021)

delete legal representant contract diagram


  • RENTAL DELEGATE CONTRACT (04/2021 : old version, to be updated)

delete Rental Delegate contract diagram


  • RENTAL CONTRACT (04/2021 : old version, to be updated)

delete Rental contract diagram

PART

Edit this page
Last Updated:
Contributors: gregory