Solutions
...
Litmus Production Record Exter...
Creating an event monitoring c...

4. Verifying the data model and creating the JSON file

55min

To create the JSON file which can be used with the Litmus solution Litmus Production Record Event Processing Flow the Configurator will always verify the configuration done by the user first to make sure that on a technical level all values are correctly formatted.

Document image


NOTE: The Configurator will not verify if the event monitoring configuration makes sense or configured correctly according to what the user wanted to define.

Verifying the Configuration

The configurator will always verify the configuration first before creating the JSON file.

Users can run the verification also as a stand alone operation without publishing the data model using the Verify Configuration button.

Document image


Verify the configuration in the sheet Event_and_Trigger_Definition

The verification process for the event monitoring configurations is very complex and is conducted for each sheet individually.

The first sheet verified is the sheet Event_and_Trigger_Definition, as it is the basis for the sheet Event_Identifier_Definition and Event_Item_Definition.

Test if event names are defined

The verification process will verify in the sheet:

  • Event_and_Trigger_Definition

that event names are defined in the column labeled Event Name.

In the case that no event names are found, a prompt is shown to the user.

Document image


In case a specific row has no event name set, a prompt is shown to the user.

Document image


As event names are required, the verification will be stopped.

Test if tag names are defined

The verification process will verify in the sheet:

  • Event_and_Trigger_Definition

that tag names are defined in the column labeled DeviceHub Tag Name used as Event Trigger .

In the case that no tag names are found, a prompt is shown to the user.

Document image


In case a specific row has no tag name set, a prompt is shown to the user.

Document image


As tag names are required, the verification will be stopped.

Test if trigger condition are defined

The verification process will verify in the sheet:

  • Event_and_Trigger_Definition

that trigger condition are defined in the column labeled Trigger Condition.

In the case that no trigger condition are found, a prompt is shown to the user.

Document image


In case a specific row has no trigger condition name set, a prompt is shown to the user.

Document image


As trigger condition are required, the verification will be stopped.

Test if trigger tags are defined

The verification process will verify in the sheet:

  • Event_and_Trigger_Definition

that trigger tags are defined in the column labeled Trigger Tag.

In the case that no trigger tags are found, a prompt is shown to the user.

Document image


In case a specific row has no trigger tag set, a prompt is shown to the user.

Document image


As trigger tags are required, the verification will be stopped.

Test if topics are defined

The verification process will verify in the sheet:

  • Event_and_Trigger_Definition

that topics are defined in the column labeled Topic used when publishing to Message broker .

In the case that no topics are found, a prompt is shown to the user.

Document image


In case a specific row has no topics set, a prompt is shown to the user.

Document image


As topics are required, the verification will be stopped.

Test for duplicate event names

The verification process will verify in the sheet:

  • Event_and_Trigger_Definition

if event names are unique.

If the configurator does detect, that a specific event name has already be used, the user is prompted.

Document image


As event names have to be unique, the verification will be stopped.

The duplicate row will have the column Event Name be marked in red.

Document image


This allows the user to find the duplicate entry and correct it.

Test for missing Source for Trigger Value

The verification process will verify in the sheet:

  • Event_and_Trigger_Definition

that triggers, which are not set to the value OnValueChange in the column labeled Trigger Condition, have a source for the trigger value set in the column Source of Trigger Value / Source Second Trigger.

If the configurator does detect, that no source for the trigger value is set, the user is prompted.

Document image


As sources for trigger values are required if the trigger condition is not set to OnValueChange, the verification will be stopped.

Test for missing Trigger Value

The verification process will verify in the sheet:

  • Event_and_Trigger_Definition

that triggers, which are not set to the value OnValueChange in the column labeled Trigger Condition, have a trigger value set in the column Trigger Value / Variable Name.

If the configurator does detect, that no trigger value is set, the user is prompted.

Document image


As trigger values are required if the trigger condition is not set to OnValueChange, the verification will be stopped.

Test for missing Source for second Trigger Value

The verification process will verify in the sheet:

  • Event_and_Trigger_Definition

that triggers, which are set to the value OnValueChangeAndSecondValueEqualTo or OnValueChangeExcludeZeroAndSecondValueEqualTo in the column labeled Trigger Condition, have a source for the second trigger value set in the column Source of Second Trigger Value.

If the configurator does detect, that no source for the second trigger value is set, the user is prompted.

Document image


As sources for the second trigger values are required if the trigger condition is set to OnValueChangeAndSecondValueEqualTo or OnValueChangeExcludeZeroAndSecondValueEqualTo, the verification will be stopped.

