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: