Select Page

Operations

The updated maintenance of the Inventories is obtained considering the Instruments as transactions that alter them through Operations. Therefore, the Transaction is the basic piece that gives the Instruments their transactional character and is always performed between an Operator Instrument against their Inventory, (data contained between the instruments of the Instrument).

All elements of the Inventory can be created, altered or deleted by means of specific Operations, so they are classified according to the element they affect: Instruments, Attributes, Entities, Relationships and Allocations.

Types of Operations

Versions Operations


They allow to carry out massive operations with a single operation.

INSERT

It adds to the Operated Inventory all the elements contained in the Operated Instrument. The insertion makes a copy of the elements of the Operator Instrument in the version of the Operated Inventory, maintaining its UUID, so that from that moment there are two instances of each element, one linked to the operator instrument and another linked to the Inventory.

The inserted Attributes, Entities or Relationships will remain as children of a parent element, within the root level of each type of element, as a Statement in the case of Attributes and the group Folder in the case of Entities and Relationships with the name of ” Inserted by: “+ [name and version of the Operator Instrument].

UPDATE

Adds the contents of the Attributes, Entities and Relations existing in the Operator Instrument that have the same UUID in the Operated Instrument. The elements of the Operator Instrument must have the same Functional Character in the case of Attributes and Group in the case of Entities and Relationships that their corresponding in the Operated Instrument.

REPLACE

Replaces the contents of the Attributes, Entities and Relations existing in the Operator Instrument that have the same UUID in the Operated Instrument. The elements of the Operator Instrument must have the same Functional Character in the case of Attributes and Group in the case of Entities and Relationships that their corresponding in the Operated Instrument.

DELETE (ALL, PARTIAL)

In the case ALL removes all items from the operated Inventory.

In the case PARTIAL eliminates the Attributes, Entities and Relations existing in the Operator Instrument that have identical UUID in the Operated Instrument. It is a CASCADE operation so it eliminates the child elements of the element to be deleted even though they have not been marked in the operation.

Operations between Attributes


INSERT (SIMPLE, CASCADE)

Add a new Attribute to Inventory. The insertion makes a copy of the Attribute of the Operator Instrument in the version of the Operated Inventory, maintaining the UUID of the Attribute, so that from that moment there are two instances of the same Attribute, one linked to the instrument operator and another linked to the Inventory. The Operator Attribute must have the Attribute Functional Character that will define its function in the Destination Inventory.

Additional Content:

  • Attribute Operator: Identifier of the Attribute to be added in the Operated Inventory.
  • Attribute Operated: In this operation it identifies the Attribute that will act as the Parent Attribute in the Inventory Attributes tree of the operation. If it is not indicated, an Entity Character Attribute is created at the end of the Inventory Attributes tree, which is operated with the name of “Contributed by …” + [name of the Operator Instrument], this Statement is assigned as the “Parent” Attribute to the Provided Attribute and The order corresponding to your new location is recalculated to be the last “Child” attribute.
  • Position: position in which the new Attribute must remain between its “Brothers” Attributes. It is a renumbering of existing ones. If it is not indicated, it will become the last one.
  • Scope: You have two options:
    • Simple – when the operation affects only the Attribute provided.
    • Cascade – when it also affects all the child attributes of the Attribute operator.
  • Restrictions: if the Attributes provided point to Attributes with a functional character of “Unit”, “Reference”, “Regime” that previously did not exist in the Inventory and have not been explicitly provided, these will also be provided as Attributes “children” So that the Inventory maintains the referential integrity among its Attributes. The Operator Attribute must contain the minimum data, otherwise the transaction will be rejected.

UPDATE

Adds the contents of the Operator Attribute to the contents of the Operated Attribute in the Name, Description and Domains fields, and replaces the content in the other fields. The Operator Attribute must have the Functional Character of “Operation”.

Additional Content:

  • Attribute Operator: Identifier of the Attribute in the Operator Instrument.
  • Attribute Operated: Attribute identifier in the Inventory operated.

Restrictions: The operation never affects the Functional Character of the Operated Attribute.

REPLACE

