Saturday, May 10, 2008

3).Integration Builder (Repository) Overview

The Integration Builder is a central java-based tool that contains the Integration Repository and the Integration Directory. Within this chapter we will focus on the Repository and its makeup. Here, the design time work for interface creation is done defining and associating the message structure, defining mappings, and allocating these to business scenarios. Downstream during configuration time the Directory will utilize the objects created within the Repository.


The Repository is made of the following main components:



1. Interface Objects


2. Mapping Objects


3.Business Scenarios and Processes


4. Adapter Objects


Some basic features of the Repository:


Versioning
• Handles all versions of a software component in one system
• Version history maintained for different versions of an object
• Documentation maintainable for all objects listed above
• Usability
• Drag and Drop between objects in a navigation tree and fields of content frame (message mapping)
• Dock and Undock of windows
• Object History



Getting Started: Adding Software Components to the Repository:

A number of items in the Repository are built on objects built earlier in the SLD. At the very top of the navigation tree are Software Components followed by Software Component Versions (SWCV). Development objects in the Repository must be associated under a Software Component / Version (as well as namespace) in order to be created. Here are the steps to Import these items from the SLD:


1. Navigate to the Repository and select menu items Tools -> Transfer from System Landscape Directory -> Import Software Component Versions
2. Select the Software Component and ‘Import’
3. These Software Components will now appear in the navigation tree
4. Navigate to and double click the SWCV
5. Select whether this SWCV allows import of RFC / IDoc Interfaces (structure metadata from SAP)
6. Enter the ‘Connection Data for Import from SAP System’ and ‘Save’ The System field refers to Business Systems maintained in the SLD. To determine Group, access the normal SAP logon for this system, choose groups, enter the system ID and message server, and ‘Create List’

7. (Optional) Update the Object Attributes to indicate if objects located here are original or modifiable (useful for turning off in a QA or Prod environment)

: Adding Namespaces

In the Adding Software Component we discussed adding a Software Component and SWCV into the Repository. A further distinction under the SWCV is the Namespace. Namespaces are essentially logical areas for categorization of development. These are free-form and can be used in a number of ways, with anything from conventions similar to SAP Development Classes to landscape environments (Simulation, Development, Quality Assurance, and Production). To create a new Namespace follow these steps:


1. Navigate to the Repository and highlight the SWCV and right click. Select ‘Namespace’
2. In the bottom Namespaces section press the green ‘+’ to add a line and enter the Namespaces. Select ‘Save’ when done
• Namespaces in the Repository are NOT related to namespaces in the SLD
• A SWCV can have many namespaces associated to it
• Once a Namespace is defined, XI Automatically creates the Business Scenario,
Interface Object, Mapping Object, Adapter Object, and Imported Object folders automatically!
• Follow the Namespace Conventions link for more detail

Interface Objects

Interface Objects are the low level building blocks of interfaces. As seen in the Roadmap, the primary building blocks are Data Types, Message Types, and Message Interfaces.
The creation and relationship between these building blocks defines the various message structures and the message interfaces they are associated to.

Data Types

Data Types are the field element structure of a message. In the case of an IDoc or RFC, these can be imported directly from a SAP system and do not need to be created manually. Another alternative is to ‘Import’ the structure from a XSD (Use the Tools -> Import XSD from the Data Type sub-window). Lastly is to create the data type by hand.

To create a Data Type, follow these steps:


1. Traverse the navigation tree within the Repository down to the Data Type object under the proper Namespace / Software Component
2. Highlight the Data Type row and right click. Select ‘New’
3. Enter the Data Type name, description, and ‘Create’
4. Use the green ‘+’ buttons to add elements and sub-elements. Note the Category column reflects hierarchy
a. Provide a name to the element
b. (Optional) Assign a type (string, integer, etc). If assigned it is assumed this is a data element level
c. (Optional) Determine a min and max occurs for the element
d. (Optional) Associate any Details (length, minimum length, pattern, white Space, etc). These are referred to as ‘Facets’
e. (Optional) Assign a Default value
f. (Optional) Add a Description5. (Optional) Click the XSD tab to view the Data Type in XSD representation
6. Repeat as needed and ‘Save’ when done


Data Types can be created then referenced in other Data Types as ‘nested’ objects within the same SWCV. Simply select them under “Search Help” under the “Type” drop down menu on the Data Type creation screen

Message Types

Message Types are assigned to a single Data Type and function similar to a Message Type -> Idoc Type relationship in SAP i.e. a business usage of the lower level data structure. It is not directional specific and can be associated to numerous MessageInterfaces for inbound and outbound messages

To create a Message Type follow these steps:

