Rule Use Cases
The following use cases illustrate possible implementations of rules in a rule-based view. Your actual implementation of rule-based views depends on your specific setup and needs.
See the following use cases for more information:
For these use cases, imagine that the following table items are your relevant facility attributes and their values.
| FacId | Desc | FacType | Attr1 | Attr2 | Attr3 | Attr4 | Attr5 | Attr14 |
|---|---|---|---|---|---|---|---|---|
| Division | Field | Station | Technician | Route | Parent | |||
| DIV_A | Division A | DIVISION | - | - | - | - | - | - |
| DIV_B | Division B | DIVISION | - | - | - | - | - | - |
| DIV_C | Division C | DIVISION | - | - | - | - | - | - |
| FLD_A | Field A | FIELD | DIV_A | - | - | - | - | SITE.SVC::DIV_A |
| FLD_B | Field B | FIELD | DIV_A | - | - | - | - | SITE.SVC::DIV_A |
| FLD_C | Field C | FIELD | DIV_C | - | - | - | - | SITE.SVC::DIV_C |
| FLD_D | Field D | FIELD | - | - | - | - | - | - |
| FLD_E | Field E | FIELD | - | - | - | - | - | - |
| MTR_A | Meter A | METER | DIV_A | FLD_B | - | JANE | RTE_1 | SITE.SVC::FLD_B |
| MTR_B | Meter B | METER | DIV_C | FLD_C | - | JOE | RTE_1 | SITE.SVC::FLD_C |
| MTR_C | Meter C | METER | DIV_C | FLD_C | - | JANE | RTE_1 | SITE.SVC::FLD_C |
| MTR_D | Meter D | METER | - | FLD_D | - | JACK | RTE_2 | SITE.SVC::FLD_D |
| MTR_E | Meter E | METER | DIV_A | FLD_B | - | JACK | RTE_2 | - |
| MTR_F | Meter F | METER | - | - | STA_B | JULIE | RTE_2 | SITE.SVC::STA_B |
| CMP_A | Compressor A | COMPRESSOR | DIV_A | FLD_A | STA_A | JULIE | RTE_1 | SITE.SVC::STA_A |
| CMP_B | Compressor B | COMPRESSOR | DIV_A | FLD_B | STA_B | JANE | RTE_1 | SITE.SVC::STA_B |
| STA_A | Station A | STATION | DIV_A | FLD_A | - | - | - | SITE.SVC::FLD_A |
| STA_B | Station B | STATION | DIV_A | FLD_B | - | - | - | SITE.SVC::FLD_B |
Use Case 1
In the following use case, you want to collect information from all linked nodes for all "DIVISION" facility type (FacType) hierarchies. The "DIVISION" hierarchy is composed (in descending order) of a division, field, meter or station, and meter or compressor.
The following table illustrates rules you could define to create this hierarchy.
| Level | Rule | Display Text Token |
|---|---|---|
| 1 | facility_type="DIVISION" | %facility_desc% |
| 2 | facility_type="FIELD" AND facility_attr1=parent.facility_id | %facility_desc% |
| 3 | (facility_type="METER" OR facility_type="STATION") AND facility_attr2=parent.facility_id | %facility_desc% |
| 4 | (facility_type="METER" OR facility_type="COMPRESSOR") AND facility_attr3=parent.facility_id | %facility_desc% |
Example
The level 3 Group Rule dialog box would look like the following:
|
Level 3 Example |
Example
The resulting tree for the division, field, meter or station, and meter or compressor hierarchy would look like the following:
|
Division A Field A Station A Compressor A Field B Meter A Meter E Station B Compressor B Meter F Division B Division C Field C Meter B Meter C |
Use Case 2
In the following use case, you want to collect information from all linked nodes for all "DIVISION" facility type (FacType) hierarchies. The "DIVISION" hierarchy is composed (in descending order) of a division, field (including 2 child views), meter or station, and meter or compressor.
The following table illustrates rules you could define to create this hierarchy.
| Level | Rule | Display Text Token | Child Views | View Rule |
|---|---|---|---|---|
| 1 | facility_type="DIVISION" | %facility_desc% | - | - |
| 2 |
(facility_type="FIELD" AND facility_attr1=parent.facility_id) |
%facility_desc% | By Route By Technician |
(facility_attr1=parent.facility_id) |
| 3 | (facility_type="METER" OR facility_type="STATION") AND facility_attr2=parent.facility_id | %facility_desc% | - | - |
| 4 | (facility_type="METER" OR facility_type="COMPRESSOR") AND facility_attr3=parent.facility_id | %facility_desc% | - | - |
Example
The level 2 Hierarchy Level dialog box and its two added child views would look like the following:
|
Level 2 Example |
Example
The resulting tree for the division, field (including 2 child views, underlined), meter or station, and meter or compressor hierarchy would look like the following:
|
Division A By Route RTE_1 Compressor A Compressor B Meter A RTE_2 Meter E By Technician JACK Meter E JANE Compressor B Meter A JULES Compressor A Field A Station A Compressor A Field B Meter A Meter E Station B Compressor B Meter F Division B Division C By Route RTE_1 Meter B Meter C By Technician JANE Meter C JOE Meter B Field C Meter B Meter C |


