Posts

Showing posts from 2023

Hierarchical query to view the hierarchy as a plain text

Image
I was looking around queries to process hierarchical data and came across some of Oracle's features to query hierarchical data and was able to create this quite interesting way to view parent/child data in maximo to view location hierarchy data, for example. It uses the "start with", "connect by" and "prior" syntax and outputs the leaf element with a nice tree path. select  location , parent , systemid , level ,      RPAD ( '.' ,   ( level -1 )* 2 ,   '.' )   ||  location  AS  tree ,      LTRIM ( SYS_CONNECT_BY_PATH ( location ,   ' < ' ),   ' < ' )   AS   path ,     CONNECT_BY_ISLEAF  AS  leaf from  lochierarchy where  systemid = 'HVAC' --where location in ('SF-CMT-1MZ-FCU-43','FCU-CMT-1F-FCU-68','08-CMT-1088','FCU-CMT','FCU','ACAIR','HVAC','MECH') and systemid='HVAC' START   WITH  location  in   ( 'SF-CMT-1MZ-FCU-43' ) CONNECT...

Maximo maxsessions showing Server IP instead of Client IP

MAXSESSIONS table shows the current list of user sessions and also contains client Hostname and IP addresses. Depending on the implementation architecture of webserver, firewall, load balancer etc the  client IP in maxsessions table might show only the server IP all the time. This is due to the HTTP XFF header which may not be getting forwarded correctly for some reason.  In our case, one of our clients faced this issue and I had to forcibly set header using a rewriterule in HTTP server. Go to the HTTP server directory. Usually something like <installation_path>/IBM/HTTPServer/conf/httpd.conf Added the below lines in httpd.conf. Also make sure that the  mod_rewrite.so  and  mod_headers.so  mods are enabled in the same file and not commented out . ####### set "X-Forwarded-For" header as Client IP###### #set XFF header to get the Client IP address in Max Sessions table RewriteEngine on RewriteRule ^(.*) - [E=CLIENTIP:%{REMOTE_ADDR},L] RequestHea...

Keyboard shortcuts in Maximo

On Date Fields Alt + ↑ or ↓   Increases or Decreases the Date  by 1 day Ctrl   +   ⇧ Shift   +  ↑  or   ↓    Changes the date's Year Part Ctrl   +   ⇧ Shift   +  (  or   )    Changes the date's Month Part Ctrl   +   ⇧ Shift   +  &   sets the Current date

Setting Pre Defined URL in Maximo Anywhere

Image
To set a pre defined URL while opening the Anywhere app, first of all the app has to be built by using App Container. The URL that will be displayed will be created using the properties defined in  the \IBM\Anywhere\MaximoAnywhere\build.properties adapter.connection.protocol=https adapter.connection.domain=maxany.adweag.ae adapter.connection.port=443 adapter.connection.context=maximo Unfortunately it always creates URL which contain port number. To avoid the URL to not have PORT number, update the \IBM\Anywhere\MaximoAnywhereAppCntr\scripts\container.js file and add below script where it creates the URL.  if (appBuildProps.get('adapter.connection.url')) { let serverUrl = appBuildProps.get('adapter.connection.url'); defaultServer = serverUrl;         } Also set a new property adapter.connection.url to whichever URL you need.

Maximo Anywhere notes to rememmber

Image
MaximoAnywhere App development points that some people might find to be useful: Use an xml editor like in eclipse with xsd validator to avoid errors The App XML XSD is very useful in finding out possible attributes/values and elements while designing the application Different types of events in Application elements include click|changestate|datachange|render|validate Resouces in the Anywhere Application use OSLC Resources defined in Maximo environment OSLC Resources use Integration Objects (consumedby=OSLC) Integration Objects have OS Security Authorization OS Security can be either App Based or OS based, it can be configured by using the Configure Object Structure Security and selecting the below checkbox. When its APP Based Access to that OS can be granted from Security Groups App using application authorizations tab When its OS Based you can grant using Object Structure authorization tab in Security Groups App. Use might have to use eventContext.viewControl.refresh() sometimes ...

Anywhere container build fails during cordova build android command

Image
 Anywhere container build fails due to below error BUILD FAILED in 2m 39s     at ChildProcess.exithandler (child_process.js:303:12)     at ChildProcess.emit (events.js:315:20)     at maybeClose (internal/child_process.js:1051:16)     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) {   killed: false,   code: 1,   signal: null,   cmd: 'M:\\IBM\\Anywhere\\MaximoAnywhereAppCntr\\node_modules\\cordova\\bin\\cordova build android' }   [ERROR]  2023-2-17 19:33:29   [IncidentReport::android]  Command failed: M:\IBM\Anywhere\MaximoAnywhereAppCntr\node_modules\cordova\bin\cordova build android Note: M:\IBM\Anywhere\MaximoAnywhereAppCntr\output\IncidentReport\platforms\android\CordovaLib\src\org\apache\cordova\engine\SystemCookieManager.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. FAILURE: Build failed with an exception. Turns out it wa...