Replaces all the contents of an existing Attribute in the Inventory with the contents of the Operator Attribute. The Operator Attribute must have the Functional Character of “Operation”

Additional Content:

  • Attribute Operator: Identifier of the Attribute in the Operator Instrument.
  • Attribute Operated: Attribute identifier in the Inventory operated.

Restrictions: Substitution can never affect the Functional Character of the Attribute.

DELETE

Deletes the Attribute affected by the operation. The operation does not require that the Operator Attribute is indicated, so they are operations directly linked to the Operator Version.

Additional Content:

  • Attribute Operated: Attribute identifier in the Inventory operated.

Restrictions, if the Attribute to be deleted has Child Attributes in the Operated Inventory the transaction is rejected because the system can not establish in which position the “orphan” attributes should remain. To do this, you must first delete the child attributes by checking the correct order of operations.

Operations between Entities


INSERT (SIMPLE, CASCADE)

Add a new Entity to the Inventory. The insertion makes a copy of the Entity of the Operator Instrument in the version of the Operated Inventory, maintaining the UUID of the Entity, so that from that moment there are two instances of the same Entity, one linked to the operator instrument and another linked to the Inventory. The Operating Entity must belong to the Entity Group that will define its function in the Destination Inventory.

If it is a SIMPLE type, the transaction only affects the Entity contributed.

If it is CASCADE type the operation also affects all its Daughter Entities in the Operator Instrument.

Additional Content:

  • Operator: Identifier of the Entity to be added in the Operated Inventory.
  • Operated Entity: In this operation, it identifies the Entity that will act as Parent Entity in the Entity Tree of the Operated Inventory. If not, a “Folder” Entity is created at the end of the Inventory Entity tree operated with the name “Inserted by: + [name and version of the Operator Instrument], this Group is assigned as Entity” parent “to the Entity contributed and recalculates the order corresponding to its new location so that it remains as the last Entity “daughter”.
  • Position: position in which the new Entity must remain between its “sister” Entities. It is a renumbering of existing ones. If it is not indicated, it will become the last one.

Restrictions: Before performing the operation it is necessary to verify that all the Attributes applied to the Entity already exist in the Destination Inventory by means of its UUID. If they do not exist in the Inventory Attributes dictionary operated, the transaction will be rejected. This requires that if the Attributes are defined by the same Instrument they must have been added to the Inventory in previous operations, which determines that the Attributes operations will always be checked first, then those of Entities and finally those of Relations in the order that is established Within each section. The Operator must contain the minimum data, otherwise the transaction will be rejected.

UPDATE (ADD, SUBTRACT)

Replaces the contents of the Entity operated by the content of the Operator. The operating entity must belong to the group “Operator”.

If it is of type ADD it will apply in the Operated Entity the Attributes applied in the Operating Entity that are not already applied in it with its values ​​and will create new values ​​for the Attributes of the operating Entity that already are applied previously in the Entity operated, adding them to The existing ones. It will add to the geometry of the Operated Entity the geometry of the Operator.

If it is of type SUBTRACT, it will remove from the Operated Entity the Attributes applied in the Operator and its values. It will subtract from the geometry of the Operated Entity the geometry of the operating Entity.

Additional Content:

  • Operator: Identifier of the Entity in the Operator Instrument.
  • Operated Entity: Identifier of the Entity in the Operated Inventory.

Restrictions: The Transaction can never affect the Entity Group.

REPLACE (ALL, PARTIAL)

If it is ALL, it replaces all the contents of an existing Entity in the Inventory with the contents of the Entity, including its geometry. The operating entity must belong to the group “Operator”.

If it is of type PARTIAL it substitutes the content of the Operated Entity that is contained in the Operator.

Additional Content:

  • Operator: Identifier of the Entity in the Operator Instrument.
  • Operated Entity: Identifier of the Entity in the Operated Inventory.

Restrictions: The Transaction can never affect the Entity Group.

DELETE

Removes the entity affected by the operation. The operation does not need to be indicated by the Operator, so they are operations directly linked to the Operator version.

Additional Content:

  • Operated Entity: Identifier of the Entity to be deleted in the Inventory.

