Wednesday 5 February 2020

Improved Automation Scripts application

Maximo automation scripts are a very useful tool to implement custom business logic for your customer. After time you may have many scripts to maintain and it may become hard to understand all the logic you have implemented on a specific object. I easy and useful trick I always use is to modify the Automation Scripts application to be able to display and filter script’s launch points.
You can see in this screenshot how easy it  to understand what scripts are running on each business object.

The Automation Scripts app can be modified in just few minutes and can be a lifesaver in many cases.
Open the Application Designer, search for AUTOSCRIPT application and make the following changes.
Remove the following table columns definitions:
  • SCRIPTLANGUAGE – Typically you always use one scripting language so there is no need to search for this field.
  • VERSION – I don’t think this is really helpful.
  • USERDEFINED – Maximo has no built-in script and you probably use a project-specific prefix.
Add the following columns:
  • SCRIPTLAUNCHPOINT.LAUNCHPOINTTYPE
  • SCRIPTLAUNCHPOINT.OBJECTNAME
  • SCRIPTLAUNCHPOINT.ATTRIBUTENAME
If you prefer to modify the application definition XML instead of using the graphical editor, here is is how the XML will look like.
<tablebody displayrowsperpage="20" filterable="true" filterexpanded="true" id="autoscript_results_showlist_tablebody">
  <tablecol dataattribute="autoscript" filterable="false" id="autoscript_results_showlist_column1" mxevent="toggleselectrow" mxevent_desc="Select Row {0}" sortable="false" type="event"/>
  <tablecol dataattribute="autoscript" id="autoscript_results_showlist_column2" mxevent="selectrecord" mxevent_desc="Go To %1" type="link"/>
  <tablecol dataattribute="description" id="autoscript_results_showlist_column3"/>
  <tablecol dataattribute="active" id="autoscript_results_showlist_column5"/>
  <tablecol dataattribute="SCRIPTLAUNCHPOINT.LAUNCHPOINTTYPE" id="mxd_LAUNCHPOINTTYPE"/>
  <tablecol dataattribute="SCRIPTLAUNCHPOINT.OBJECTNAME" id="mxd_OBJECTNAME"/>
  <tablecol dataattribute="SCRIPTLAUNCHPOINT.ATTRIBUTENAME" id="mxd_ATTRIBUTENAME"/>
  <tablecol filterable="false" id="autoscript_results_bookmark" mxevent="BOOKMARK" mxevent_desc="Add to Bookmarks" mxevent_icon="btn_addtobookmarks.gif" sortable="false" type="event"/>
</tablebody>

Scripting with Maximo

Today I am going to introduce you to the world of scripting with Maximo. Maximo scripting let you customize a slew of Maximo components. These components include these kinds of customizations:
  • Customizing MBOs through save-point and initialization-point validations and actions and MBO field validations and actions.
  • Customizing workflow, escalation, conditional UI, menus, and push-button actions via scripted actions and conditions.
It is important to understand that the Automation scripts are a server-side artifact, as opposed to a client-side one. So all your scripts are executed on the server side as opposed to say in the browser.
The cool part about scripting is that you can use it without writing a line of Java code, or without restarting the server or rebuilding the EAR file. We understand that sometimes you need to customize using MBO code or the Maximo SDK and the scripting framework does not remove that power. You still have access to all of Maximo APIs as well the MBO instances in context. You can use a MBO to access any related MBO or set and can call all public APIs, such as those to invoke a Web service or a send an email from a script.
As for languages, you can code the script in the language of your choice. Jython and JavaScript are enabled by default. However, you should be able to use any JSR-223 compliant scripting engine or language, provided that you add the java-engine.jar file to the Maximo classpath (either ear or system). So if you are a JRuby or Groovy geek, try the version of those languages that supports JSR-223 and start grooving in Maximo. Just so you know, Maximo Support supports questions about scripts written only in JavaScript and Jython.

Monday 21 August 2017

Maximo Asset Management 7.6.0.7 Interim Fix 005 released


The Interim Fix (IFIX) is available at Fix Central.

As with all IFIXes, MAM 7607 IFIX 005 is cumulative and includes all fixes provided with Maximo Asset Management 7.6.0.7 Interim Fix 004, with these additions:

