Tuesday, January 1, 2013

Bind Variables in Maximo

There are many bind variables that are not resolved using attributes. They can be used in the Maximo expressions.

https://www.ibm.com/developerworks/mydeveloperworks/blogs/a9ba1efe-b731-4317-9724-a181d6155e3a/entry/special_kind_of_maximo_bind_variables13?lang=en

Override Password Expiration in Maximo


We may require to set password expiration date for users, who work in a project with different roles such as developer, admin, contractors etc in a short duration of time.

By default, the password may expire in 1 day.  It will be an inconvenience to Users.

This link tells us how to set Password Expiration date for Users in Security group in Maximo.
http://www-01.ibm.com/support/docview.wss?uid=swg21384652

Manage Sessions Functionality

MIF Data Loading Practices

1. Flat File Data Load with AUTOKEY fields:

     MIF framework is XML based, so when loading flat file MIF converts it to hierarchical XML structure. For this conversion, key fields should be provided to properly form the XML. 
 
    So, even if we plan to use the auto numbering for any mandatory field (like ASSETNUM), the input flat file must contain some dummy unique asset number for each row to pass the Flat to XML conversion. 

 
    Then to restrict the load process from using the dummy value in the file (instead of autokey), the key field ASSETNUM needs to be configured as Set Restricted. 


    The Set Restriction can be defined at the object level (within DB configure using the Restrict Attributes select action) or within the object structure (via the object structure application using the Inbound Setting Restrictions select action). This change will impact all integration scenarios.

    For XML Data Load, we should not provide the Auto key field (like ASSETNUM) in the input XML file.

2. Impact of Attribute numbers in Data Loading

       Suppose, if we have State and Region fields in the Maximo Application. When Users select a value in the State field, based on this value, the region data are populated. This works fine from front end.

       If we need to upload the same data through MIF, then there may be a chance MIF will load Region value first, before setting State field. It will led to error or incorrect entry.

       MIF loads the data columns in the order of their "Attribute #" in the Database Configuration. To avoid this scenario to occur, provide a lesser Attribute no. to State field than Region in the Database configuration.


https://goo.gl/7O1sL2

Report Design Considerations

A few list of points that can be considered while designing reports:

1. Use database independent SQL whenever possible.

 
2. Use ANSI SQL join syntax (left outer, right outer) in the report design.

 
3. Use ANSI functions such as CASE and COALESCE instead of proprietary functions such as DECODE and ISNULL. 

 
4. Reference all database objects in lower case.

 
5. The "not in" cost more than "in" in DB. So, prefer "in".

 
6. Include no more than 12 fields in a grouped section. One way to resolve a report with a large number of fields is through hidden fields. Hidden fields don't display in the browser, but users can choose to view the hidden fields when they download (Export data) it as a .csv file. Out of box with this option is "Asset List" (asset.rptdesign).

Alternate table row coloring in BIRT

Clients may require to have alternate colors for table rows in the report. 
This can be achieved by a configuration in BIRT tool.

1.      Open the Report design file in the BIRT for which you need to add alternate row coloring. The Report preview looks like the below screen.

2..    Navigate to Layout tab, Select the table from the outline view.


3..    The on the properties editor, click the Highlight tab. 


4.   Click Add.You will see three drop downs. Just type “row.__rownum % 2” in the first drop down. Select the “Not Equal to” from the second and then type 0 in the third.

            We can also modify the color pattern by this condition “row.__rownum % 2 – Equal to – 0”



5. Then you set the background color of the row to whatever color you want. In this case, silver color is used.


6.    Now, we can preview the report after the row coloring is done.

Deploy RMIREG.war for Clustered Maximo

The below articles from IBM recommends Maximo 7 clustered environments to deploy RMIREG.WAR file as a separate server to create the rmi registry independent of any Maximo servers that
remains in a running status, regardless of any one of cluster member server.
It ll prevent loss of RMI communications if the application cluster  members fail to start.

To generate the RMIREG.war file, modify these properties ( mxe.registry.port, mxe.name,mxe.hostname,mxe.rmi.port) in the maximo.properties file.
Then, run \ibm\smp\maximo\deployment\buildrmiregwar.cmd to build the war file in this path \ibm\smp\maximo\deployment\default\rmireg.war.

Please refer the below links to study more on how Maximo RMI works, deploy rmireg.war file using Websphere and Weblogic