Restrictions: if the Entity has Daughter Entities in the Operated Inventory the transaction is rejected because the system can not establish in which position the “orphan” Entities should remain. To do this, the Daughters Entities must be eliminated beforehand by verifying the correct order of operations

Operations between Relationships


INSERT (SIMPLE, CASCADE)

Add a new Relationship to the Inventory. The contribution makes a copy of the Ratio that becomes the property of the Operated Inventory

Add a new Relationship to the Inventory. The insertion makes a copy of the Relationship of the Operator Instrument in the version of the Operated Inventory, maintaining the UUID of the Relation, so that from that moment there are two instances of the same Relation, one linked to the operator instrument and another linked to the Inventory. The Operator Relationship must belong to the Relationship Group that will define its function in the Destination Inventory.

If it is a SIMPLE type, the operation affects only the provided ratio.

If it is CASCADE type, the operation affects all of its relationships in the Operator Instrument.

Additional Content:

  • Operator Relationship: identifier of the Relationship to be added to the Operated Inventory.
  • Relationship Operated: in this operation it identifies the Relationship that will act as the Parent Relationship in the Relationship Tree of the Operated Inventory. If not, a “Folder” relationship is created at the end of the Inventory Relationships tree operated with the name “Contributed by …” + [name of the Operator Instrument], this Group is assigned as the “Parent” Relationship to the Relationship And recalculate the order corresponding to its new location so that it remains as the last “Daughter” relationship
  • Position: position in which the new Relationship between their “sister” relations must remain. It is a renumbering of existing ones. If not indicated, it will become the last one.

Restrictions: Before performing the operation it is necessary to verify that all the Attributes applied to the Relation already exist in the Destination Inventory by means of its UUID. If they do not exist in the Inventory Attributes dictionary operated, the transaction will be rejected. This requires that if the Attributes are defined by the same Instrument they must have been added to the Inventory in previous operations, which determines that the Attributes operations will always be checked first, then those of Entities and finally those of Relations in the order that is established Within each section. The Operator Relationship must contain the minimum data, otherwise the transaction will be rejected.

UPDATE (ADD, SUBTRACT)

Replaces the content of the relation operated by the content of the operator relation. The operator relationship must belong to the “Operator” group.

The operation will not affect the elements object of the relationship.

If it is of the ADD type it will apply in the Operated Relationship the Applied Attributes in the Operator Relationship that are not already applied in it with its values ​​and will create new values ​​for the Operator Relationship Attributes that are already Applied previously in the Operated Ratio, The existing ones. Add to the Geometry of the Operated Relationship the geometry of the Operator Relationship.

If it is of the SUBTRACT type, it will eliminate from the Operated Relationship the Applied Attributes in the Operator Relationship and its values. It will subtract from the geometry of the Operated relation the geometry of the Operator relation.

Additional Content:

  • Operator Relationship: Identifier of the Relation in the Operator Instrument.
  • Relationship Operated: Identifier of the Relationship in the Inventory operated.

REPLACE

Replaces all the contents of an existing Relationship in the Inventory with the contents of the Operator Relationship, including its geometry. The operator relationship must belong to the “Operator” group.

Additional Content:

  • Operator Relationship: Identifier of the Relationship in the Operator Instrument.
  • Relationship Operated: Identifier of the Relationship in the Inventory operated.

Restrictions: The Transaction can never affect the Relationship Group or the elements affected by the Relationship.

DELETE

Eliminates the relationship affected by the operation. The operation does not need to be indicated the Operator relation, therefore they are operations linked directly to the Operator version.

Additional Content:

  1. Operated Relationship: Identifier of the Relationship to be deleted in the Inventory.

Restrictions: if the Relationship has Daughter Relations in the Operated Inventory the transaction is rejected because the system can not establish in which position the “orphan” Relationships should remain. To do this, the child relationships must be eliminated beforehand by verifying the correct order of operations.

Operations between Assignments


INSERT SIMPLE

Adds a new Assignment to the affected Entity or Relationship. The insertion makes a copy of the Assignment of the Operator Instrument in the version of the Operated Inventory, maintaining the UUID of the Assignment, so that from that moment there are two instances of the same Assignment, one linked to the operator instrument and another linked to the Inventory

