Customizing Information Content and Access > Configuring and Customizing Equipment Status > Customizing the Default Status Expressions for Custom Equipment Thing Templates
Customizing the Default Status Expressions for Custom Equipment Thing Templates
The status expressions for individual pieces of equipment are configured from the Equipment tab of Configuration and Setup, by viewing the individual equipment and selecting the Status page. When new pieces of equipment are created, defaults are defined for all status expressions.
The default status expressions can be defined for custom equipment Thing Templates, such as Thing Templates which you have added or updated for custom equipment types. All equipment created using the custom equipment Thing Template automatically inherits these default status expressions.
To define the default status expression configuration for a custom Thing Template:
1. In ThingWorx Composer, open your custom Thing Template.
2. Under Services, click Override icon. to override the GetDefaultStatusExpressionsConfiguration service.
3. In the script pane, you can edit the expression for each of the customizable statuses.
Screenshot highlighting the editable expressions for the customizable statuses
To edit the expression, make changes to the gray expression text. To define default status expressions for the custom statuses, uncomment those rows in the code. For more information on specifying status expressions, see Specifying Status Expressions.
4. Click Done.
5. Save the updated Thing Template.
6. Validate your customized status expression configuration. The status expression configuration defined on the Thing Template must be valid for new equipment to be created based on the Thing Template.
a. Navigate to PTC.Factory.StatusExpressionUtils.
b. Under Services, execute the ValidateDefaultStatusExpressionsByTemplate service. As input, enter the name of the Thing Template with your customized status expression configuration.
This service validates the following:
That the defined expressions are valid.
That there are no errors in the implementation of the GetDefaultStatusExpressionsConfiguration service.
If any of these validations fail, the service output displays an error message providing information on the failure.
c. Fix any errors and rerun the service until it returns no errors.
Was this helpful?