Operations
An operation is a high level component of an Action, which determines the primary function of the Action.
Types of Operations
Operation |
Description |
Parameters |
Child Nodes |
---|---|---|---|
Static |
|||
Cast |
The cast node allows you to assert that you know that an object will be a specific class, or that you want to pretend it is of that class. This allows you to use attributes from that class in the Rule or Action builder that would not show them otherwise. See Cast Node for more information. |
|
N/A |
Assignment |
|||
Assignment |
Assigns a new value to an existing value. Only temporary values and dynamic values can be assigned a new value. Typically, the value to be assigned is the result of a built-in function or a temporary value holding the result of a more complex calculation. For example, assign a new geometry or attribute to a feature. This is used widely to fix or integrate or transform data by updating it. |
N/A |
|
Branch |
|||
If…Then…Else |
Conditionally apply the first or second child operation based on the result of the predicate condition, as part of an action. This value should have a predicate to test and two child values to choose between, i.e.
|
N/A |
|
Try…Catch |
Execute the try operation unless it throws an exception, otherwise execute the catch operation. |
N/A |
|
Built-In |
|||
Built-in Operation |
Performs a specific task on the data, determined by the built-in function that is selected. If the function requires parameters, these must be added as child values. See Built-in Operations. |
|
Varies by Operation |
Loop |
|||
Break |
When used inside of a loop this will cause the loop to terminate. Otherwise the Parent operation will be terminated. |
N/A |
N/A |
For Loop |
Execute the given operation a given number of times |
|
|
Loop Over a Collection or Geometry |
Step over a specified geometry or collection and perform an operation on each part. Collections are often created as attribute values by specific bespoke datastores to represent things like multi-cardinality lists. Note: Geometries can be treated like collections and stepping over each part allows each part of a single or multi-part geometry to be processed individually. The loop will run for each part of a geometry - once for a single part geometry and multiple times for a multi-part geometry. There should be two child elements: a value (a collection or geometry) and an operation. The operation is performed for each object or element in the collection, or each part in the geometry.
|
|
|
Loop Over Nearest Objects |
Loop over nearest n objects, executing an operation on each. Specify the following parameters:
There should be three child elements:
The operation will be performed for the nearest n objects that satisfy the test condition, in order of increasing distance from the source geometry. Only the first n objects that pass the first test condition have the operation applied to them |
|
|
Loop Over Objects |
Step over a specified set of objects in the cache and perform an operation on each one. |
|
|
Sequence |
Used to perform a number of operations one after the other in the specified order. There must be at least two child operations . For example, this can be used to execute several operations in an IF…THEN…ELSE operation like BEGIN…END or {} in programming languages. |
N/A |
|
While Loop |
Performs an operation (often a sequence) zero or more times. A While Loop must consist of two child elements: a Predicate condition and an operation. The operation will be executed repeatedly while the condition holds. Note: You must be careful to avoid infinite loops by ensuring that the Predicate condition will eventually be met. |
N/A |
|
Object |
|||
Create Object |
Creates a new object in the class specified. This is used widely to create reporting features representing the exact locations of problems or when inferring new data or creating an enhanced copy of the data. Note: If these new objects will be exported to the Oracle database, the appropriate columns must be created prior to running the action. |
|
|
Delete Object |
Deletes an existing object. You can specify the class of object to be deleted and its name, if it has been given one. Note: Usually you should aim to delete the primary object that the rule is iterating over to avoid later iterating over a feature that has been deleted. |
|
N/A |
Report |
|||
Report on Values |
Report on the values of one or more values. This will produce ReportedValue objects and set them on the Context (a class that holds context information relating to a Value, Predicate or Operation in a rule or action). The context information includes the Gothic dataset Version, the class(es) of object being tested (identified by a class label) and the current object being considered (identified by an object label). |
|
|
Template |
|||
Action Template |
Import an action template. The Template parameter allows you to choose existing Action Templates from the dialog that appears. This only shows Action Templates and folders that contain them. |
|
|