The Assignment to be inserted uses an Entity or a Carrier Relationship in the Operator, Entity or Relationship Instrument that must be of the Operator group and discarded once the Operation is executed.

Additional Content:

  • Operator Assignment: Assignment identifier to be added to the Entity or List of the Operated Inventory with all its Values ​​included.
  • Assignment Group: When the Assignment is indicated, it creates its own Assignment Group if it does not previously exist in the Operated Entity, if the new Assignment already exists in that Group.
  • Entity / Operated Relationship: identifies the Entity or Destination Relationship of the Applied Attribute

Restrictions: Before performing the operation it is necessary to verify that all Attributes involved in the Assignments have in their Assignment Domain the group of the Entity or Destination Relation. The Assignment must contain the minimum data, otherwise the transaction will be rejected.

UPDATE (ADD, SUBSTRACT)

Add or replace the Assignment Values of origin to the Destination Assignment

If it is of type ADD it will add the values ​​contained in the Operator Assignment to the Operated Assignment.

If it is of type SUBSTRACT it will remove from the Operated Entity the Assignments with identical UUID to those existing in the Operator.

Additional Content:

  • Assignment Operator: identifier of the Assignment in the Operator Instrument.
  • Assignment Operated: Identifier of the Assignment in the Operated Inventory.
  • Assignment Group: When the Assignment is annotated it creates its own Assignment Group if it does not previously exist in the Operated Entity. If the Operated Assignment was already a member of another Group, it moves it to the Assignment Group. If the Operated Assignment is not indicated it remains in its Group if it had.

Restrictions: The Operation can only be performed between Assignments whose Attributes have the same Expression Mode.

REPLACE (ALL, PARTIAL)

If it is ALL, it replaces all the Assignments with the Operator Assignment. Its effect is identical to REPLACE ALL between Entities.

If it is of type PARTIAL it replaces only the Assignment Operated by the Operator

Additional Content:

  • Assignment Operator: identifier of the Assignment in the Operator Instrument.
  • Assignment Operated: Identifier of the Assignment in the Operated Inventory.
  • Assignment Group: When the Assignment is annotated it creates its own Assignment Group if it does not previously exist in the Operated Entity. If the Operated Assignment was already a member of another Group, it is moved to the Assignment Group. If the Operated Assignment is not indicated it remains in its Group if it had.

Restrictions: The Operation can only be performed between Assignments whose Attributes have the same Expression Mode.

DELETE

It removes from the Entity the Assignment with the same UUID as the Operator Assignment.

Additional Content:

  • Assignment Operator: identifier of the Assignment in the Operator Instrument.
  • Assignment Operated: Identifier of the Assignment in the Operated Inventory.

Execution


Operations are executed by the uThings transactional engine in two environments:

  • Test Environment. In this environment the operator can select one or several operations and execute them in an environment that allows to visualize their results without affecting the Inventory or the history of the elements involved. The execution command produces a result report that indicates successful operations or problems and constraints that have prevented its execution. As previously indicated the order of precedence in which the operations will be executed determines the success of the final result when the Operator Instrument defines several, since sometimes the results may not be coherent if they are not executed in a certain order. Therefore, the testing environment is very important in two moments, a) in editing time, so that the instrument editor can visualize the results of his proposals on the line and b) at the time of processing, so that the Technician in charge of its revision can verify that the result is adjusted to the technical and legal requirements that it entails.
  • Real environment. In this environment, the uThings operator performs operations against the Real-Mode Inventory. So when you approve the result the changes will be immediately visible in uThings’ online publication. The execution of the operations in this real environment can be retrotraced at all times as long as an orderly and complete backward turn is made to ensure the maintenance of the consistency of the Inventory data. These reverse operations can be recorded in the history of each element. The permanence in uThings of all the Instruments and their operations assures that at all times it is possible the reconstruction of the Inventories starting from its initial position.

The Operations are always executed in the competential environment of each Ambit so there is no possibility that operations executed in one Ambit affect Inventories of other Ambits.