Maximo Implementation of Java RMI:
https://www-304.ibm.com/support/docview.wss?uid=swg21262022
Deploying RMI registry in Websphere 7:
http://www-01.ibm.com/support/docview.wss?uid=swg21598724&myns=swgtiv&mynp=OCSSLKT6&mync=R
Deploying RMI registry in Weblogic 9.2:
http://www-01.ibm.com/support/docview.wss?uid=swg21451075

webclient.maxdownloadrows

Setting a limit to the number of records that can be downloaded to Excel from the List tab of any application.


By default, it's value is -1 and allows Users to download all records from a table in the list tab. 
To have better server's response to Users, we can set this value (say for example between 200-500), so that we would avoid memory issues.

If User want to download more records than this limit, the reports can be used.


Maximo 6: http://www-01.ibm.com/support/docview.wss?uid=swg21397369

Scripting: Workflow Action

Scripting allows us to replace some of the present Java customization. It reduces system downtime across the environment.

It can be launched on the points as below:
i) Object LP(Launch Point) --> Based on condition and common MBO events [init, add, update or delete].
ii) Attribute LP --> Field validations (Scripting does not support getList() and action() functionality of Field validation class)
iii) Action LP --> Workflow/Escalation actions
iv) Custom Custom LP --> Workflow custom conditions and conditional expressions can be enabled.


Step1:
Create an automation script by clicking on Select Action à Create à Script with Action Launch Point

-----------------------------------------------------------------------------------------------------------
from psdi.server import MXServer
mbo.changeStatus('ACTIVE',True,MXServer.getMXServer().getDate(),'Test script',11L)
-----------------------------------------------------------------------------------------------------------


Note: IN or OUT variables not required for this purpose.



Step 2:
Action of type custom class will get created automatically from Script application.
Value: com.ibm.tivoli.script.ScriptAction
Parameter/Attribute:  SCRIPT Name, Launch Point Name, Action name itself

Don’t change these values, it comes out by default.


Step 3:
A WF with a condition [status <> ‘ACTION’] and action attached in its positive line to change Item status and roll new status to Org/Inventory.




By this scripting action, Status is changed and rolled to Organization & Inventory.



Can update POLINE_NOHIST relationship

We have an out of box relationship POLINE_NOHIST between ITEM and POLINE Objects. This relationship is used to display POs in the Purchasing tab of "View Item Availability" section in Inventory application.
By this option, we can view POs that are waiting for receiving the items.


In future, if POs of single Org and different sites have same PONUM. One with status of CLOSED and other with WAPPR. There is a risk of Maximo picking CLOSED POs of other site in the Purchasing tab.
This problem occurred in Maximo 6 environment of my project.

Current where clause in MX 7.5
-------------------------------------------------------------------------------------
itemnum = :itemnum and exists (select 1 from po where po.ponum=poline.ponum and po.revisionnum=poline.revisionnum and po.historyflag = :no) and itemsetid = :itemsetid
-------------------------------------------------------------------------------------

Can be changed to
--------------------------------------------------------------------------------------
itemnum = :itemnum and exists (select 1 from po where po.ponum=poline.ponum and po.revisionnum=poline.revisionnum and po.historyflag = :no and po.orgid = poline.orgid and po.siteid = poline.siteid) and itemsetid = :itemsetid
---------------------------------------------------------------------------------------

Asset Move/Modify need GL Acct access 7.5

In Maximo 7.5, some Users may face problem in moving assets using Move\Modify select Action in Assets application.

It is because in Maximo 7.5 the user must have access to GL Account to move/modify an asset. 
Access to GL Components in Security Group will resolve the problem. Explained in detail in reference.

http://www-01.ibm.com/support/docview.wss?uid=swg21592994

Installation Issues in Windows 2008 server R2

We do face some common issue in installing Maximo product in servers. I list a couple of issues that we may encounter while installing Websphere in WIndows 2008 server.

1. When you double click on an install,exe file of plugins to run Installation Wizard, it throws an error in a pop up window







To resolve the problem, Right click --> Properties on the install.exe. Click on Compatibility tab and choose "WIndows Server 2008" from the drop down.


http://www-01.ibm.com/support/docview.wss?uid=swg21408390

