on 01-05-2012 8:24 AM
Hi gurus,
We are using content base routing by checking the value of field F1 in our scenario. If the value is V1, then route to system A; If the value is V2, then route to system B.
There are two layer in the send message type: layer1 and layer2. Both layer1 and layer2 can occur many times.
As you know, The field maybe existed many times in the real messages. Sometimes with the value V1, sometimes with the value V2.
If F1 is in the layer1, can we split into two messages by judging the value of F1?
If F1 is in the layer2, can we split into two messages by judging the value of F1?
Thanks in advance.
Which is exactly what I suggested to do
Secondly, you need to prepare two separate Message Mappings. In each of them, you need to make a conditional mapping of the required nodes: in the mapping for system 1, only map segments where F1 = V1 (by the IF function). In the other mapping, only map segments where F1 = V2. I'm afraid there is no other option to solve your problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Solved by adding some logic in message mapping to separate different values. thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Then you need to split your logic into two separate parts. First of all, you create a Receiver Determination just the way I described before. This will give you the message split whenever necessary, and messages will be sent to respective further processing steps.
Secondly, you need to prepare two separate Message Mappings. In each of them, you need to make a conditional mapping of the required nodes: in the mapping for system 1, only map segments where F1 = V1 (by the IF function). In the other mapping, only map segments where F1 = V2. I'm afraid there is no other option to solve your problem.
Hope this helps,
Grzegorz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Grzegorz,
I did as you suggest, but the result was still as below(V1 and V2 both emerged in system A and B, which was not we want):
<DATA>
<F1>V1</F1>
...
</DATA>
<DATA>
<F1>V2</F1>
...
</DATA>
<DATA>
<F1>V1</F1>
...
</DATA>
We tried to split message in message mapping by enter two receive message type, but there were error while testing in XMLSPY.
Any ideas?
Hi,
If you enter multiple conditions in Receiver Determination and many of them will be matched by a single message, it will be duplicated automatically by PI without any further configuration. So all you need to do is specify your criteria in Receiver Determination:
if F1 = V1 then Communication Component (system) A
if F2 = V2 then Communication Component (system) B.
Regards,
Grzegorz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Grzegorz,
Thanks for your reply.
Actually my case is as follows:
(send messge)
<DATA>
<F1>V1</F1>
...
</DATA>
<DATA>
<F1>V2</F1>
...
</DATA>
<DATA>
<F1>V1</F1>
...
</DATA>
Then in system A, we should receive( suppose no mapping):
<DATA>
<F1>V1</F1>
...
</DATA>
<DATA>
<F1>V1</F1>
...
</DATA>
While in system B, we should recieve:
<DATA>
<F1>V2</F1>
...
</DATA>
If we only use content based routing, both A and B will receive all 3 DATA.
Any ideas? Thanks in advance.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.