Maximo

 View Only

Defining OSLC Resources

Wed March 18, 2020 11:17 AM

Creating an OSLC Resource with minimum configuration

For those of you who primarily want to leverage the OSLC api to query and/or update data (Asset data is used in this example) in Maximo, you can start by selecting the existing MXASSET object structure within the Object Structures application and 'Duplicate' it.  Provide a new name, set the Consumed By to OSLC and optionally you can make any other changes that you determine necessary such as removing/adding child objects and/or including/excluding object columns.

Once your object structure is defined you then can go to the OSLC Resources application under the Integration GOTO menu.  Here you can create a new OSLC Resource using the newly created object structure. The screen shot below shows a new Resource creation where the resource name is ASSET, and the object structure referenced in ASSETOSLC (created by duplicating MXASSET).  The Domain selected was SmarterPhysicalInfrastructure (the default domain for Maximo) and the Default Namespace URI was set to http://jazz.net/ns/ism/asset/smarter_physical_infrastructure# (the default namespace for Maximo).

As you can see the object structure was updated to contain the ASSET and ASSETMETER objects only.  All other fields on this screen were defaulted by the application.

If your object structure has child objects (like assetmeter in example above), you need to set the default namespace for each child object. With just the configuration described above, you have created a resource and you can now use OSLC api capabilities. Limiting the configuration to just what is shown above, does not allow you to make use of the common domain vocabularies that OSLC supports, however those could be configured as desired.

 

If you query the Public URI defined for Maximo (system property mxe.oslc.webappurl), a URI to access the Maximo Service Providers will be provided:

Request using Public URI: http://localhost/maximo/oslc

Result will include:

"spi:serviceProviders":
   {
       "rdf:resource": "http://localhost/maximo/oslc/sp"
   }

Using the above URI, you will get a list of service providers from which the following URI that represents the
Domain (SmarterPhysicalInfrastructure) that was configured on the OSLC resource created above.

 <rdfs:member rdf:resource="http://localhost/maximo/oslc/sp/SmarterPhysicalInfrastructure"/>

Using this URI will retrieve all the resources and their operations (queryCapability & creationFactory) supported by this Service Provider, include the resource defined above.

Here's the queryCapability for the above resource.  Included is the queryBase URI that can be used to query this resource.

 <oslc:queryCapability>
    <oslc:QueryCapability>
        <oslc:resourceType rdf:resource="http://jazz.net/ns/ism/asset/smarter_physical_infrastructure#ASSET"/>
        <oslc:queryBase rdf:resource="http://localhost/maximo/oslc/os/assetoslc"/>
        <dcterms:title>OSLC query capability for ASSET</dcterms:title>
    </oslc:QueryCapability>
</oslc:queryCapability>

 

Here's the creationFactory for the above resource.  Included is the creation URI that can be used to create this resource.

 <oslc:creationFactory>
   <oslc:CreationFactory>
       <oslc:resourceType rdf:resource="http://jazz.net/ns/ism/asset/smarter_physical_infrastructure#ASSET"/>
       <oslc:resourceShape rdf:resource="http://localhost/maximo/oslc/shapes/assetoslc"/>
       <oslc:creation rdf:resource="http://locahost/maximo/oslc/os/assetoslc"/>
       <dcterms:title>OSLC creation factory for ASSET</dcterms:title>
   </oslc:CreationFactory>
</oslc:creationFactory>
 

Also provided in the creationFactory is the Resource Shape URI.  This URI can be used to retrieve the Shape document for this resource.




#AssetandFacilitiesManagement
#MaximoIntegrationandScripting
#Maximo

Statistics
0 Favorited
15 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.