cancel
Showing results for 
Search instead for 
Did you mean: 

BPM Design - JDBC

Former Member
0 Kudos

Hi members:

I have a BPM scenario - IDOC-to-JDBC

I have to delete a record in the db after checking certain conditions. Lets say my IDOC has Field A etc..My db has

Row 1 : field B, Field C, Field D

Row 2 : field B, Field C, Field D

etc..

after i receive my idoc in the bpm,i have to check which row of FieldC in my db matches field A in my IDOC.There may be 1 or more matches. If there are more than 1 match or no matches at all, i have to cancel the process, if there is only one match, i have to take the corresponding row`s FieldB and pass it on to my next step.

I am not sure how can i fetch the fields, do the count and execute it in my BPM. any suggestions would be appreciated.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Aarthi,

<u>Steps in BPM,</u>

1. Receive --> To receive the IDOC in BPM.

2. Sycnhronous Select --> To make a synchronous call to the JDBC to select the from the database.

3. N:1 mapping. --> Do the reqruied mapping and then the next steps inside the BPM.

Also take a look at this blog for a sycnhronous select inside the BPM to select the data from the database.

/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step

Regards,

bhavesh

Former Member
0 Kudos

Bhavesh,

Thanks for the blog. but one thing that is still not clear is, after i to my db query, it may return just 1 time the FiledB or several times the FieldB,is there a way to count my return? b`se it is at this point i have to branch out depending on 1 time return or several time return of the FieldB, how can we achieve this?

Also, i have this basic Q: i always thought that

when we want to read/select from a db we use sender JDBC adapter

when we want to update/insert/delete into a db we use receiver JDBC adapter , right?

From your blog, i can see that we can also use receiver JDBC adapter to read from a db, did i understand it correct?

Thanks

Message was edited by: Aarthi R

Message was edited by: Aarthi R

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

><i>Also, i have this basic Q: i always thought that

when we want to read from a db we use sender JDBC adapter

when we want to update/insert/delete into a db we use receiver JDBC adapter , right?

From your blog, i can see that we can also use receiver JDBC adapter to read from a db, did i understand it correct?</i>

sender JDBC adapter can be used to select data from the DB. Sender JDBC adapter is used when you want JDBC adapter to initiate message processing in XI>

Receiver JDBC adapter can be used to select , insert , update , delete and call stored procedures using the JDBC adapter.

In your case, as an IDOC will trigger flow of message in XI, using a Receiver JDBC adapter would be better design.

><i>just 1 time the FiledB or several times the FieldB,is there a way to count my return?</i>

Sure is possible using the Statistical function COUNT in your Mapping.

Can you give the entire process flow so that all / exact steps in the BPM can be discussed.

Regards,

Bhavesh

Former Member
0 Kudos

Thanks Bhavesh. I would very much want to discuss my entire BPM steps..but its a very very huge/complicated process to post it in SDN. that why i am splitiing my Questions!:)

bhavesh_kantilal
Active Contributor
0 Kudos

Looking forward to the next few threads so that I can get the complexity

Regards,

Bhavesh