State machine - Referencing a part
Description
The following state machines present a part creation process. See Attributes Dictionary - Property Collection for more information about part types ; Data Dictionary - Part for a definition of a Unit.
Throughout its creation process, the part object created could have the following state :
INITIAL:Starting point with incoming parameters :
- part(s) => a part must be link through its relationship(s) (see here) to at least one part, or several. Part(s) parameter can be selected either from the display of a condo regulation contract or the display of a part. In case parameter is omitted, PART 0 will be defaulted.
- type => of part to be created : PROPERTY, BUILDING, UNIT, EQUIPEMENT, SPACE
REFERENCEDObject has minimum information needed to exist, has been correctly sent and recordered into the back-end (BE), and, through its Id, can become referenceable by other objects.Once referenced, triggers automatic actions in backend :
add the new part to the condo regulation contract (CRC). CRC is deducted from any part given as parameter (as even in case of multiple parts, they all belong to the same CRC) ;
create a relationship for the part newly created. The relationship is type of "uses". New part will be the source, and the target is the part given as parameter. If several parts are given, create as many relationships as there are parts. See state machine referencing a relationship
PROVISIONED: a referenced object can contain other optional information than the minimum required in referenced state. If no new information is added, object then stays in referenced state.
NOTE : the attributes : unitNature, equipmentNature and spaceNature existing in "part" collection are direclty and exclusively linked to the part type, which can be :
- UNIT
- COMMON EQUIPMENT
- COMMON SPACES
As a consequence, the payload shown in the diagram below must contain only the nature attribute corresponding to part type choosen. E.g. if one wants to create a part "unit", only attribute unitNature should be available (besides unitCategory and unitType).