Data journal nodes
- Last UpdatedJan 24, 2023
- 3 minute read
- PI System
- RtReports 5.0
- Visualization
The data journal is an XML file that contains all of the raw data results retrieved after testing or running a report template against its data context.
-
XML uses a hierarchy of parent and child nodes arranged within a tree to describe the relationships between objects.
-
Data journal nodes are those objects within the data journal that correspond to the report data.
-
For report parameters that produce multiple instances, there will be separate data journal nodes that correspond to each instance.
The root node of the data template object defines how to form the data journal. Each data template object within the root node defines how to form the corresponding data journal object.
Data template objects and corresponding data journal nodes
|
Data template object |
AssetContextJournal |
|---|---|
|
Batch template |
BatchJournal |
|
Unit template |
UnitBatchJournal |
|
SubBatch template |
SubBatchJournal |
|
Time template |
TimeBasedJournal |
|
Module template |
ModuleJournal |
|
Asset context template |
AssetContextJournal |
|
Journal action |
JournalEvents |
BatchJournal
The root node of the data template for a batch report is the batch template. The batch template maps to a data journal BatchJournal node.
BatchJournal elements contain properties such as:
-
PI Batch ID
-
Batch start and end times
The Batch template element can contain unit templates and journal actions, which map to data journal nodes nested within the parent BatchJournal node.
UnitBatchJournal
Each UnitBatch template maps to a UnitBatchJournal node within the parent BatchJournal node.
UnitBatchJournal elements contain properties such as:
-
Unit name
-
Unit batch start and end times
The Unit template element can contain SubBatch templates and journal actions, which map to data journal nodes nested within the parent UnitBatchJournal node.
SubBatchJournal
Each subbatch template maps to a SubBatchJournal node within the parent UnitBatchJournal node.
SubBatchJournal elements contain properties such as:
-
Subbatch name
-
Subbatch start and end times
The SubBatch template element can contain child SubBatch templates and journal actions and child SubBatch templates, which map to data journal nodes nested within the parent SubBatchJournal node.
TimeBasedJournal
Each time template maps to a TimeBasedJournal node.
-
If the time template is the root node of the data template, it will map to a TimeBasedRootJournal node that is the root node of the data journal.
TimeBasedRootJournal elements contain properties such as:
-
Standard TimeBasedJournal element properties
-
Root-level data such as official time range
TimeBasedJournal elements contain properties such as:
-
Start and end times
-
Time duration
The time template element can contain journal actions, and child time templates, unit templates, subbatch templates, module templates, and element templates, which map to data journal nodes nested within the parent TimeBasedJournal or TimeBasedRootJournal node.
ModuleJournal
Each module template maps to a ModuleJournal node within the parent data journal node.
ModuleJournal elements contain properties such as:
-
Name of the PI Module that was matched
-
The start and end times that are in effect
The module template element can contain journal actions, and child module templates, time templates, unit templates, subbatch templates, and element templates, which map to data journal nodes nested within the parent ModuleJournal node.
Asset Context Journal
Each asset context template maps to an AssetContextJournal node in the data journal.
AssetContextJournal elements contain properties such as:
-
Name of AF Server
-
Name of AF Database
-
Name of the AF element that was matched
-
The start and end times that are in effect
-
Element Path
Asset Context template element can contain journal actions, and child asset context templates, time templates, and module templates, which map to data journal nodes nested within the parent AssetContextJournal node.
JournalEvents
Journal actions map to JournalEvent elements which correspond to levels within the data journal determined by the location of the journal action in the data template.
-
JournalEvents elements are created for each data journal object.
JournalEvent elements contain three collections:
-
TerminalStates
-
SequenceEntries
-
Parameters
-
TerminalStates collection
Organizes events by the state in which they occurred.
-
SequenceEntries collection
Organizes events in chronological order.
-
Parameters collection
Lists the report parameters used in the data template.
Both the TerminalStates and SequenceEntries collections contain the same information.
Journal actions are triggered when you run or test a report. The results from journal actions are logged in three ways.
-
RtReports creates a list of the action states that were reached within the journal action during report generation.
-
For each action state, RtReports creates a JournalEntry element in the data journal, and this JournalEntry element is included in both the TerminalState collection and the SequenceEntries collection of the parent JournalEvent node.
-
After processing all action states, RtReports runs all action result definitions and logs the results within JournalEntry elements included in both the TerminalState collection and the SequenceEntries collection of the parent JournalEvent node.