on 10-30-2006 12:28 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.