Test for missing second Trigger Value

The verification process will verify in the sheet:

  • Event_and_Trigger_Definition

that triggers, which are set to the value OnValueChangeAndSecondValueEqualTo or OnValueChangeExcludeZeroAndSecondValueEqualTo in the column labeled Trigger Condition, have a second trigger value set in the column Second Trigger Value.

If the configurator does detect, that no second trigger value is set, the user is prompted.

Document image


As a second trigger values are required if the trigger condition is set to OnValueChangeAndSecondValueEqualTo or OnValueChangeExcludeZeroAndSecondValueEqualTo, the verification will be stopped.

Test for invalid ASCII characters

The verification process will verify in the sheet:

  • Event_and_Trigger_Definition

if any entry has invalid ASCII characters. To learn more about which ASCII characters are allowed, review the section Restrictions on ASCII characters allowed to be used.

In the case that invalid characters are found, a prompt is shown to the user to inform them about the fact and request from the user to select the next action.

Document image


Users can either stop the verification using the No option or replace all invalid characters with and underscore "_" using the Yes option.

Verify the configuration in the sheet Event_Identifier_Definition

The verification process for the event monitoring configurations is very complex and is conducted for each sheet individually.

After the first sheet Event_and_Trigger_Definition has been verified with no errors, the second sheet Event_Identifier_Definition is verified.

Test if event names are defined

The verification process will verify in the sheet:

  • Event_Identifier_Definition

that event names are defined in the column labeled Event Name.

In the case that no event names are found, a prompt is shown to the user.

Document image


In case a specific row has no event name set, a prompt is shown to the user.

Document image


As event names are required, the verification will be stopped.

Test if tag names are defined

The verification process will verify in the sheet:

  • Event_Identifier_Definition

that tag names are defined in the column labeled DeviceHub Tag Name used to initiate Identifier update .

In the case that no tag names are found, a prompt is shown to the user.

Document image


In case a specific row has no tag name set, a prompt is shown to the user.

Document image


As tag names are required, the verification will be stopped.

Test for missing of Identifier

The verification process will verify in the sheet:

  • Event_Identifier_Definition

that a source for the Identifier is defined in the column labeled Source of Identifier.

In the case that no sources are found, a prompt is shown to the user.

Document image


In case a specific row has no source set, a prompt is shown to the user.

Document image


As sources for Identifiers are required, the verification will be stopped.

Test if Item Names for the Identifiers are defined

The verification process will verify in the sheet:

  • Event_Identifier_Definition

that the data model Item name of the Identifier is defined in the column labeled Item Name of Identifier if Source is Tag.

In the case that no data model item names are found, a prompt is shown to the user.

Document image


In case a specific row has no data model Item Name set and and has not set as source for the Identifier the value FromEvent, a prompt is shown to the user.

Document image


As Item Names are required, the verification will be stopped.

Test if no more than five Identifiers are set for event names

The verification process will verify in the sheet:

  • Event_Identifiers_Definition

that each event has no more than five Identifiers set.

If the configurator does detect, that an event name has more than five Identifiers set, the user is prompted.

Document image


As event names have to be unique, the verification will be stopped.

The rows which exceed the limit of five will have the column Event Name be marked in red.

Document image


This allows the user to find the duplicate entry and correct it.

Test for missing Event Name

The verification process will verify in the sheet:

  • Event_and_Trigger_Definition

that triggers, which are set to the value FromEvent in the column labeled Source of Identifier, have an event name set in the column If Source is Event, which Event?.

If the configurator does detect, that no event name is set, the user is prompted.

Document image


As an event name has to be set if the source is an event, the verification will be stopped.

Test for missing Identifier Value

The verification process will verify in the sheet:

  • Event_Identifier_Definition

that triggers, which are not set to the value CurrentTime in the column labeled Source of Identifier, have an Identifier value set in the column Identifier Value.

If the configurator does detect, that no Identifier value is set, the user is prompted.

Document image


As Identifier values are required if the Source is not set to CurrentTime, the verification will be stopped.

Test that the Event to read the Identifier is not the same event as for which to use the Identifier

The verification process will verify in the sheet:

  • Event_Identifier_Definition

that triggers, which are to the value FromEvent in the column labeled Source of Identifier, do not have the same event name set in the column labeled If Source is Event, which Event? as in the column labeled Event Name.

If the configurator does detect, that the event names are the same in both columns, the user is prompted.

Document image


As the event names can not be the same for both columns, the verification will be stopped.

Test for invalid ASCII characters

