Hello guys
I have the follow situation working with these tables for an exposition.
andCode:Customer id firstname lastname 000001 manuel01 jordan01 .... 000500 manuel500 jordan500
I want generate in batch for each Customer three CustomerAccount recordsCode:Currency id description 1 sol 2 dolar 3 euro
I mean
a total of 1500 records for CustomerAccount tableCode:CustomerAccount id ammount 000001-1 500 000001-2 500 000001-3 500 .... 000500-1 500 000500-2 500 000500-3 500
BTW
idCustomerAccount = idCustomer - idCurrency
Practically three independent combinations of 500 for each group, making the total of 1500
Therefore
I need read the 500 Customers just once and write in parallel the three possible combinations
000500-1 500
000500-2 500
000500-3 500
I think make it in parallel but I need mandatory a writer, the processor is optional, I mean
Practically A1,A2,A3 makes the 1500 rows for CustomerAccount (500 each A#), I hope you see my point.Code:<job id="" <step id="alfa" read="500 customers" write <---------------- mandatory, but I dont need it next="parallel" /> <split id="parallel" next="..."> <flow> <step id="A1" reader="" <--- mandatory, I dont need it, I need work with each Customer retrieved in "alfa" processor="" <-- I need it to create CustomerAccount related with Customer and Currency(1) Sol writer=""<--- I need it to write CustomerAccount /> <flow> <flow> <step id="A2" reader="" <--- mandatory, I dont need it, I need work with each Customer retrieved in "alfa" processor="" <-- I need it to create CustomerAccount related with Customer and Currency(2) Dolar writer=""<--- I need it to write CustomerAccount /> <flow> <flow> <step id="A3" reader="" <--- mandatory, I dont need it, I need work with each Customer retrieved in "alfa" processor="" <-- I need it to create CustomerAccount related with Customer and Currency(1) Euro writer=""<--- I need it to write CustomerAccount /> <flow> </split> .... </job>
I didnt try it yet, because the attributes read, write are mandatory and I dont know how pass theCode:000001-1 to 000500-1 Sol 000001-2 to 000500-2 Dolar 000001-3 to 000500-3 Euro
Customer from Step Alfa to each A#
How I can handle this situation with Spring Batch?
Is Possible?
Thanks in advanced


Reply With Quote
