For conversational IMS™ MFS applications to participate in BPEL processes, create an operation for each iteration in the conversation. The conversation ID (convID) must be passed to subsequent iterations. The last iteration must end the conversation if the conversation is not ended by the application.
Each iteration in a conversation is an operation in the BPEL process mediation flow. Each operation has an input and an output. Each input or output has a specific data type. For MFS applications, the data types are generated from the message input descriptors (MIDs) and message output descriptors (MODs) in your MFS source file. You then create additional data types that contain information about the conversation ID (the value of the convID property) and whether the conversation has ended (indicated by the convEnded property value).
To demonstrate the concepts, assume that you have the following MIDs (IVTCBMI1_Page1 and IVTCBMI2_Page1) and MOD (IVTCBMO2) that are generated as data type business objects from the IMS phonebook sample. Assume that you are creating a mediation flow with three iterations, each with the following input and output:
| Iteration (operation) | Input | Output |
|---|---|---|
| First iteration | IVTCBMI1_Page1 | IVTCBMO2 |
| Second iteration | IVTCBMI2_Page1 | IVTCBMO2 |
| Final iteration | IVTCBMI2_Page1 | IVTCBMO2 |
To start a conversation, the useConvID property must be set to true. In order to uniquely identify the conversation in all iterations, the conversation ID (the convID property) must be made available to the business context. In addition, subsequent iterations must be able to retrieve the convID value from the context. To end a conversation, the conversation ended (convEnded) property must be set to true. The property might be set by the client application, or when the last iteration is called.
| Iteration (operation) | Input | Output |
|---|---|---|
| First iteration | IVTCBMI1_Page1 | IVTCBMO2, convID |
| Second iteration | IVTCBMI2_Page1, convID | IVTCBMO2, convID, convEnded |
| Final iteration | IVTCBMI2_Page1, convID | IVTCBMO2, convEnded |
| Iteration (operation) | Input | Output |
|---|---|---|
| First iteration | IVTCBMI1_Page1 | PersonOut (IVTCBMO2, convID) |
| Second iteration | PersonIn2 (IVTCBMI2_Page1, convID) | PersonOut (IVTCBMO2, convID, convEnded) |
| Final iteration | EndConv (IVTCBMI2_Page1, convID) | PersonOut (IVTCBMO2, convEnded) |
After these new data types are defined, use custom mediation code to set the value of the convID and convEnded fields by retrieving the information from the context.