Event property configuration

Once an event has been configured, you can start configuring the properties of the event. Select one of the properties in the asset tree that has not been configured yet.

Configure event property

Next, select either historian , external database or manual detection mode.

Detection mode

You can optionally set a priority, this determines in which order the properties are evaluated. Priorities with a lower number will be evaluated before priorities with a higher number.

The rest of the configuration depends on the selected detection mode.

Detection mode

Detection mode: Historian

The historian detection mode works by getting the aggregated value of a data reference for the time period of the event. An event property is either simple or periodic. A simple event property will return a single aggregated value a periodic one will return a list of periodically aggregated values. For periodic event properties you will additionally need to define an Interval.

Historian

Priority

The priority determines the order in which properties are evaluated within the same event. Properties with a lower priority number are evaluated before those with a higher priority number. To ensure that ‘priority’ works effectively with ‘close after’, set an equal or longer ‘close after’ period for properties with a higher priority number. Note that priority only affects the order of execution for open properties: a property with a higher priority number can retrieve a value earlier and close before a property with a lower priority number.

Start/stop offset

Will apply an offset on the start/stop time of the event when getting the value(s) for this property.

Close after

The “close after” period refers to the additional time allowed beyond the event stop time during which the event processor will continue attempting to retrieve a value if none is found. This is useful in cases where the data may be delayed or not immediately available.

Default value

Default value that is used if there is no data available.

Preview

To be able to see the properties for an ongoing event you can enable a preview for an event property. This will periodically update the property before getting finalized when the event closes.

Good points only

By default, only points with a status of Good will be used, this option can be disabled to include points without a status or a Bad status.

Detection mode: Manual

When selecting the manual detection mode, the event property will be completed by manual entry. You can optionally configure a list of predefined values in the section Possible values under settings. This offers the possibility of mapping certain values to a more human friendly display name in the manual entry form. To add such a mapping enter the “friendly” name of the value in the input field Add value and click + icon next to it. Then enter the value that should be stored in the database. Below we have an example configuration where we map a number property color to their corresponding colors.

If the datatype of the event property is a string, you can also configure validation for manual entry. This can be done by entering a regular expression in the Validation field. If the entered value does not match the regular expression, the manual entry form will show an error message.

Manual entry - Possible values

And this is how it would look for a user filling in this property in the manual entry form.

Manual entry - Value mapping

Detection mode: External database

The External database detection mode works by querying the external database for either a single value if the event property is periodic or a series of rows containing a timestamp in the first column and a value in the second column. You can add query parameters in the options to constrain the data being returned. The query parameters can consist of the start or end time time of the event or the value of another simple property for that event. For simple properties we also support the Preview Enabled option. In cases where the query may occasionally yield no data, you have the option to specify a ‘Default Value’ to be applied in such instances.

Given the following database table and configuration:

items_created:

name time value
Batch1 2023-09-01 00:01 15
Batch2 2023-09-01 00:01 20
Batch1 2023-09-02 00:01 6

configuration

External property configuration

The result for an event with start time 2023-09-01 00:00:00 and stop time 2023-09-01 03:00:00 with batch_id = Batch1 would be 15 and the executed query would have been SELECT value FROM items_created WHERE time > '2023-09-01 00:00:00' and time < '2023-09-01 03:00:00 with' AND name = 'Batch1' .

And example table and query (script) for a periodic property would be:

ph_samples

name time ph_sample
Batch1 2023-09-01 00:20 4
Batch2 2023-09-01 00:20 5
Batch1 2023-09-01 01:00 6
Batch2 2023-09-01 01:00 3
Batch1 2023-09-01 01:20 7
Batch2 2023-09-01 01:20 7
Batch1 2023-09-02 01:01 8
Batch2 2023-09-02 01:01 4

Script (query with parameters):
SELECT time, ph_sample FROM ph_samples WHERE time > '2023-09-01 00:00:00' and time < '2023-09-01 03:00:00 with' AND name = 'Batch1'

Would result in a periodic value for the previously mentions timestamp of:

offset (in seconds) value
1200 4
3600 6
4800 7

Re-evaluation of event properties

By selecting an event property configuration and pressing the re-evaluate button in the top right corner, all event properties for that event property configuration will be re-evaluated for the chosen time period.