Note: This function is an Axeda ConnectedConfiguration feature. If the Axeda Platform is not licensed for ConnectedConfiguration, you will not have access to this function.
This function can operate on the asset in scope or it can be specified to operate on another, specified asset.
CfgLongValue() function finds the Long value in the configuration corresponding to the specified Path for the asset in the rule execution context. When multiple identical Paths exist in the configuration, the Path argument should include the array index to indicate which configuration element should be returned. For example, the Path "/Config/Hardware/Motherboard[2]/Version" identifies the third occurrence in the array.
Long CfgLongValue(String "path")
where:
path -- The Path defined for this comparison
The following example determines if the motherboard specified in the Path (for the related asset) was manufactured at a specified date:
If: CfgLongValue("/Config/Hardware/MotherBoard/manufacturingDate") = "1321376528"
CfgLongValue() function finds the Long value corresponding to the specified Path for the asset corresponding to the specified model and serial number. When multiple identical Paths exist in the configuration, the Path argument should include the array index to indicate which configuration element should be returned.
Long CfgLongValue(String "path", String "modelNumber", String "serialNumber")
where:
path -- The Path defined for this comparison. Trailing or leading Asterisk (*) wildcards are allowed.
modelNumber -- The model of the asset configuration (Path) for this comparison
serialNumber-- The serial number of the asset configuration (Path) for this comparison
The following example determines if the motherboard specified in the Path (for the related asset, defined by model and serial number) was manufactured at a specified date. An audit message is created with the results of the comparison.
If: CfgLongValue("/Config/Hardware/MotherBoard/Make", "modelXYZ", "serial123") = "1321376528"
Then: Audit("data-management", "The motherboard for the ACME123 asset is current.")
Notes on Rule Execution:
The Platform first compares the incoming configuration event with non-persisted configuration values. If the value is not found or if the path was specified for a different asset than the one in the current context of the event, then the Platform checks persisted (saved) values. The rule will NOT trigger if the Configuration event does not provide any paths that are used in the Expression rule.
If the rule does not evaluate, make sure the following are true: the Path exists as specified, you've used valid function argument types and the correct number of arguments, the asset you identified exists as specified (modelNumber/serialNumber). Also for CfgStrValue, CfgDoubleValue, CfgBooleanValue, CfgItem, CfgHas, CfgLongValue: the rule will not evaluate if multiple node/values are found for the specified path (with or without wildcard). Finally, if a rule defined with SetCfgValue action doesn't execute, make sure the SetCfgValue action path does not contain any trailing or leading wildcards ‘*’ .