Advanced Rule Syntax
Advanced Rules are used in Sigmafine WSA method calls in order to select a certain set of AF Elements, according to a configurable set of comparison rules.
Advanced rules can be specified using the following syntax:
[Comparison]\<ID_Logic\>[Comparison]\<ID_Logic\>…
Where:
[Comparison] = a selection rule used to select a certain set of AF elements
ID_LOGIC = the logical operator to combine more comparison rules
List of LOGIC IDs
| Value | Meaning |
|---|---|
| 01 | AND |
| 02 | OR |
A Comparison rule:
[PISystem|AFDatabase|\<ID_X\>\<ID_P\>~\<ID_Oper\>~\<ValueTest\>|\<ID_X\>\<ID_P\>~\<ID_Oper\>~\<ValueTest\>]
Where:
AFSystem = the AF System supporting the desired AF Database
AFDatabase = the AF Database holding the elements to be searched
ID_X = specified whether the rule applies to an AF Element or AF Attribute
List of ID_X
| Value | Meaning |
|---|---|
| E | Element |
| A | Attribute |
ID_P = specifies the information item used in comparisons
If ID_X = E the following table applies for AF Elements comparison.
List of ID_P
| Value | Meaning |
|---|---|
| 01 | Name |
| 02 | Description |
| 03 | Type |
| 04 | Template |
| 05 | Category |
| 06 | Connection In |
| 07 | Connection Out |
| 08 | Connection Undirected |
| 09 | Model |
If ID_X = A the following table applies for AF Attributes comparison.
List of ID_A
| Value | Meaning |
|---|---|
| 01 | Name |
| 02 | Value |
| 03 | Description |
| 04 | UOM |
| 05 | Category |
| 06 | Status |
| 07 | Value Type |
| 08 | Data Reference |
| 09 | Settings |
ID_OPER = specifies the comparison operator to be applied
List of ID_OPER
| Value | Meaning |
|---|---|
| 01 | equal to |
| 02 | not equal to |
| 03 | greater than |
| 04 | greater than or equal to |
| 05 | less than |
| 06 | less than or equal to |
| 07 | start with |
| 08 | not start with |
| 09 | end with |
| 10 | not end with |
| 11 | contains |
| 12 | not contains |
EXAMPLE 1:
[AFServer|AFDB1|E01~11~TK]02[AFServer|AFDB1|E02~07~Tank]
Returns all AF Elements whose name contains TK or whose description starts with Tank from database AFDB1 in AFServer
EXAMPLE 2:
[AFServer|AFDB1|E01~11~TK~A05~01~Rep]
Returns all AF Elements whose name contains TK and having at least one attribute whose category is equal to Rep whose description starts with Tank from database AFDB1 in AFServer