Writing Rules and Actions
Rules and Actions are created from a combination of the following basic components:
Condition |
A condition is a high-level logical test that defines the syntax for a rule. It defines the sequence in which tests are performed. |
Relationship |
A relationship compares any two values and returns a result of true or false. |
Value |
A value is a constant, a reference to objects or a calculation. |
Conditions control the flow of tests performed on a feature, and the structure of a rule (or action) defines the sequence in which each condition is tested.
Most conditions are tested one after the other, from the top of the rule to the bottom. The exception is "IF...THEN...ELSE", where either one condition is tested or another, depending on an initial test.
Create a Rule
-
Right-click on the package in which to create your new rule, and click New Rule.
-
Enter a name for the rule and click Create.
A message confirms that your new, empty, rule has been created.
-
Click on the Metadata tab, and enter a Title and Description for the rule. These can act as useful reminders when editing the rule in future.
-
Within the Content tab, double-click Check for all objects that... to select a class.
In the Class field, enter a label to identify classes to be processed (e.g. "BUILDING"). If the class label is omitted, all classes are queried. Optionally, enter a Name for the feature.
Click the tick to proceed.
Note: If your ruleset uses a schema, you can only select classes and properties defined in that schema.
-
Double-click Condition and select a condition from the drop-down menu.
Depending on the condition selected, a number of values, conditions or relationships will be created as child items.
-
Double-click on each Value, Condition or Relationship to define it.
-
Click the Save button.
A confirmation message displays, once the rule has saved successfully.
Note: A newly created rule must have an action assigned to it, and then be published before it can be used in a dataset.
Actions are created in a similar way to rules. The only difference in structure is that Actions contain an Operation, which dictates the primary function that the action should take (e.g. report on values or delete a feature).
Create an Action
-
Right-click on the package in which to create your new action, and click New Action.
-
Enter a name for the action and click Create.
A message confirms that your new, empty, action has been created.
-
Click on the Metadata tab, and enter a Title and Description for the action. These can act as useful reminders when editing the action in future.
-
Within the Content tab, double-click Check for all objects that... to select a class.
In the Class field, enter a label to identify classes to be processed (e.g. "BUILDING"). If the class label is omitted, all classes are queried. Optionally, enter a Name for the feature.
Click the tick to proceed.
Note: If your ruleset uses a schema, you can only select classes and properties defined in that schema.
-
Double-click Operation and select an operation from the drop-down menu.
Depending on the operation selected, a number of values, conditions or relationships will be created as child items.
-
Double-click on each Value, Condition or Relationship to define it.
-
Click the Save button.
A confirmation message displays, once the action has saved successfully.
If you assign an action to a rule, the action can be applied to any objects that do not conform to the rule.
Once published, it can then be used in the 1Integrate for ArcGIS Add-in or widget.
- If a reporting action is used, it will appear in the Validation tab, under the Rule's name.
- If an enhancement action is used, it will appear in the Enhancement tab, under the Action's name.
The following procedure is the same if you are working with rules, quick rules, actions or quick actions.
Assign an Action to a Rule
-
Select the rule to be edited.
-
Click Report Action or Enhance Action, depending on the type of action you wish to assign to the rule.
-
Select an action from the available list. You can search for actions by typing in the box.
-
Click the Save button.
A confirmation message displays, once the rule has saved successfully.