2. Running configurewebserver1.bat to configure HTTP Server Plugins with Websphere gives error, java.io.FileNotFoundException: C:\IBM\tivoli\tip1\profiles\TIPProfile\logs\wsadmin.valout (Access is denied.).
To resolve the problem, Go TO --> Run --> secpol.msc. Navigate to Expand Security Settings->Local Policies. we need to disable some of the User Security Local policies as it is given in the link.







http://www-01.ibm.com/support/docview.wss?uid=swg21495697

Measure Point cron task


We can create automatically Workorders from Condition Monitoring application using Cron tasks similar to PM workorders and reordering inventory items on a schedule.

Condition Monitoring application is present in the Assets Module.
 It is used to define unlimited number of measurement points for assets, and specify alarm limits and associated work to be performed after reaching those limits. 
You can enter and view measurement point records to define acceptable meter readings for a characteristic or gauge type of meter on an asset or location. 


 

PM WOGEN cron task by Site


In almost all projects, we use automatic Work order generation from PM. 

In a system with multiple Organisations, there will be a need to generate automatic PM workorders for a specific sites like production plant, and other sites where work types of preventive maintenance is not applicable can create work orders manually.

This link explains a step by step approach of creating cron task instances for sites with Run as Users having access to these sites.

Pretty Print XML Option


Pretty Print is an option for XML to easily edit the XML field generated from the application.

End Point application [Go To --> Integration --> End Point] is used to set the Pretty Print XML option.






The MXXMLFILE end point has two properties: FILEDIR and PRETTYPRINT.
The PRETTYPRINT option default is 0 (false). By default, the XML is generated as one string, which is more efficient.






To facilitate editing the XML file by displaying it in order, set the option to true (1).


 
Maximo 7.1 Integration Framework Configuration Basics.pdf

Disable manual status change for records in WF

In some cases, we may require to restrict Users to change record status only through Work flow.

In the Work flow process design, there are some custom class actions OKSTATUS and NOSTATUS.

To block the manual status, include the NOSTATUS action in the workflow process design. This lock will be in effect until the opposite action OKSTATUS is called or the process stops.


Add a new line in mail use br tag instead of \n


In many cases, we may intend to email Users via from Maximo customization 
[MXServer.sendEMail(String to, String from, String subject, String message)].

While simple formatting the message body with StringBuilder, we usually start with \n new line character to add a new line as below:

StringBuilder strbuild = new StringBuilder("PO: ").append(ponum).append("\n").append(podescription).append("\n").append(poline).append("\n").append(polinedescription);

but we will find the mail message comes out as one line.

It is because, if the email format is HTML, new line characters will be ignored and we need to insert HTML line breaks <br />. For example:
StringBuilder strbuild = new StringBuilder("PO: ")).append(ponum).append("<br /> \n").append(podescription).append("<br /> \n").append(poline).append("<br /> \n").append(polinedescription);

In this, <br /> inserts new line and \n will be ignored.

Stopping multiple records in Workflow at Once:


Maximo 7.5 has a class file to stop Workflow on many records at one time. 

The StopWorkflowAction.class file is located in the \maximo\applications\maximo\businessobjects\classes\psdi\workflow folder.

To use it we first need to create an Action and then run it with an Escalation.

The Class file will change the Active Inbox Assignments to Assignstatus | Inactive| which will remove them from the Workflow Inbox and will add a transaction to WFTransaction table saying that the Workflow process was stopped.

REST API in Maximo


Customers have varying options on how they integrate other applications with their Maximo system.  Some common choices include SOAP-based web services and XML files.  The Integration Framework (i.e. MIF or MEA) provides a new option available, starting in Base Services 7.5.0.1, to customers to access Maximo data in a RESTful manner.

I came across interesting article on usage of REST API in Maximo 7.5.0.1 Sharing with you all, in case interested.

Here is a collection of useful resources to learn how to use REST API in Maximo.

https://www.ibm.com/developerworks/mydeveloperworks/blogs/a9ba1efe-b731-4317-9724-a181d6155e3a/entry/resting_with_maximo1?lang=en

http://pic.dhe.ibm.com/infocenter/tivihelp/v49r1/index.jsp?topic=%2Fcom.ibm.mbs.doc%2Fgp_intfrmwk%2Frest_api%2Fc_rest_overview.html

https://www.ibm.com/developerworks/mydeveloperworks/blogs/a9ba1efe-b731-4317-9724-a181d6155e3a/entry/using_rest_api_details2?lang=en