When to use BPM
1.Control/Monitor the messages in XI
2. Collect/Merge the messages in XI
3. Split the messages in XI
4. To Multicast an Message
5. Send an Alert
The following scenario describes how to start with BPM.
Business Scenario: File to File communication through XI using BPM.
Overview: The purpose of this document is to implement an asynchronous interface between two Legacy Application via XI. As a result of this scenario, you will become familiar with basic sequence of steps to implement this scenario in XI using BPM.
Process Flow of the scenario is given below.
The following steps describes entire scenario.
1. Create Software Component version.
2. Create Namespace under above software component.
3. Create Data Type for both source structure as well as target structure. In my scenario I am considering source structure and target structure are same.
For example data type created is as follows.
4. Create Message Type based on data type created above. For E.g MT_File is created as below.
5. Create Message Interface
While creating message interface we need to create have 3 message interfaces.
Message Interface I: Outbound, Asynchronous: used in picking the file. E.g.; MI_FILE_to_BPM_OB is shown below.
Message Interface II:
As per the flow, we have created one outbound interface for file. This outbound interface should give data to Integration Process. But Integration Process will not understand outbound/inbound interfaces. It will only understand Abstract Interfaces. The Abstract Interface is nothing but any other interface but it does not have any direction.
So we need to create an Asynchronous, Abstract Interface of above message type.
For e.g. MI_FILE_to_BPM_ABS is created as below.
Message Interface III: Inbound, Asynchronous: used in receiving side. E.g. MI_FILE_to_BPM_IB is created as below.
6. Create Message Mapping
Create one-to-one message mapping as my source and target structure are same.
For e.g. MM_File_to_File is created as below.
7. Create Interface Mapping
Interface mapping is created based on outbound asynchronous interface and Abstract interface. Make sure that target interface should be Abstract Interface which is created in one of the above steps.
For e.g. IM_File_to_BPM is created as below.
8. Create Integration Process
As shown in below, create Integration Process. For e.g IP_File_to_File is created.
After clicking on New, give Integration Process name and click on Create button. It will take into following screen. Now it is ready to design integration process.
Step1: Create Container element
To process message in BPM, it is required to create Container Elements. Because it is not possible to use abstract interface directly. The Container elements are variables used in the BPM. It is declared during design time. At runtime, the container elements then contain the references to the relevant data.
Following screen shows that ReceiveMsg as Container Element of type Abstract interface.
Step2: Insert RECEIVE Step
To process messages, Integration Process should receive the messages. To do this insert RECEIVE step as shown below. It has its own properties.
In Properties Window, click help against Message as shown above. After clicking, you can see following screen that shows Interface Variable. Here it will show all the Container elements that are declared as Abstract Interface category. From this interface variable list choose appropriate interface that should refer to original message. Following screen shows the same.
Step 3: SEND Step
Once messages are received, BPM needs to send these messages. (As this is a simple scenario) If you want to collect messages, split messages you need to use Transformation step after the receive step that refers to N: 1 Interface Mapping or 1: N Interface Mapping created.
The following screen shows how to select messages for the Send Step.
Integration Directory: Configuration
1. Create Configuration Scenario.
2. Create Business System/Business Service.
In Business Service mention Inbound Interfaces and Outbound Interfaces as shown below. (I.e. created in the Repository). E.g. The Business Service BS_FILE_BPM is created.
3. Import the Integration Process
As Integration Process is used to hold messages in XI, it should receive the messages and should send the messages. So Integration Process itself acts as a Receiver Service and Sender Service.
After clicking on New in the following screen, you can create Integration Process in Directory by selecting Integration Process, which is created in the Repository. This step is to import the Integration Process as it acts as a Sender/Receiver Service.
4. Create Communication Channels
Both Sender and Receiver Communication Channels of adapter type FILE are created.
5. Create Receiver Determination/Interface Determination/Receiver Agreement
As per the flow diagram entire scenario will look like this.
So we need to create two Receiver Determinations. One Receiver Determination is used from Source to BPM and second one is used from BPM to Target.
The following screen shows First Receiver Determination where Sender Service is Business Service created for File interface and Receiver Service is used as Integration Process. Message Interface used here is outbound file interface.
In Interface Determination, interface mapping is mentioned. This interface mapping is created based on Outbound Message Interface and Abstract Message Interface.
As the receiver is Integration Process (BPM) no need of Receiver Agreement.
The following screen depicts the Receiver Determination, Interface Determination and Receiver Agreement.
While creating second Receiver Determination, make sure that Sender Service is Integration Process (i.e. imported in one of the above steps), Interface is Abstract Interface and Receiver Service is actual receiver, in this case Business Service created for File. Interface Determination is created for Inbound File Interface. No interface mapping is required, because BPM itself contains mapped data. Unlike in first receiver determination, in this case Receiver Agreement is required, as file is a receiver.
Following screen explains the Second Receiver Determination, where actual receivers are determined. Make sure that Sender Service is BPM and Receiver Service is actual Business Service created for File.
6. Create Sender Agreement
As file system is source in this scenario, sender agreement is created based on sender file communication channel.
7. Save all and activate all
To monitor Integration process log, go to transaction SXMB_MONI_BPE ->Process Selection->Select corresponding integration process (in Service Field) ->Execute->Select work item.