APAR
Application Name
Description
IV89431
Security Groups
Access is required to create work orders and tasks.
IV95332
Assets
In the Assets application, for multiple assets, you cannot change the status in the background.
IV98279
Conditional Monitoring
In the Conditional Monitoring application, when you add a job plan to a condition, the prioirty does not populate.
IV94406
Graphical Scheduling
In the Graphical Scheduling application, when you use Microsoft Internet Explorer 11, the Gantt view does not render.
IV94978
Job Plans
In the Job Plans application, when auto-number functionality is enabled, job plan predecessors are not recorded correctly in the database.
IV92471
Purchase Orders
In the Purchase Orders application, when you use the Go To function on a purchase order line and the work order site is different that the main purchase order site, records are not returned.
IV93059
Automation Scripts
When you change the status of an asset, an automation script causes an exception.
IV97336
System Object
When you install one or more secondary languages, some messages in the browser are incorrectly translated.
IV95258
System Object
Maximo searches on the SQL server are adding additional brackets that cause the search to fail.
IV90039
Inventory Usage
In the Inventory Usage application, you cannot update an inventory usage document if it has an associated reservation that is canceled.

Monday 31 July 2017

MxLoader now supports attachments

I have just implemented the capability to upload attachments straight from MxLoader. This is in response to some requests on my blog and MxLoader support forum.

Starting from Maximo 7.1.1.6 it is possible to import attachments to an object through MIF using Base64 encoding.
MxLoader has the capability to read files from the filesystem, encode them in Base64 and upload them on Maximo. This can be done on any Maximo object that supports attachments but the integration object structure has to be modified to include the DOCLINK object.

In this example the MYASSET object structure has been created with the DOCLINKS child object.



To specify a file to be uploaded you have to prefix the full path of the file with the ‘file:///’ string. Look at the screenshot below for an example of how to add two attachments to an asset.

Maximo Work Center Performance

Question

How can I improve the performance of the Work Centers introduced in Maximo Version 7.6.0.5?

Answer

Starting with Maximo 7.6.0.5, new Work Centers display role-based activities in an innovative, responsive User Interface.
To improve the load time of the content within the various work centers and containers, insert the following indexes in your database utilizing Maximo's Database Configuration application. If you do not add the indexes in the Database Configuration application, Maximo will not recognize the indexes, and will not re-add the indexes if the table needs to be created.

Note: The index names are suggested values. Update them to meet your unique business and identification requirements.

For DB2 Databases
CREATE INDEX "MAXIMO"."WORKORDER_WC_NDX01" ON "MAXIMO"."WORKORDER" ( "STATUS" ASC, "HISTORYFLAG" ASC, "ISTASK" ASC, "WORKORDERID" ASC, "SUPERVISOR" ASC ) ALLOW REVERSE SCANS COLLECT STATISTICS;

CREATE INDEX "MAXIMO"."WORKORDER_WC_NDX02" ON "MAXIMO"."WORKORDER" ( "STATUS" ASC, "WOCLASS" ASC, "ISTASK" ASC, "WORKORDERID" ASC, "SITEID" ASC ) ALLOW REVERSE SCANS COLLECT STATISTICS;

CREATE INDEX "MAXIMO"."WORKORDER_WC_NDX03" ON "MAXIMO"."WORKORDER" ( "STATUS" ASC, "HISTORYFLAG" ASC, "ISTASK" ASC, "WORKORDERID" ASC, "WORKTYPE" ASC ) ALLOW REVERSE SCANS COLLECT STATISTICS;

CREATE INDEX "MAXIMO"." PO_WC_NDX01" ON "MAXIMO"."PO" ( "REQUIREDDATE" ASC, "VENDOR" ASC, "STATUS" ASC ) ALLOW REVERSE SCANS COLLECT STATISTICS;

CREATE INDEX "MAXIMO"."MAXINTOBJECT_WC_NDX01" ON "MAXIMO"."MAXINTOBJECT" ( "USEWITH" ASC, "DESCRIPTION" ASC) ALLOW REVERSE SCANS COLLECT STATISTICS;

For Oracle and Sql Server Databases
CREATE INDEX "MAXIMO"."WORKORDER_WC_NDX01" ON "MAXIMO"."WORKORDER" ( "STATUS" ASC, "HISTORYFLAG" ASC, "ISTASK" ASC, "WORKORDERID" ASC, "SUPERVISOR" ASC );

CREATE INDEX "MAXIMO"."WORKORDER_WC_NDX02" ON "MAXIMO"."WORKORDER" ( "STATUS" ASC, "WOCLASS" ASC, "ISTASK" ASC, "WORKORDERID" ASC, "SITEID" ASC );

CREATE INDEX "MAXIMO"." WORKORDER_WC_NDX03" ON "MAXIMO"."WORKORDER" ( "STATUS" ASC, "HISTORYFLAG" ASC, "ISTASK" ASC, "WORKORDERID" ASC, "WORKTYPE" ASC );

CREATE INDEX "MAXIMO"."PO_WC_NDX01" ON "MAXIMO"."PO" ( "REQUIREDDATE" ASC, "VENDOR" ASC, "STATUS" ASC );

CREATE INDEX "MAXIMO"."MAXINTOBJECT_WC_NDX01" ON "MAXIMO"."MAXINTOBJECT" ( "USEWITH" ASC, "DESCRIPTION" ASC);


