Solutions
...
Litmus Production Record Exter...
Creating an event monitoring c...
4. Verifying the data model and creating the JSON file
55 min
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 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 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 in case a specific row has no event name set, a prompt is shown to the user 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 in case a specific row has no tag name set, a prompt is shown to the user 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 in case a specific row has no trigger condition name set, a prompt is shown to the user 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 in case a specific row has no trigger tag set, a prompt is shown to the user 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 in case a specific row has no topics set, a prompt is shown to the user 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 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 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 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 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 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 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 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 in case a specific row has no event name set, a prompt is shown to the user 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 in case a specific row has no tag name set, a prompt is shown to the user 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 in case a specific row has no source set, a prompt is shown to the user 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 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 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 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 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 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 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 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 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 in case a specific row has no event name set, a prompt is shown to the user 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 in case a specific row has no tag name set, a prompt is shown to the user 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 in case a specific row has no item name set, a prompt is shown to the user 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 in case a specific row has no source for a node name set, a prompt is shown to the user 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 in case a specific row has no value for a node name set, a prompt is shown to the user 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 in case a specific row has no setting for when the item is to be collected, a prompt is shown to the user 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 in case a specific row has no source for an item value set, a prompt is shown to the user 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 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 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 the configurator will first run the verification process which was explained in the previous section progress is shown by a progress bar 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 the file is then stored in the specified folder