ThingWorx Software Content Management > Packages > Set Conditions for Property Dependencies
Set Conditions for Property Dependencies
Property dependencies enable you to set the condition for the package deployment based on a requirement that a local or remote property be of a certain value or within a certain range..
Step 1: How to create a property dependency
Step 2: How to create a property dependency that is eligible for deployment
While doing Step 1, any combination of Property Name, Operator and Property Value is allowed, but you must make sure that the relationship makes sense for deployment. Follow these rules:
If the types of Property Value and asset’s Property Value do not match, the deployment for that delivery target fails with a type mismatch error.
Operator and Property Value must match in type
A table of possible combinations is given below:
Operator / Property Value Type
String
Boolean
Number
>
No
No
Yes
<
No
No
Yes
>=
No
No
Yes
<=
No
No
Yes
==
Yes
Yes
Yes
!=
Yes
Yes
Yes
*
Yes (Value is ignored)
Yes (Value is ignored)
Yes (Value is ignored)
Step 3: How a package is evaluated at the start of a deployment
There are differences in behavior based on the package type (file-based or instruction-based) and property type (local or remote) that must be considered before deploying a package.
In most cases, the evaluation is local, that is, it occurs on the ThingWorx Software Content Management side, taking the property value from the asset's thing. However, for instruction-based package type, the condition can be evaluated on the Axeda agent.
The next table describes how and where the conditions are evaluated depending on the package type and the property type (local or remote).
Package type / Property scenario
Local property
Remote property
Property does not exist on Thing (could exist on asset)
File-based
Evaluates locally
Evaluates locally
Fails
Instruction-based
Evaluates locally
Evaluates on the agent
Evaluates on the agent
Example of a Failed Deployment
During the start of a deployment of a package to a delivery target, conditions are checked against the actual asset's Property Value, (whether on the Thing or on the asset itself- see previous table for the differences). It checks asset’s Property Value , Operator and Property Value.
For example, we have an asset with the property Temperature = 24 (so asset's Property Value = 24), and we enter a dependency with
Property Name = Temperature
Operator = >
Property Value = 25
Then during the deployment, this condition is checked:
24 > 25
The deployment becomes ineligible with a status message explaining the reason for failure.
Was this helpful?