InEvent

InEvent is a method (or type) of rule used to assign a state to your asset.

Parameters

NameUsage
sourceThe ARDI event source to read from
nameThe default status during the event
regexThe regular expression to match against the event name
subtypeThe event attribute to read the sub-type from.
flipIf true, copy the 'type' to 'subtype' and vice-versa

Notes

The 'regex' value should be a regular expression that is matched against the name of the event.

Example Match

Let's say you have the following event…

NameStartEndDescCode
Failure Downtime10:00AM11:00AMConveyor FaultFDC
{
   "name": "Line Down",
   "method": "InEvent",
    "source": "Downtimes"
}

The rule will set any times between 10:00AM and 11:00AM to a status of Line Down. There is no secondary status.

Matching with Attributes

If you want to name the status something other than the name of the event, you can use the '#' character before the name, followed by the name of the event attribute you're interested in.

For example,

{
   "name": "#Code",
   "method": "InEvent",
    "source": "Downtimes"
}

…will give all times between 10:00AM and 11:00AM the status 'FDC'

Regular Expression Matches

You can extract information out of the event name with the regex parameter.

{
   "name": "Line Down",
   "regex": "(.*) Downtime",
   "method": "InEvent",
    "source": "Downtimes"
}

…will instead give a status of 'Failure' (taken by matching the pattern with the event name 'Failure Downtime').

Extracting a Secondary Status

You can set a secondary state using the subtype parameter..

{
   "name": "Line Down",
   "regex": "(.*) Downtime",
   "method": "InEvent",
    "source": "Downtimes",
    "subtype": "Desc"
}

This will set any times from 10:00AM to 11:00AM to 'Failure:Conveyor Fault'.