Monday 26 October 2020

Swagger - Maximo Restful API Categories

Maximo APIs are grouped into modules based on the functional aspect of the software they cater to. 

Here is the link to the list of all modules and then proceed with swagger to open one by one based on the need/requirements.

https://localhost/maximo/maximomodules.jsp


or use direct link to open selected API in swagger with actions =1 or 0 for no

https://localhost/maximo/oas3/api.html?module=PURCHASE&includeactions=0 

Thursday 22 October 2020

Service Specific to an Application/Object in Maximo - AppService | Maximo

These are wrapped with multiple capabilities as a service to support an Application/object within Maximo. 

for example, a service specifically for asset, another is for workflow, and so on. 

Also, some of the services work globally like Escalations service.

If we look into the log, we can see something like 

BMXAA6348I - The ASSET service is initializing.

BMXAA6348I - The WORKFLOW service is initializing.

 

So as mentioned above, there are 2 types of AppServices

1. App-related services

  • psdi.app.asset.AssetService
  • psdi.app.item.ItemService
  • psdi.app.pr.PRService
  • psdi.app.inventory.InventoryService
  • and so on.

Display Last Workflow Memo in Application field | Maximo

 Requirement

Is it possible to see the last workflow message when I open any record just beside/below the status field? 


Solution: 

Yes, It is possible with 2 different approaches. Let take this example and display the last memo in work order application.

A. Directly with the relationship, no need for a view also. 

B. Create a View to handle a query


A.  Start with easy way, just relationship and display the field

  1. add the following relationship to the workorder
    • Relationship: LAST_MEMO_VIEW
    • Where Clause: ownertable= 'WORKORDER' and ownerid= :workorderid and memo is not null and transid in (select max(transid) from wftransaction where ownerid= :workorderid and memo is not null)
    • Child Object: WFTRANSACTION
  2. Now in the application designer just add a new text field and put LAST_MEMO_VIEW.MEMO in attribute property and make it read-only also. 


Tuesday 20 October 2020

Object Lauch Point - Allow Objet Creation/Deletion (CanAdd/CanDelete) | Maximo

These 2 events fire immediate and do not even wait for the framework to save/insert the record.


Allow Object Creation - canAdd() method of mbo framework

Creation is bit tricky because it runs when there is no record. And because there is no record there is no mbo the implicit variable. In that case, we use "mboset" as 

if mboset.getOwner() is not None and mboset.getOwner().getName()=="PO" and mboset.getOwner().isNull("vendor"): 

   service.error("PO", "vendor is null") 


Allow Object Delete - canDelete() method of mbo framework

Deletion is simple if we throw an error, the system will prompt with an error and stop further processing, and the record will not be deleted.  


if mbo.getOwner() is not None and mbo.getOwner().getName()=="PO" and !mbo.getOwner().isNull("vendor"): 

   service.error("PO", "vendor is not null")