1. Traverse the navigation tree within the Repository down to the Message Type object under the proper Namespace / Software Component
2. Highlight the Message Type row and right click. Select ‘New’
3. Enter the Message Type name, description, and ‘Create’
4. In the Data Type Used section, associate the Data Type either via drop down, copy/insert, or drag and drop
5. (Optional) Click the XSD tab to view the Message Type in XSD representation
6. Repeat as needed and ‘Save’ when done
A Message Type is identified by a name and namespace. This becomes an root element tag in the XML of the message payload (more on this topic in the Runtime chapter).

Message Interfaces

Message Interfaces are XML based, platform independent descriptions of message transfer requirements. They consist of 0 to 1 inbound message types, 0 to 1 outbound message types, and 0 to many fault message types.

Message Interfaces can be created manually, or imported in the case of SAP interfaces
(RFC / IDOC). Once the Message Interface exists (in the case of non RFC / IDOC scenarios) it determines which proxy objects can be generated (Proxy Objects to be covered in a later chapter). Message Interfaces are used to describe the inbound / outbound messages routed through XI. A given message interface can be paired to another message interface, imported interface, or an interface configured by an adapter to define an overall inbound / outbound message flow.

To create a Message Interface follow these steps:

1. Traverse the navigation tree within the Repository down to the Message Interface object under the proper Namespace / Software Component
2. Highlight the Message Interface row and right click. Select ‘New’
3. Enter the Message Interface name, description, and ‘Create’
4. Enter the Message Interface Attributes
5. Associate the applicable message type(s) either via drop down, copy/insert, or drag and drop
The message types available (input, output and fault) relate to the configuration of the Attributes. Fault types can be optionally assigned to allow handling of application specific errors or persist them in monitoring.
6. (Optional) Click the WSDL tab to view the Message interface in WSDL representation
7. ‘Save’ when done

Optional Context Objects can be associated on the related tab on the Message Interface screen.

Mapping Objects

Mapping Objects are only required if the message structures for an outbound / inbound pairing are not identical and are built on top of the Interface Objects created / imported. As seen in the Roadmap, the primary building blocks are Message Mapping and Interface
Mapping. To this point we have simply defined the structure for messages and associated them to a various, unconnected message interfaces. These will now ‘coupled’ together to make a logical message exchange as well as to define how mappings are done between the input / output message structures.

Message Mapping

Message Mappings consist of two types of mappings:


1. Structure mappings: Transform entire message structures
2. Value Mapping: Transform values within messages
The same message could have numerous mappings created for it, to accommodate numerous transformation requirements for recipient system(s), and executed in parallel or serial as defined in the Interface Mapping. Message Mappings can be created in some of the following ways:
1. From the standard graphical mapping editor, which generates the underlying java code. This uses a queue based model for handling very large documents.
2. Imported external java mappings (no tool support in XI)
3. Imported external XSLT (Extensible Stylesheet Language Transformations) mapping (no tool support in XI)
4. ABAP mapping programs for parsing / rendering the XML
To create a Message Mapping, follow these steps:
1. Traverse the navigation tree within the Repository down to the Message Mapping object under the proper Namespace / Software Component
2. Highlight the Message Mapping row and right click. Select ‘New’
3. Enter the Message Mapping name, description, and ‘Create’
4. In the Structure Overview section, add both the Source and Target Message Type
either via drop down, copy/insert, drag and drop, or import
5. Associate the source / target fields as required per business requirements or field
color requirements by drag and drop or double clicking a source / target pair
6. (Optional) Assign functions between source / target fields for value mapping in the Data-Flow Editor by adding the function and connecting the source output / target input arrows to the small rectangles for input and output values on the function
7. (Optional) Click the Test tab to run a test XML message through your mapping.
8. Repeat as needed and ‘Save’ when done

Interface Mapping

Interface Mappings associate a Message Mapping to an outbound and inbound MessageInterface. This now begins to create the association needed for the Integration Directory to ultimately route an incoming message to the correct mapping and target system.

To create an Interface Mapping, follow these steps:

1. Traverse the navigation tree within the Repository down to the Interface Mapping object under the proper Namespace / Software Component
2. Highlight the Interface Mapping row and right click. Select ‘New’
3. In the Source Interface window select the source Message Interface, the related Namespace and SWCV via the drop downs The Namespace and SWCV will default when the Message Interface is chosen
4. Repeat the above in the Target Interface window for the target Message Interface
5. Press the ‘Read Interfaces’ button to automatically populate the Source and Target Message sections in the bottom Request / Response window and read their properties
6. Select the Mapping type (Message Mapping, java, XSL) and the Message Map and ‘Save’ Multiple Message maps can be associated in the Request window, and are executed against the incoming message in the sequence listed

7. If the Message Interfaces chosen are synchronous, a ‘Response’ tab will be visible next to the ‘Request’ tab on the bottom window. The preceding step of Message Map association would also need to be done for the response message in that case
8. (Optional) The ‘Test’ tab allow testing of the Message Mapping.