M3 mappings

Custom M3 connection stages

Infor e-Commerce includes sets of custom pipeline stages designed to provide special application features and to facilitate M3 connectivity. Many of the M3 interactions required for the default interface features are implemented by these stages, which do not require the mapping files described in this chapter. Instead, they are hard-coded to use the appropriate API calls as needed. Configuration settings for these stages are made using the Application Properties tab of Infor e-Commerce Development Studio.

Although custom stages for Infor e-Commerce and for the M3 Connector for Infor e-Commerce are included with Infor e-Commerce Development Studio, these are described with the developer documentation for Infor e-Commerce. See the Infor e-Commerce Developers’s Guide for details about how to work with these stages.

The remainder of this section is dedicated to describing how to work with the configurable M3 connector stage.

The configurable M3 Connector stage

In addition to the custom M3 stages, which provide pre-designed functionality, Infor e-Commerce Development Studio includes a generic M3 connector stage, which is able to connect to any M3 API and to be configured with a mapping file, which enables you to map input and output parameters between M3 and the business object.

As with other types of data sources, when you use the M3 connector stage, you must establish mappings between each business object attributes and their sources. Calling M3 is somewhat similar to calling a stored procedure. You must name the transaction you want to run, submit the appropriate input values, receive values back and map these to business object attributes.

The Infor e-Commerce Development Studio does not offer a graphical interface for working with M3 mappings as it does for SQL mappings. You must therefore create and edit these mappings yourself the Eclipse IDE editor.

For details about where to save your mapping files and how to register them with your Infor e-Commerce application, see Managing M3 mappings.

The solution works with the following elements:

  • The M3 connector stage: This is a pipeline stage that can be added to a business object method pipeline.

  • The M3 data source description file: All data sources have a description file saved in the Working Folder for the project (in a sub-folder named "datasources"). The file is named after the data source (as defined in the application) and with a "dsc" extension. This file holds connection information for the M3 data source and also a list of mapping files (see below).

  • The M3 data model file: In addition to the data-source description file, each data source must have a data-model file. It is saved in the same folder as the data-source description file; it is given the same root name as the data source and a "mod" extension. This file holds details about each API that is in use for the application. The Infor e-Commerce Development Studio is able to download API descriptions into this file as required.

  • M3 mapping files: For each type of transaction you wish to make using the M3 connector stage, you must create a mapping file. These are saved in a sub-folder below the data sources folder. Each mapping file maps input parameters to the M3 API input string and maps values returned by M3 to the various business object attributes.

Infor e-Commerce includes sets of mapping files designed to support the default M3 interface scenario supported by each product.

M3 mapping files

Each of the mapping files conforms to the format illustrated in the example below, which shows the interface between the GetOrderPromise method of the business object MvxOrderPromise and the M3 API function GetOrderPromise.

For additional examples and help working with these files, please see the commented sample mapping files included with your Infor e-Commerce application.