The verification process will verify in the sheet:

  • Event_Identifiers_Definition

if any entry has invalid ASCII characters. To learn more about which ASCII characters are allowed, review the section Restrictions on ASCII characters allowed to be used.

In the case that invalid characters are found, a prompt is shown to the user to inform them about the fact and request from the user to select the next action.

Document image


Users can either stop the verification using the No option or replace all invalid characters with and underscore "_" using the Yes option.

Verify the configuration in the sheet Event_Item_Definition

The verification process for the event monitoring configurations is very complex and is conducted for each sheet individually.

After the first sheet Event_and_Trigger_Definition and second sheet Event_Identifier_Definition has been verified with no errors, the sheet Event_Item_Definition is verified.

Test if event names are defined

The verification process will verify in the sheet:

  • Event_Item_Definition

that event names are defined in the column labeled Event Name.

In the case that no event names are found, a prompt is shown to the user.

Document image


In case a specific row has no event name set, a prompt is shown to the user.

Document image


As event names are required, the verification will be stopped.

Test if tag names are defined

The verification process will verify in the sheet:

  • Event_Item_Definition

that tag names are defined in the column labeled DeviceHub Tag Name used to initiate Item update.

In the case that no tag names are found, a prompt is shown to the user.

Document image


In case a specific row has no tag name set, a prompt is shown to the user.

Document image


As tag names are required, the verification will be stopped.

Test if item names are defined

The verification process will verify in the sheet:

  • Event_Item_Definition

that item names are defined in the column labeled Item Name.

In the case that no item names are found, a prompt is shown to the user.

Document image


In case a specific row has no item name set, a prompt is shown to the user.

Document image


As item names are required, the verification will be stopped.

Test if source of node name is defined

The verification process will verify in the sheet:

  • Event_Item_Definition

that sources for the node name are defined in the column labeled Source of Node Name.

In the case that no sources for the node names are found, a prompt is shown to the user.

Document image


In case a specific row has no source for a node name set, a prompt is shown to the user.

Document image


As sources for node names are required, the verification will be stopped.

Test if value for node name is defined

The verification process will verify in the sheet:

  • Event_Item_Definition

that values for the node name are defined in the column labeled Value for Node Name.

In the case that no values for the node names are found, a prompt is shown to the user.

Document image


In case a specific row has no value for a node name set, a prompt is shown to the user.

Document image


As values for node names are required, the verification will be stopped.

Test if items have a setting for when it is recorded

The verification process will verify in the sheets:

  • Event_Item_Definition

that each item has a setting for when it will be collected in the column labeled Is the Item recorded for the NewEvent or the PreviousEvent? .

In the case that no setting for when an item is to be collected has been found, a prompt is shown to the user.

Document image


In case a specific row has no setting for when the item is to be collected, a prompt is shown to the user.

Document image


The user can define if they want to set the default value of NewEvent or in case it is a calculation PreviousValue using the Yes option or stop the verification using the No option.

Test if source of item value is defined

The verification process will verify in the sheet:

  • Event_Item_Definition

that sources for the item value are defined in the column labeled Source of Item Value.

In the case that no sources for the item value are found, a prompt is shown to the user.

Document image


In case a specific row has no source for an item value set, a prompt is shown to the user.

Document image


As sources for item values are required, the verification will be stopped.

Test for missing Identifier Value

The verification process will verify in the sheet:

  • Event_Item_Definition

that triggers, which are not set to the value CurrentTime in the column labeled Source of Item Value, have an Identifier value set in the column Value of Item.

If the configurator does detect, that no Item value is set, the user is prompted.

Document image


As Item values are required if the Source is not set to CurrentTime, the verification will be stopped.

Test for invalid ASCII characters

The verification process will verify in the sheets:

  • Event_Item_Definition

if any entry has invalid ASCII characters. To learn more about which ASCII characters are allowed, review the section Restrictions on ASCII characters allowed to be used.

In the case that invalid characters are found, a prompt is shown to the user to inform them about the fact and request from the user to select the next action.

Document image


Users can either stop the verification using the No option or replace all invalid characters with and underscore "_".

Create JSON file

To create the JSON configuration, the user does press the button Verify and Create JSON Configuration.

Document image


The Configurator will first run the verification process which was explained in the previous section.

Progress is shown by a progress bar.

Document image


Only if the Verification has found no errors or was stopped, will the configurator create the JSON configuration file.

The user is then prompted to select the path where the file is stored as well as being able to modify the file name before saving it.

Document image


The file is then stored in the specified folder.

Document image