Skip to content

How it works Create a new property

Franck edited this page Aug 14, 2019 · 7 revisions

Overview:

This page documents how we create new properties via the UNTE interface.

Things to Keep in mind:

All properties are NOT equal.

We have:

  • Level 1 properties (a Building)
  • Level 2 properties (a Flat or a sub-division of a Level 1 property like a store or a parking lot).
  • Level 3 properties (a Room or a sub-division of a Level 2 property)

Mandatory attributes:

You MUST provide some mandatory attributes when you try to create a new property. These attributes are DIFFERENT for Level 1, 2, and 3 properties.

Some of the mandatory attributes are automatically provided if you use the UNTE interface. If you want to simulate things without using the UNTE interface, you need to make sure that you are providing the correct mandatory attributes or the property creation will likely fail.

All properties MUST be associated with a valid Unee-T Enterprise ID.

Scripts and routines:

We are using DIFFERENT scripts and DIFFERENT tables to manage and manipulate different types of properties (Level 1, 2, and 3). In other words, a building is NOT created the same way as a flat is and a room is NOT created the same way a flat is.

The UNTE database schema has built-in internal controls, constraints, and checks to make sure that we are not creating incorrect or incomplete records.

We are using Database Triggers, views, and procedures to simplify and automate property creation and make sure that all is done as it should be.

Creation in Unee-T is done ONLY if all tests are passed:

IF a property is:

  1. Properly created in the UNTE interface AND
  2. Identified as a property that needs to be created in Unee-T THEN a lambda call is made to the MEFE using the MEFE API to create a new unit in the Mongo and the BZ databases.

Audits and logs:

You can find a lot of debugging information in the UNTE database.

Lambda logs:

All the lambda calls made by the UNTE database are logged in the table log_lambdas.

You can use this to replay some of the Lambda calls if needed.

You can choose to replay any lambda call if needed as the Unee-T architecture has been built to be indepotent.

If a lambda call is not in the table log_lambdas it means it was never sent by the UNTE database (or that we have a severe bug in our logging routine).

Analyze Performances:

The view ut_analysis_mefe_api_unit_creation_time gives you the total time it took for the Unit to be created. It measures the time difference between:

  • The date and time the request was sent out from the UNTE Database AND
  • The date and time when the UNTE Database received a confirmation that the property has been correctly created in Unee-T.

Error messages:

The error messages (if any) if a unit has NOT been correctly created in Unee-T are recorded in the field mefe_api_error_message in the table ut_map_external_source_units.

MEFE Unit Id of a property:

This information (if it exists) is available in the field unee_t_mefe_unit_id in the table ut_map_external_source_units.

Create a Level 1 property:

The UNTE screens:

Go to the

  • "Manage Building" page: .../Manage_Buildings_list.php.
  • Click on the "Add New" button.
  • A modal window appears.
  • Fill the required information.
  • If you want to create that building in Unee-T then you MUST make sure that the field Create in Unee-T is ticked.
  • Click on Save.

Where do we store the raw data before validation:

Mandatory information:

Constraints and controls:

Tables involved:

Procedures involved:

Views involved:

Triggers involved:

Create a Level 2 properties:

The UNTE screens

Where do we store the raw data before validation:

Mandatory information:

Constraints and controls:

Tables involved:

Procedures involved:

Views involved:

Triggers involved:

Create a Level 3 properties:

The UNTE screens

Where do we store the raw data before validation:

Mandatory information:

Constraints and controls:

Tables involved:

Procedures involved:

Views involved:

Triggers involved: