Custom XI Resource Adapter for MDM 5.5

SAP AG offers to use SAP XI with a File Adapter and MDM Import Server to communicate between a business system and MDM repository. This solution has many glitches and quite slow.

MDM Resource Adapter developed by myself puts data from XML-messages to repository directly with MDM Java API.

Adapter Metadata

Create Adapter Metadata - XML-file which describes a GUI-form for the adapter configuration (sample).
It has following fields of parameters:

Standard adapter properties
  1. Transport protocol
  2. Message protocol
Connect parameters for MDM Server
  1. Host name
  2. Host port
  3. Name of repository
  4. Region label in MDM format (like 'English [US]')
Security parameters for MDM Server
  1. User's name
  2. Password
Response parameters
  1. Name of Outbound interface
  2. Namespace of Outbound interface
  3. Switcher which defines to send or not confirmation about result OK

Upload the Adapter Metadata file to XI Repository (Design):

Data Types

There are two special types of XML-messages for MDM adapter.
  1. First of them is the Request message and it contains:

    • Root element Table.
        system- code of remote system
        name- name of table in MDM repository
        workflow- after creation of record, new job for this record will be created in named workflow
        key- this key will be mapped with a new record for the source system. If not defined, key is current time in milliseconds with a negative sign ("fake key" just to reference the new record with the source system. If this record will be updated by the same remote system with a new key without negative sign, the "fake key" removing)
    • Multiple elements Map. Data in this tag are not processed by adapter. This values pass throw adapter and returned in it's response. May be needing to feedback routing.
        name- key of variable
        tag body- value of variable
    • Multiple elements Field. May contain tags Key, Value, Attribute.
        name- field's name (code)
        action- what doing if the lookup key is not found ("break" (default), "create", "ignore")
    • Single element Key. Parent element - Field. Includes Value like element Field. Using for a search of related record in the lookup table.
        name- lookup table field's name (code)
        action- what doing if the lookup key is not found ("break" (default), "create", "ignore")
        lookup- if the key field of a referenced qualified lookup table also is a lookup field, this attribute has code of key field in the second-level lookup table.
    • Multiple elements Attribute. Parent element - Field. Contains element Value. Qualifier value or taxonomy attribute value.
        name- attribute/qualifier's name (code)
    • Single element Criteries. Includes elements Field or one tag SearchKey. Using to update of unique existing record. If the adapter found many of records it throws an exception.
    • Single element SearchKey. Parent element - Criteries. By this key (only if it is default key for current remote system) the adapter finds record to update. Do not use with elements Field in the tag Criteria.

  2. Second message type is the Response. This message is automatically generated by the adapter and may be used to send notification to author of request.

    • Multiple elements Map. The adapter returns these values as they were mapped in the Request. May be needing to feedback routing. For example: author, email, number of request, etc.
        name- key of variable
        tag body- value of variable
    • Single simple element System. Remote system identifier.
    • Single simple element Code. Numeric code of the adapter result. In the case of unsuccessful processing the code is negative. For successful insert the code is 1, successful update - 2.
    • Single simple element Message. Text description of the adapter result.
    • Single simple element Record. Contains RecordId if the processing was finished successfully.

Message Types

Based on data types MDMRequest and MDMResponse

Message interfaces

Inbound interface MI_Request_In
Outbound interface MI_Responce_Out and inbound - MI_Responce_In

Data mapping programm

Upload two XSLT-mapping templates, for Request and Responce messages.

Interface mapping

MDM Communication Channel

In the Integration Directory was created new channel based on MDM Adapter