on 04-10-2009 5:41 AM
Hi All,
I have a requirement like...my incoming file(single file) needs to be split into 3 files based on a field "company code".and then route it into different systems.
my incoming file is like this .....
Header,name,.....,.....,........,.....,.....
Detail,.....,.....,.....,.....,......,companycode(100),....,.....,......
Detail,.....,.....,.....,.....,......,companycode(101),....,.....,......
Detail,.....,.....,.....,.....,......,companycode(100),....,.....,......
Detail,.....,.....,.....,.....,......,companycode(102),....,.....,......
Detail,.....,.....,.....,.....,......,companycode(101),....,.....,......
Detail,.....,.....,.....,.....,......,companycode(102),....,.....,......
EOF.
I need to split this file and my ouput file should be like this
For 1st system
Header,name,.....,.....,........,.....,.....
Detail,.....,.....,.....,.....,......,companycode(100),....,.....,......
Detail,.....,.....,.....,.....,......,companycode(100),....,.....,......
EOF.
For 2nd system
Header,name,.....,.....,........,.....,.....
Detail,.....,.....,.....,.....,......,companycode(101),....,.....,......
Detail,.....,.....,.....,.....,......,companycode(101),....,.....,......
EOF.
For 3rd system
Header,name,.....,.....,........,.....,.....
Detail,.....,.....,.....,.....,......,companycode(102),....,.....,......
Detail,.....,.....,.....,.....,......,companycode(102),....,.....,......
EOF.
and then send it three systems based on company code.
Can anyone tell me how this can be achieved?
Thanks,
Hemanth.
Hi,
We can do it easily, in receiver determination conditon window put condition based on company code (it seems constant). If company code is 1 call channel one, if company code 2 call channel 2 etc. Depending on company code file name will be differ meanwhile corresponding records will be append with existing record.
or
Another way is use dynamic file naming technique in mapping itself. Depending on company code route data along with file name. Put append mode in communication channel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nallam,
I tried the same thing but in the input file as there are different company codes,It is not splitting the file into three parts and sending only concerned data to repective system instead the whole file is going to the all the systems.
I came to know that the file has to splitted in the mapping only, we are able to do it by using mapping but the problem is in Routing,as in receiver determination we makes use of source structure for giving the condition. Can you please help me on this.
Thanks,
Hemanth.
Hi Hemanth,
Create three MM and three IM. Create one RD (with condition) and three ID.
If the number of receivers are unknown then use Enhanced receiver determination to create the number of receivers at runtime.
Please take a look at the following blog.
/people/venkataramanan.parameswaran/blog/2006/03/17/illustration-of-enhanced-receiver-determination--sp16
Regards,
Madan Agrawal
Hi,
I think multimapping technique will help u. According to your requirment you have three copany codes. In mapping window develop logic based on company code route data to corresponding structure. i.e. 1:3 mapping,
source.......Company code1----
MStructure1
.................Company code2.....................MStructure2
.................Company code3.....................MStructure3
Hi,
you can achieve this without using BPM in a different way. Instead of performing 1:N mapping. Create 3 different mappings from one source message to 3 target messages. creste thre inbound interfaces, 3 receiver determinations,3 interface determinations, 3 CCs and 3 receiver agreements also.
Regards,
Reyaz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i doubt in case you have to send messages to multiple systems Enhanced (Mapping-Based) Interface Determination will work. Since receiver determination comes before interface determination.
So in your case ideal will be to have a BPM which will do the 1: N mapping and then in the receiver determination where source service is BPM and target service is your target system, use a conditional routing using XPATH in your receiver determination.
This will be your solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
I dont understand what the problem is ,,, create required no. of communication channels , use enhanced interface determination wherein which you would be having one interface mapping and number of inbound message interfaces defined . Create the corresponding receiver agreements.
Regards
joel.
Hi hemanth,
This can be easily handled by the mapping . Remember You would need to make use of a number enhanced interface determination in ID.
Regards
joel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.