getEvents
The getEvents
function is used to display information about the events related to a node
Syntax
c4i:getEvents(xPath)
Parameters
xPath
The XPath to the node
Return value
A JSON array containing information on the events related to the node
Example
Given the following XML comments in STEP XML
<properties>
<entry key="eventID">1720993</entry>
<entry key="eventType">1</entry>
<entry key="nodeID">PRD1</entry>
<entry key="nodeType">product</entry>
<entry key="eventCreationTime">2024-03-19 14:18:31.0</entry>
<entry key="eventRevision">0.10</entry>
<entry key="messageCreationTime">2024-03-19 14:19:40.341</entry>
<entry key="eventID">1720998</entry>
<entry key="eventType">1</entry>
<entry key="nodeID">PRD1</entry>
<entry key="nodeType">product</entry>
<entry key="eventCreationTime">2024-03-19 14:19:16.0</entry>
<entry key="eventRevision">0.11</entry>
<entry key="messageCreationTime">2024-03-19 14:19:40.341</entry>
</properties>
The following YAML configuration will produce the following output :
c4i:getEvents(.)
[
{
"eventId": "1720993",
"eventType": "1",
"eventCreationTime": "2024-03-19T14:18:31"
},
{
"eventId": "1720998",
"eventType": "1",
"eventCreationTime": "2024-03-19T14:19:16"
}
]