Jun 30, 2016

MEC: Change out file name dynamically

Background

Manipulating the out file name generated by the middle ware is a common scenario. By default file names are generated with a GUID (13a7a838-a706-4273-b190-9d58a79bf04e). It is more practical if the file name is human readable.

Solution

  1. In the Mapper add User function to change the file name. (Note: this function should the last function in the map)
    image
  2. Add similar code to the function. This code set file name to the manifest information of the map.
    1
    2
    3
    4
    5
    6
    String date = new java.text.SimpleDateFormat("yyMMdd").format(new java.util.GregorianCalendar().getTime());
    String time = new java.text.SimpleDateFormat("HHmmss").format(new java.util.GregorianCalendar().getTime());
    
    String fileName  = "EDI_832_OUT_"+ date+time;
    
    setManifestInfo("map:FileName", fileName);
    
  3. Then, configure the relevant Send (in partner agreement) object to take the given file name.
    image
  4. And you are done. !!!

Jun 5, 2016

Development with MEC older version

Presently I’m working with a MEC older version (Ver 9.1).

This version is not part of an Eclipse plugin. It’s a standalone application that use for MEC mapper development. Very tedious to work with.

MEC Mapper different than the Eclipse version. But Flat file definition tool, it’s manager & the partner agreement tool looks the same.

Mapping manger looks like this.

Mapping Manger

  1. Load button to retrieve all the existing mappings.
  2. New button to create a new one
  3. Generate & Publish buttons to compile the map & deploy to the server
  4. Import & export button: Once you create a map, you cannot change it. Instead, import existing version and export with a new changes and new version number

Mapper looks like this.

Mapper

  1. Mapping flow is organized in “tree-view” like structure.
  2. You can generate the map from this screen. But to publish you have to close this and go back to Mapping manger & publish.
  3. Two options to save (to DB & to File)
  4. Validate map option also available on this screen.

MEC: How to Set Message Counter for EDI Message

When you sending/creating EDI messages it is necessary to include unique message interchange number. This is to ensure each message that we ...