Creating queries in Maximo Asset Management
When you create queries in IBM® Maximo® Asset Management, you specify search criteria that suit the requirements of the target user groups in Maximo Anywhere.
About this task
As a developer, you create work list queries in the Maximo Asset Management application that authorizes access to the primary resource for the mobile app. The authorizing application must be registered with the object structure for the primary resource. For example, the primary resource in the Maximo Work Technician app is the work order. In Maximo Asset Management, the Work Order Tracking application is registered as the authorizing application for the oslcwodetail object structure and work order resource. Therefore, you create queries for the Technician app in the Work Order Tracking application.
The queries that you create in the Maximo Asset Management application must be saved and marked public. Public queries are automatically added to the service provider that manages the associated resource data. These queries are implemented and used by consumers such as mobile applications to retrieve data from the provider application.
The search criteria that you define for a query determine the search results that are returned during run time. The actual result set for individual users can be different depending on their access rights in Maximo Asset Management. For example, a user belongs to a security group that is authorized to see work orders for the Site A, but not Site B. When this user runs a query in the app to retrieve all work orders in the preventive maintenance backlog, work orders for Site A, but not for Site B, are downloaded to the device.
The search criteria can include constants that are resolved dynamically when the query is executed in Maximo Asset Management. The result set is filtered by the value that is returned for the resolved constant. For example, the default query, WORKIOWN, for the Technician app includes a constant, :USER. When the query is executed, this constant is resolved to return all work orders that are owned by the current user.
Procedure
- In Maximo Asset Management, open the application that authorizes access to the primary resource for the mobile application.
- On the List tab, click Advanced Search,
use one of the available options to specify the search criteria, and
click Find. Verify that the query returns the expected search results.
- Click Save Query and specify a name that uniquely identifies the
query. The query name cannot include spaces or special characters, for example: ! " # $ % & ' ( ) * +
- Select Public.
- Click OK.
What to do next
Use the query name that you specified in Maximo Asset Management to add the query to the application definition XML file for the mobile app.