Wednesday, September 2, 2020

MIF Data lmport using FLATFILECONSUMER cron task

FLATFILECONSUMER cron task is used to load flat files without any application user intervention.

Cron task parameters

SOURCEDIRECTORY - directory in which the flat files are placed. for example "c:\mifdataloadfiles\"  or "/dataloaddirs/inputfiles/" or "./SharedPath/inputfiles/"

DELIMITER - mandatory field, comma (,) is default value. It is delimiter for flat file to be loaded.

TEXTQUALIFIER - character used to mark a text in the flat file. default value - " ( double quotes)

TARGETENENABLED - default is false. Use the donotrun parameter in the cron task framework to control which servers the cron task runs on.

ISFILEEXTRACT - true or false. true indicates file-based error management for inbound message processing.


USEREXITCLASS - A custom processing class value to perform more options for inbound records. We can't achieve it using automation scripting. An example of setting file order by name is implemented below:
Courtesy: Yasutaka Nishimura




Server Side folder structure - The folders will be created automatically by the crontask.

Server Side - after execution

Cron task processing rules: 
1. File processing order - By default, the files are processed in Maximo by the XML file stamp or created date of the file in the source directory. The order can be changed by crontask custom user exit processing logic.

2. Multi Noun Files are split by cron task using MIF enterprise service key columns before they are written to the queue.
<MXPERSON>
  <MXPERSONSET>
    <PERSON>
    .
    .
      <SMS>
      </SMS>
    </PERSON>
    <PERSON>
    .
    .
      <SMS>
      </SMS>
    </PERSON>
  </MXPERSONSET>
</MXPERSON>

3. Cron task identifies the queue in which the flat file is loaded. The location is based on the queue specified at the external system and Enterprise Service level.

4. Cron task creates an index file (recovery_filename.txt) that contains a reference to the last successfully processed noun when you process a multi-noun file. The entry in the index file is updated when the noun is successfully committed to the queue. Index files are available in the RECOVERY folder which is created in the cron task source directory. 

5. FLATFILECONSUMER cron task uses the index file name to identify the file that was processed before the server or queue problem was encountered. The cron task continues to process the XML file starting at the last successfully committed noun in the index file. Errors that are identified after a message is successfully written to an inbound queue must be resolved in the Message Reprocessing application.

References:

Saturday, August 1, 2020

Maximo Preventive Maintenance (PM) Lead Time vs Alert Lead

Lead Time (Days) in a PM

The number of days in advance of the Next Due Date that Maximo generates work orders from this PM. The target start date for the work order will still be the Next Due Date.

You must Select the Lead Time Active checkbox before you can enter or edit data in this field.

Usually, this field value will be zero. If you set any positive value, it will affect the generation of WO. pm_lead_time.html

PM Alert Lead

In the PM application, there is an 'Alert Lead Days' field which can be used to Alert users when a work order is due ahead of time. 

Alert is when you create a WO from methods other than PM for same asset, it will alert you by a warning message that a PM is due for this Asset. 

In order to enable this option, we need a system admin level setting in Organizations application -> Select Action -> PM Options. 

Generate PM Alerts for Assets When Corrective Maintenance WO Status field can have status value of WO to alert users.

Steps to enable Alert and usage is explained in this link:preventive-maintenance-alerts


Tuesday, May 26, 2020

XSL Transformation in Maximo Integration Framework MIF

Maximo framework uses XSL Map option to transform the outbound or inbound XMLs in Maximo.

Scenario: Rename tags from Maximo to External system
XSL file has a logic to rename tags in Maximo.renametag_removeallnamespaces.xsl

Scenario: Delete default namespace
By default, the transformed XML will have namespace linked to each tag. In order to remove them, we need to use a parameter exclude-result-prefixes in stylesheet tag.

The default namespace (without any prefix) can't be removed by a prefix. We need to add a snippet in the XSL file. ibm-linkto-remove-namespace-and-its-prefixes-xml-file-using-xslt

Scenario: Remove mandatory attribute to external system
In Maximo, we can't exclude a few mandatory attributes for an object, for example, revisionnum in PO object. In such cases, we can remove them using XSL before reaching to external system.deletetag.xsl

XSL files can be placed in common Integration directory mxe.int.globaldir and refer it in Integration applications.

If we modify a xsl file, Maximo needs restart of application servers. In order to avoid downtime, please create a new file with same name + version number. 


Saturday, October 12, 2019

Migration of Start Centers by MIF Data Import

Migration of start centers from one environment to another can also be performed using MIF data load.  It's some what easier than using a migration manager application.

If you have any requirement to modify/update KPI/Result Set on your Start Center, we can perform it on the XML available in SCTEMPLATE table.

Start Centers are stored in SCTEMPLATE.PRESENTATION (table.column) like an application xml.

A simple change in XML file and a MIF data load (Object Structure -> Enterprise Service -> External System) takes a few secs to migrate/configure them.

A few replace rules for the presentation tag - replace < as &lt; ; > as &gt;. " as &quot; and & as &amp; to align the content in XML file.

Reference file:
https://gitlab.com/bysurendar/maximo/blob/master/templates/sctemplate_dataload.xml

We can do the same action using MxLoader, but if the file content is large, it can't be stored in a single cell due to excel limitation.

Sunday, August 4, 2019

Setting No focus on any field in a dialog

Maximo doesn't have an option to set cursor on a particular field in a dialog or container. 

The first editable field on a dialog would get the focus by default. If you want any field to be selected or focused, we need to make it as the first editable field in the dialog.

Asset Application XML : With Focus on first field


But, if in case there is a requirement - NOT to have focus on any of the fields on a dialog.

It can be done by not having this property [default="true"] set on any of the dialog buttons. 
By this way, the dialog will be displayed with out any fields selected, Users need to make a selection by themselves.

Without any focus