Operations

An Operation is a high level component of an Action, which determines the primary function of the Action.

Static

Operation Description Parameter(s) Returns

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.

  • From Class

  • From Name (optional)

  • To Class

  • To Name (optional)

N/A

Built-In

Operation Description Parameter(s) Returns

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.

  • Operation Name

Varies by Operation

Branch

Operation Description Parameter(s) Returns

If…Then…Else

Conditionally apply either the first (Then) or the second (Else) child operation based on the result of the predicate condition.

This value should have a predicate to test and two child values to choose between, i.e.

  • If the condition is true, the result is the value of the first child value.

  • If the condition is false, the result is the value of the second child value.

N/A

  • Predicate (If)

  • Operation (Then)

  • Operation (Else) (optional)

Try…Catch

Returns the Try Operation unless it throws an exception, in which it will return the Catch Operation.

Useful to trap errors which would otherwise stop the object iteration or the session from continuing.

      Example: A string representing a date may not be valid when calling a function to convert it to a timestamp. Use this value to catch the error, use null instead and continue without an error.

N/A

  • Operation (Try)

  • Operation (Catch)

Template

Operation Description Parameter(s) Returns

Action Template

Import an Action Template from your Rule and Action Templates

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.

  • Template

  • Dependent on the template

Assignment

Operation Description Parameter(s) Returns

Assignment

Assigns a new value to a Temporary Value or Attribute 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

  • Value (variable)

  • Value

Loop

Operation Description Parameter(s) Returns

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. The parameters to set have the following functionality:

  • Name - Define a name for the For Loop operation.
  • Start - The array position for the object that the Loop will start on.
  • Target - The array position for the object to finish the For Loop operation on.
  • Inclusive - Define whether the Target is included in the Loop.
  • Step - Define at which increment objects will be checked. e.g. setting the value as 2 will skip every other object in the loop.

 

  • Name

  • Start

  • Target

  • Inclusive

  • Step

  • Operation

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 Data Stores 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.

  • For a collection of objects, the class of the objects should be entered, or a label for a child condition. The Object or Element value can be used to access the current part within the loop.
  • For a geometry the Object or Element value can be used to give access to the current geometry part. This is often used to access the vertices or segments of a geometry by looping over the result of the vertices or segments built-in functions.
  • Value (Collection or Geometry)

  • Operation

Loop Over Nearest Objects

Loop over nearest n objects, executing an operation on each. Specify the following parameters:

  • Limit: The number of objects. Must be greater than 0.
  • Class
  • Alias name of the objects to loop over (optional).

There should be three child elements:

  • A source geometry from which to measure distance.
  • An optional test condition to filter the elements.
  • An operation to perform on the elements closest to the geometry.

If there is a filter predicate, only the first n objects that pass the condition will have the operation applied to them.

  • Source geometry

  • Predicate (Filter) (optional)

  • Operation

Loop Over Objects

Step over a specified set of objects and perform an operation on each one.

Setting the Limit as 0 or a negative as will mean the Operation is applied to all objects.

  • Limit

  • Class

  • Name

  • Predicate (Filter)

  • Operation

Sequence

Used to perform each child Operation 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

  • Operation 1

  • Operation 2

  • … add with Add icon

  • Operation N

While Loop

Performs an operation (often a sequence) zero or more times as long as the Predicate Condition remains True.

A While Loop must consist of two child elements: a Predicate condition and an operation.

      Note: You must be careful to avoid infinite loops by ensuring that the Predicate condition will eventually be met.

N/A

  • Predicate (Condition)

  • Operation

Object

Operation Description Parameter(s) Returns

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.

  • Class

  • Name

  • Operation

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.

  • Class

  • Name

N/A

Report

Operation Description Parameter(s) Returns

Report on Values

Report on one or more values. This will produce ReportedValue objects and set them on the Context.

The scope of the Action may be one of:

  • Object: a reporting operation intended to produce output for each object that the Action is applied to.

  • Summary: a reporting operation intended to produce a summary output at the end of a task which applies an Action to a set of objects.

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).

  • Label

  • Scope

  • Value 1

  • … add with Add icon

  • Value N