Rules define the logic of the Action type that transform the parameters into ontology edits or other effects. There are two main types of rules: ones that edit the ontology, and ones that trigger another effect in Foundry.
An Ontology rule changes specific elements of the Ontology. They can create, modify, or delete objects and links of exiting types. To create or delete one-to-many or one-to-one links, object Rules need to be used and the foreign key property on the object needs to be modified.
When creating or modifying links and objects, the Rules require additional values for their operation. When modifying an object, the rules also define which properties are modified. Each property in return is mapped to a value provided by one of multiple options (Rules on links can only take object reference parameters):
You can also create objects and linked many-to-many at the same time. While just creating a many-to-many link requires objects on both sides of the link to exist prior, you can create both entities via one Action type. Start by configuring a Create object Rule with an object type that has a many-to-many link. Then click the Add link button below Add property to select the link type and configure the links.
In order to create a one-to-many or one-to-one link type, simply edit the foreign key on the object.
Action types can include combinations of ontology rules. When multiple rules are defined, the Actions backend compiles rules to generate a single edit per object (e.g., Add object, Modify object(s), or Delete object(s)). For example, if the result of one rule updates a property to "A", but another rule in the same Action type updates the same object's property to "B", the resulting edit would just update the property to "B". The order of rules affects the final object edit. As a result, the following combinations of object edits are not supported:
There are two types of rules that trigger a side effect: