Create Relation
Creates a relation between 2 objects
Description
Creates a specified relation between 2 given objects. It is not necessary to check whether the two objects are already related. In case they are, the brick returns successfully without changing anything (in other words: two objects can only be linked once).
Let's take the following data model with two data types, and one relation between them:
Data type: Person
- Attribute 1: name (string)
- Relation 1: owns (Car)
Data type: Car
- Attribute 1: brand (string)
Adding an owns
relation between Person p
and Car c
can be done by setting the following inputs:
- origin:
p
- relation:
Person -> owns
- destination:
c
Inputs
- destination (Object): The related object
- relation (Relation): The relation linking the origin and destination
- origin (Object): The object from which the relation starts (as per the data model definition)
- Control Flow (Control Flow)
Outputs
- origin (Object): The origin object
- Control Flow (Control Flow)
- Error Flow (Error Flow): If the provided object doesn't have the specified relation
- destination (Object): The destination object