Registration Namespace

The Registration namespace allows expression rules to detect if the asset for which the expression rule is being processed is registering for the first time. This namespace is available only for Registration messages (in Expression Rules where the trigger type is "Registration").

Use this namespace with asset-related triggers and NOT with system-related triggers. See Using Appropriate Actions and Namespaces with Triggers for Expression Rules.

If the symbol provides a string that will be used in comparisons, that value will be case-sensitive. For example, make sure the File hint value is written in the correct case for comparison (If Registration.version == "M2M" Then ).

This namespace takes the following symbols:

o        first -- True if the asset is registering for the first time.

o        time -- The time that the registration message occurred.

o        version -- The version of the agent running on the asset OR "M2M" if the asset is a wireless device.

o        pingrate -- The number of seconds between attempts by the agent running on an asset or by a wireless device to contact the Axeda® Platform.

When you use this namespace in an expression rule, use the following syntax:

 

Qualified Name

Unqualified

Returns

Example

*Registration.first

first

Boolean

If Registration.first *

Registration.time

time

Long

Audit("data-management", "Asset registered on " + FormatDate(Registration.time))

Registration.version

version

String

Note: This symbol is case-sensitive.

If Registration.version == "600"

If Registration.version == "M2M"

Registration.pingrate

pingrate

String

If Registration.pingrate == 300

* This symbol returns a Boolean. Do NOT use an operator and value. To test for a value of true, use the namespace and symbol only (Registration.first) in the If expression. To test for a value of false, use the NOT (!) operator and then the namespace and symbol (!Registration.first). See also Creating IF comparisons with Boolean values.

Notice that the namespace always starts with a capital letter while the symbols always start with lowercase letters. If you want to resolve a Location, Alarm, or Data Item symbol in an expression rule generated by the Registration message, then you must use their respective namespaces (Location, Alarm, DataItem), and in the case of the DataItem namespace, the local variable (the name of the data item). In general, Axeda recommends that you always use the appropriate namespace qualifier with symbols in expression rules.

Example

The following example checks whether the registration of the asset with a model of AcmeFX and serial number of PS123456 is a first-time registration:

If (Device.model == "AcmeFX" &&
Device.serial == "PS123456" && Registration.first)

 

See Also