Importing OSLC resources to Maximo Anywhere

After you create OSLC resources in Maximo® Asset Management, you need to import the updated metadata to Maximo Anywhere.

Before you begin

Verify that the address properties for the service provider are correct in the build.properties file. The build.properties file is in the Anywhere\MaximoAnywhere folder.
  • adapter.name=service_provider_name
  • adapter.connection.protocol=http
  • adapter.connection.domain=ip
  • adapter.connection.port=port_number
  • adapter.connection.context=context

About this task

You run an import utility Ant script to import the resource data from Maximo Asset Management to the Resource Description Framework (RDF) files in Maximo Anywhere.

The import utility is named anywhere-rdfs-puller.xml and is in the Anywhere\MaximoAnywhere folder. The utility includes all the shape documents that are used by the service provider in Maximo Asset Management for the Maximo Anywhere mobile apps.

Procedure

  1. Edit the anywhere-rdfs-puller.xml file and add the appropriate RDFs. For example, if you created the resource for myRelatedObject, you add the URI <downloadOneRdf context="/oslc/shapes/oslcwodetail/myRelatedObject" /> to the anywhere-rdfs-puller.xml file.
  2. To run the import utility in a development environment, specify the user name and password as arguments for the file.
    1. In MobileFirst Studio, add the anywhere-rdfs-puller.xml Ant file to the Ant view.
    2. Right-click on the anywhere-rdfs-puller.xml Ant file and select Run as > Ant Build.
    3. On the Main tab, add the user name and password for the adapter in the Arguments field.-Dadapter.connection.user=<user_name> -Dadapter.connection.password=<password>
  3. Import the OSLC resource data.
    Environment Action

    In a development environment in MobileFirst Studio

    Run the anywhere-rdfs-puller.xml file from the Ant view.

    In a production environment

    Run this command:

    ant -f anywhere-rdfs-puller.xml -Dadapter.connection.user=<user_name> -Dadapter.connection.password=<password>

  4. Verify that the RDF is imported and that the RDF content, name, and attributes are correct in the Anywhere\MaximoAnywhere\oslc-docs\resources\rdf\oslc directory.

What to do next

To implement the resources in the mobile apps, update the application definition and deploy a new application version.