on 08-05-2009 4:03 PM
Hi All,
I am having below requirement,
I am getting several messages from source, i need to collect all the messages, until i get TRAILER message
Condition is " COLLECT THE PAYLOAD UNTILL YOU GET DTS IN PAYLOAD(TRAILER)". so we need to collect header message and data messages untill you get trailer message.
message1(Header message which contains DHS)like below
20090604034447338isc DHS64 500d3100033d705050258002f86300
message2(data message which contains DDS) like below
20090604034447338isc DDS64 50031s000337050502580d0286300
20090604034447338isc DDS64 5003100033705050d25800286300
Message3(data message) like below
20090604034447338isc DDS64 500310003370505025800286300
20090604034447338isc DDS64 500310003370505025800286300
20090604034447338isc DDS64 5003100033d7050502580f0286300
Message4(trailer which contains DTS) like below
20090604034447338isc DTS64 500310003370505025800286300
So 4th message contains 3 charcters DTS, now i need to end the collecting messages in loop and need to send the collected messages to target.
Presently i am using PI7.1 which contains some patters to use as XPath for end condition purpose. I am using Contains Patter(CP) in loop end condition. according to my understanding the collection in loop has to end when it find DTS in message. but it is not working. Please share you ideas whether Contains Patterns suitable for my requirement
or not and is there any other better approach for this requirement?
Thanks & Regards,
Madhusudhan
Hi,
You can try with following approach:
1. Define A Data type with Additional Filed at last named Trailer.
2. Call a Message Mapping outside the BPM before message enter BPM.
3. Set The value of this field to 1 when DTS received in last string.
4. This field value will be used in BPM to stop collecting messages in BPM.
Hence an Additional Mapping before BPM + standard BPM Collect Pattern ( Payload Dependent) should work for your scenario.
Please try.
Regards,
Anurag Garg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for your valuable reply,
As you told i implemeted the logic for loop end condition like below
Value CP 'DTS'
Value is condition variable in xpath according to PI7.1.
Now according to above xpath, if DTS found in payload at any place. The loop has to end, but now even there is no DTS in payload the loop is getting complete and messages are going to target.
Thanks,
Madhu
Edited by: Madhusudana Reddy on Aug 5, 2009 9:13 PM
Edited by: Madhusudana Reddy on Aug 5, 2009 9:24 PM
Edited by: Madhusudana Reddy on Aug 5, 2009 9:25 PM
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.