cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Merging two files in BPM

Former Member
0 Kudos

Hi,

I need to merge two files (Balance and transaction) with correlation is defined from ID, Date and Accountnumber..

Sometimes, when there are no transaction records, then balanace file will come up number "0"

Balance file:

-


MDk;1728;175;02.09.11;781961.09;0.00;0.00;781961.09;;;;;;;;;0

MDk;8574;175;02.09.11;4462;1112;104098800;104102150;;;;;;;;;2

from the above file, two accounts..

MDk;1728; --- with zero transaction record

MDk;8574; --- with two transaction records

Transaction file:

-


MDk;8574;175;02.09.11;;DEBIT;;;;;-1112;;0;02.09.11;;;;20555;;;037;

MDk;8574;175;02.09.11;;CREDIT;;;;;104098800;;0;02.09.11;;;;;;;099;

We are using Correlation to merge the files by using the fields (MDk;8574;175;02.09.11)

Now the issue is the BPM is not working as the correlation is not matching as the balance file consists of a row (with zero transaction record) which is not present in transaction file.

I have to ignore the first record in balance file as it contains 0 transaction data which means there are no records for this account in transaction file.

How can I delete those records before going to merge condition? Is there any thing i can do in balance file adapter?

Any suggestions please?

Thanks

Deepthi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In FCC for balance file, set Document Offset = 1 so that the first line is ignored. Refer this link for more help on this.

Another option can be to use a message mapping before the BPM where you remove the first line.

Regards

Answers (2)

Answers (2)

former_member854360
Active Contributor
0 Kudos

Hi,

Select Correlation value container as Multiline in BPM.

Check the Multiline CheckBox.

Former Member
0 Kudos

Hi Deepthi,

Just a thought, why don't you handle 0 records in Mapping??

regards

Ramesh

Former Member
0 Kudos

Hi Ramesh,

This is the problem at the first step of the BPM where we will receive the files.

Start> FORK (Rec1 & Rec 2)>TransforMap( Merge_to_targetfile )-->SendtoReceiver -->END

It is failing at step1 (Fork), where the files are not matching according to correlation condition which we set.

ie. ID, Date, Accountnumber.

As the transaction file doesn't contain the record "MDk;1728;175;02.09.11" which is present in Balance file, the correlation is not matching. Hence it is failed. It is not even reaching to map

As correlation is mandatory to receive two matching files, it is failing here..

Former Member
0 Kudos

Hi Deepthi,

Why don't you add one more condition at correlation step to handle blank file?? Can you try this??

Former Member
0 Kudos

Hi Deepthi,

It seems almost impossible to handle correlation for an incoming empty payload.

I think the only option left is, that the transaction file should contain a record if even it has 0 records.

regards

Ramesh

Edited by: Ramesh P on Sep 6, 2011 3:02 PM

former_member854360
Active Contributor
0 Kudos

Hi,

Check the Multiline CheckBox. for correlation

it will solve your problem

Former Member
0 Kudos

Delete the rows in mapping before passing the balance message to BPM.

Mapping is done between OutboundBalance-->AbstractBalance and pass the result as input to BPM. It worked.