File (upload) Namespace

If you want to take action based on the completion of a file upload from an asset, you can use the File trigger to generate an expression rule. The File (upload) namespace provides access to information about files that have been uploaded to the Axeda® Platform. This namespace is available only for File messages (Expression Rules where the trigger type is "File").

If the symbol provides an Enumerated list of values, those values must be all lowercase. If the symbol provides a string that will be used in comparisons, that value will be case-sensitive. For example, use all lowercase to define a File compression (File.compression == "tar-gzip"); make sure the File hint value is written in the correct case for comparison (If File.hint == "provisioning" Then ).

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

The File namespace takes the following symbols:

Note: Axeda IDM Agents do not support compression for file transfers. For these Agents, most of these File namespace symbols are NOT supported. The time symbol is the only one supported for IDM Agents. The other symbols supported for expression rules with a File trigger are the model and serial number.

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

 

Qualified name

Unqualified

Returns

Example

File.names

names

String

Note: This symbol is case-sensitive.

IF: has("log", File.names)

Can also be a comma-separated list.

File.actualnames

actualnames

String

Note: This symbol is case-sensitive.

If File.actualnames == "xGate1.log,xGate2.log,xGate3.log,xGate4.log"

File.sizes

sizes

String

Note: This symbol is case-sensitive.

If File.sizes == "1KB,1KB,1KB,1KB"

File.time

time

Long

Audit("data-management", "Asset uploaded the file on " + FormatDate(File.time))

File.hint

hint

String

Note: This symbol is case-sensitive.

If File.hint == "provisioning"

File.compression

compression

String

Note: Must be all lowercase.

If File.compression == "tar-gzip"

If File.compression == "none"

File.count

count

Integer

If File.count > 10

 

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 File message, then you must use the namespaces (Location, Alarm, Data Item). In general Axeda recommends that you always use the appropriate namespace with symbols in expression rules.

 

See Also