on 09-18-2007 10:14 AM
Hi all,
I had a scenario where i had to pick a file and transfer it to Oracle database table.
installation of drivers ,connectivity test has been done...
but the database table has to populated every time fresh data., as per the requirment. now i had to pick a file ,than a particular table data( all rows, not table)
has to be deleted, and than the new file data has to be populated in the table
i had design 2 mappings :
1. source file data to target table datatype ( for for inserting the data ).
2. source file data to a data type( for delete operation).
in BPM i had to make these asynchrous steps in sequence
<b> > Pick file-> Delete all rows in table --> Insert in table.</b>
<u>can any help what all the Blocks in BPM i had to configure.</u>
till now i had done :
<b>Start > Receive Step> Transformation1 ->Transformation2> Stop</b>.
<i>Transformation1: Interface mapp for Deletion
Transformation2 : Interface mapp for Insert.</i>
is it correct or somewhere i had to change.
Regards
AP
Ajay,
You can have multiple SQL statements in JDBC receiver document format..
You don't even need BPM for this if you just want to run two queries in JDBC receiver
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thx Varun Mukund & Peter Jarunek
i tried u r option and it is working....
<b>But i had to use BPM , not because of two sequence mappings , but to configure
exception also...</b>
do u any idea of the following BPM steps....
when i am using check option in my BPM
it is showing some message as XX ( Out bound interface used in 1st maaping) Container variable not intialised
and IN and Out bound interfec ( Used in 2 nd mapp) intialised but not used.
Hi Ajay,
Do this in your BPM,
1) Receive step for file input
2) Transformation to map to JDBC receiver format
3) Syncronous send to JDBC(I'm doing sync send because the count of the inserted rows can be received in the response)
4) Transformation to map to mail receiver format
5) Asyncronous send to mail adapter
Varun, this won't help Ajay, cos' you can't have items to be inserted in the response of the first JDBC call.
Well, Ajay, this is a bit difficult. I suppose, you have to send 2 messages into BPM. First deletes rows, 2nd will do the insert. BUT - there is a problem, that 2nd insert depends on whether delete is successful... ufff
You can probably try:
a, Receive step for deleting message (starts BPM)
b. transformation (if needed)
c, Block (in block sync JDBC call to delete - in exception branch exc catch)
d. if succesful - receive step for inserting message
e, transformation (if needed)
f, send to insert rows.. (if exception should be cought, again in the block)
This is just my idea, how it would be possible to think about it...
Use
<root>
<StatementName2>
<dbTableName action=INSERT>
<table>realDbTableName</table>
<access>
<col1>val1</col1>
<col2>val2</col2>
</access>
<access>
<col1>val11</col1>
</access>
</dbTableName>
</StatementName2>
<StatementName3>
<dbTableName action=DELETE>
<key1>
<col2>val2old</col2>
<col4>val4</col4>
</key1>
<key2>
<col2>val2old2</col2>
</key2>
</dbTableName>
</StatementName3>
</root>
as the JDBC receiver data type structure
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.