For additional details on the new Maximo Work Centers, access this page

Collecting Data: Maximo Work Centers

Problem(Abstract)

Collecting data for Maximo Work Center's. Gathering this information before calling IBM support will help you with the troubleshooting process and save time analyzing the data.
You may need to review General information, Please see General Collecting Data document 1313647 and include that information.

Resolving the problem

a. Check the exact version information of Maximo, Integration Framework, Work Centers installed in your environment. Please include a snapshot of the System information similar to the one below:

    b. The System Information should include the App Server and database.


1. Verify the following Maximo properties:
-  mxe.oslc.restwebappurl - http://<ipaddress>:<port>/maxrest/oslc
-  mxe.oslc.webappurl - http://<ipaddress>:<port>/maximo/oslc/
-  weatherapi.apikey - Does a valid weather api key exist

2. Verify the Object Structures used in Work Centers.

      Verify the following Object Structure Authorization Names:

          - MXAPIWODETAIL-                                            - MXAPIASSIGNMENT -
Authorization Name: MXAPIWODETAIL              Authorization Name: MXAPIASSIGNMENT

- MXAPIKPIMAIN -                                             - MXAPIWMASSIGNMENT -
    Authorization Name: MXAPIKPIMAIN                      Authorization Name: MXAPIWMASSIGNMENT


- MXAPILABOR -                                                    - MXAPIPERUSER -
      Authorization Name: MXAPILABOR                           Authorization Name:  MXAPIPERUSER

For the following Work Centers, verify the following access permissions are set on the specified Object Structures:




 3. Weather
    •  weatherapi.apikey - Does a valid weather api key exist in System Properties?
    • What is the City, State, Postal Code / Zipcode, Country defined for the person attempting to login to the Work Center?

4. Which device are you using to access the work center?
     - Mobile Device: Android / iOS / Windows - Which browser/version on device?
     - Desktop: MAC/PC and which browser and version?

5. Check the Network and console tabs within the browsers development tool and check to see if any errors obviously appear. If so, please attach.

6.  KPI CronTask
     - Verify "KPICronTask" is Active and has a frequency defined.

7. KPI Manager
   - Verify each user has their own KPI's defined:  
Example:    'KPINAME'+<USERID>

8. In the Security Groups application, what is the Work Center defined for the group your user is attempting to access?

9. Does your user belong to multiple Security Groups that contain Work Centers?

10. In the KPIManager application do you have the following KPI's defined for your user you are logging in with?
    Supervisor Work Center
    - EMWOSUP<userid>
    - PMPERFSUP<userid>
    - PMWOSUP<userid>

    Technician Work Center
    - AVGEMCOMPTIME<userid>
    - WOOVERDUE<userid>

* Verify the where clause for each KPI has the userid defined as the value for the laborcode.

11. Were there any errors in the Maximo system log? If so, please attach the log.

Business Analyst Work Center 

1. Is there a registered Watson account (and is it a free or pro account) with a callback uri set to the Maximo WATSONOAUTH endpoint?

2. Is the client id/secret from the Watson account above set in the WATSONOAUTH endpoint?

3. Does the user exporting a dataset have their own Watson account?

4. Is the api_file cron task enabled?  If so, what is its schedule set to?  When was it last run? 

Giving users access to the Service Request Work Center and Data Set Designer in Maximo Asset Management 7.6.0.6


Problem(Abstract)

The object structure requirements for the Service Request Work Center and the Data Set Designer were documented incorrectly for Maximo Asset Management 7.6.0.6.

Resolving the problem

The following website provides details on how to give users access to Work Centers and the Data Set Designer:
In addition to the object structures listed for the Service Request Work Center, the following object structures are required: MXNOTIFICATION, MXAPILOCATION, MXAPILOCANCESTOR, MXAPIASSET, and MXAPIPERUSER.
The complete list of object structures for the Service Request work center is:
MXAPISR (Read, Save, Delete, Insert)
MXAPIWORKLOG (Read, Save)
MXAPIBOOKMARK (Read, Delete)
MXAPITKCLASS (Read)
MXAPITKTEMPLATE (Read)
MXAPIPERUSER (Read)
MXNOTIFICATION (Read, Save)
MXAPILOCATION (Read)
MXAPILOCANCESTOR (Read)
MXAPIASSET (Read)
In addition to the object structures listed for the Data Set Designer, the MXAPIENDPOINT object structure is required with read access. Additionally, the MXAPIANALYTICDATASET object structure requires read, save, change status, and delete access.

IBM Readme for IBM Maximo Asset Management 7.6.1.3 Fix Pack

  Fix Readme Abstract This fix pack updates IBM® Maximo® Asset Management version 7.6.1, 7.6.1.1, and 7.6.1.2 Content IBM Maximo Asset Manag...