Skip to main content

Maximo OSLC Integration with External System- Get data in JSON format

Greetings! If you have noticed recent version of Maximo, couple new application in Integration module has been added which are OSLC Resources and OSLC Provider.These modules gives us ability to integrate with external system in JSON.
OSLC is an open community that creates specifications for the integration of products and/or tools.  IBM is a leading contributor to this community and many software products within the IBM Software Group are implementing OSLC in order to enable cross-product integrations.

An OSLC integration requires 2 players- 
1. OSLC Consumer application
2. OSLC Provider application.  
An OSLC provider application makes containers of associated resources(data) available for integration through service providers. Consumer applications then use these service providers to query resources and to create, update, and delete resource data.  The consumer application sends a query to the service provider for resource data. The service provider provides a link to the resource data in response. The consumer application uses the link to create, update, or delete resource data.


Outbound integration from Maximo to External System-
If there is an external system which accepts JSON , can query Maximo OSLC resource to fetch data. Say for example- external system need Asset data from Maximo, we'll go to Integration > Object Structure and create new object structure consumed by OSLC-
After that go to Integration > OSLC Resources as-

We can use OSLC resources to get data from Maximo. Go to Browser like Firefox and Chrome and hit url-
http://HostName/maximo/oslc/OSASSET/
This will give output as details of OSLC Provider and related information.
If external system need get asset details, it will access URL as- 
http://HostName:Port/maximo/oslc/os/OSASSET
In case you get User Name and Password invalid error, pass user name and password as - 
http://HostName:Port/maximo/oslc/os/OSASSET?_lid=maxadmin&_lpwd=maxadmin
This will provide information of all asset (all MBOs and all columns) from your database. 
Get only selected columns use oslc.select-
http://HostName:Port/maximo/oslc/os/OSASSET?oslc.select=assetnum,location,description,parent,status

To Sort data use oslc.orderBy-
For sorting in ascending order pass parameter with +<ColumnName>
FOr sorting in desecding order pass parameter with -<ColumnName>

http://HostName:Port/maximo/oslc/os/OSASSET?oslc.select=assetnum,location,description,parent,status&oslc.orderBy=-assetnum



http://HostName:Port/maximo/oslc/os/OSASSET?oslc.select=assetnum,location,description,parent,status&oslc.orderBy=+assetnum

To find out specific asset user oslc.where-
http://HostName:Port/maximo/oslc/os/OSASSET??_lid=maxadmin&_lpwd=maxadmin&oslc.select=assetnum,location,description,parent,status&oslc.where=assetnum="1001"

In case of more than one criteria is needed in where clause it will be used as-
http://HostName:Port/maximo/oslc/os/OSASSET??_lid=maxadmin&_lpwd=maxadmin&oslc.select=assetnum,location,description,parent,status&oslc.where=assetnum="1001" and location="MOFLOOR1"



Comments

Popular posts from this blog

Power of Maximo Formulas - Build logic w/o Custom Java code or Automation Script

Greetings! Maximo 7.6 has lot of additional capabilities added in Tivoli Automation Engine as compared to older versions of Maximo which aim to allow users to make change in applications for small requirements without actually going to customization route. Automation scripts is one of such tool given for users and technical developers to change the behavior of Maximo in case where functionalities can't be changed only via use of configuration. If we have a requirement to populate some field on basis of other fields , we can easily do that with automation script but in order to do that you still need to have knowledge of Jython or Javascript to write the logic. Maximo formula is one the tool given by IBM which can be used for such business requirements and user can make changes to Maximo logic via configuration without getting into difficulties of coding. Formulas are available from Maximo version 7603. With release of Maximo version 7606, there has been addition of new capabil...

Call publish channel w/o enabling Event Listener in Maximo

Greetings! Generally if we have to send data to external system via MIF, we create Publish Channel and enable Event Listener on publish channel. Once event listener is enabled, Maximo listens for event and send data to end point via publish channel for each Save of related MBO . But t here are many scenarios where we need to send data to external system using publish channel on specific event and not for every save. In order  to send to external system on specific event, for example - sent data to Ariba when PO status in Maximo is changed to APPR, we can use automation script or java code to call publish channel on the go. Below code can be used in automation script - server = MXServer.getMXServer() userInfo = mbo.getUserInfo() whereClause = <CONDITION> server.lookup("MIC").exportData("<Publish Channel Name>", "<External System Name>", whereClause, userInfo, 1000) Via Java class - MXServer server = MXServer.getMXServer(); ...