cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Multiple Tables dynamically using JDBC

Former Member
0 Kudos

Hi All,

We have a scenario where I should pull a TableX.Structure is shown below.

TableX

-


TableName Verb PrimaryKey

-


T1 Select 100

T2 Update 200

T3 Delete 300

-


When you poll the above table, besed on the record it should go to the particular table and do the Verb Action(Select or update or delete).

Eg: for first record"T1 Select 100" ==> It should go to T1 and do an Action "select".

Similarly for second record "T2 Update 200" => It should go to T2 and Action would be "Update" etc..

To do that I am using the BPM.Using JDBC Sender Adapter I could poll all the records from TableX.Now BPM is getting all the records from JDBC Sender using receive step.After that I would call a Synchronous JDBC receiver that should be responsible for creating a dynamic query and update the second table.

In this case when I get all the records in "Receive step" how do i put this condition "

Eg:

"T1 Select 100" ==> It should go to T1 and do an Action "select".

I mean how do I read each row separately. receive is getting bunch of records as a whole.

Thanks in Advance

Kiran

_____________________________________________

Accepted Solutions (0)

Answers (3)

Answers (3)

deviprasad_pothireddy
Active Participant
0 Kudos

Hi Kiran,

Write a stored procedure; apply your business logic there and use that stored procedure.

Regards,

Deviprasad.

Former Member
0 Kudos

You need to use Msg split here. Create as many request msg for the synch JDBC as the number of rows selected from the sender JDBC.

Then with in a block with mode for each, do the synch JDBC operation.

Here care must be taken during designing your data types for JDBC request and response. Reason is the structure for a select operation is different from update operation.

Regards,

Jai Shankar

bhavesh_kantilal
Active Contributor
0 Kudos

Incorrct answer.

regards

Bhavesh

Message was edited by:

Bhavesh Kantilal