on 11-30-2006 6:14 AM
Hi Gurus,
I hope you help me with this scenario.
I am developing the File-XI-JDBC interface where I need to get the application ack from the Oracle database and based on the ack, I need to trigger the call to Stored procedure in the same database.
How can I check the application ack is 'success' or 'failure'? and based on that to proceed to the next step?
Please guide me.
Thanks
Kalyan
Bhavesh,
Iam not sure why ccBPM cannot handle application level ack?In the send step you have both appp and system ack as well?Can u clarify on that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sravya,
AFAIK, Application Ack's needs to be sent by the target system back to XI.
In this case, as kalyan is dealing with Databases with JDBC adapters, the Database would need to send back the acknowledgement back to XI after processing the data. I am not sure if this would be possible and if possible would it be feasible.
Instead, making a synch call to the Database is going to return the number of scussful insertions , and this can be used as an Ack from the database as well.
Let me know if I am wrong.!
Regards,
Bhavesh
Hi,
On seconds thoughts, why dont you make a single call to the Stored Procedure and push all the logic / validations into this stored procedure itself rather than having multiple steps inside XI?
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,
We are in a typical interface where we have to do like this. In the first send step I have to load the staging table and based on the success/failure of the 'INSERT' operation I need to trigger the Stored procedure in my second 'sync step'.
If i make the send as sync to JDBC while inserting the data, what response will I get back from the database?
The BPM provides the option of chosing the 'Application acknowledgment', how can we determine the ack in BPM?
These are the questions I have, please help in this regard,
Kalyan
Hi,
<i>If i make the send as sync to JDBC while inserting the data, what response will I get back from the database?</i>
The response will contain , <b><insert_count>count</insert_count></b> to give you a count of the number of successful inserts.
On the basis of this you can decide if all inseetions are successful and then do the needful to call the stored procedure.
BPM does support application acknowledgements, but you can use that only when the the receing application supports and can send an application acknowledgements.
A JDBC adapter with a call to a DB cannot obviosuly send back the acknowegement. use the Synch Call to decide if insertion was successful or not and then use the response of the INSERT with INSERT_COUNT to go ahead with your logic.
Regards
Bhavesh
Bhavesh,
Thats a great post. Thanks a lot. What should be my JDBC response structure? Can you please pass me any example blogs?
I have the input fields as many as 34. This would be my request message, what should be the structure for my response message. Please explain.
I have to call this stored procedure which has only 1 input parameter (constant) and 3 output parameters. With out having any mapping, can I call a stored procedure?
Thanks
kalyan
Hi Kalyan,
>>What should be my JDBC response structure
Bhavesh has already given that
for update statements
<update_count>count</update_count>
for insert statements
<insert_count>count</insert_count>
Have a look at the help.sap link given by Bhavesh. It contains all the structure.
Regards,
Jai Shankar
Hi,
Use this blog to see how to get the JDBC response strcuture,
/people/siva.maranani/blog/2005/09/16/xi-how-to-on-jdbc-receiver-response
The response will have the same messagetype as source with an _response appened to it.
Also, the statement will also be appended with an _response.
Example,
Req--
<MT_REQ>
<statement>
<acess>
..
..
</statement>
</MT_REQ>
now the response structure should be,
<MT_REQ_response>
<statement_response>
<insert_count></insert_count>
</statement_response>
</MT_REQ_response>
For every STATEMENT tag, a STATEMENT_response with insert_count will be created.
Regards.
Bhavesh
Bhavesh,
It was a very helpful answer.
I have another question related to my interface.
1) Receive step - Receives the input message.
2) Send 1 - will send the message to Oracle database to insert the data. This is sync step.
3) Switch step - the condition is based on the 'insert count' response received from the jdbc adapter.
-
I am doing OK until these steps.
-
4) In branch 1 of the switch step, i need to have a sync step which will send the parameters to the stored procedure and gets the return from the sp.
While using this send step, i am getting a message saying that the request message is not initialized.
There is no relation between the request message from the first send step and this send step.
I am in dilemma, how to get this step work.
Please help me.
Basically, I need to load the database and if the insert is success, i need to run the stored procedure on the same database from XI.
Thanks
Kalyan
Bhavesh,
I have added the transformation step in the top branch of my switch step. The source message for the transformation step is my message which is used in the expression for the switch and target is the input message for my stored procedure sync message.
Now I have a sync send after the transformation step. In the sync send, I am using the target message in the transaformation step as 'input' message and the response of the stored procedure as the output message. I am getting an error saying that the sync abs message interface in the sync send step is not abstract async. If I change it to async, it is complaing that it is not abstract sync interface.
Please throw some light here.
Thanks
Kalyan
Hi,
JDBC adapter does not suppor Application Acknowledgements.
But, what you can do is make a synchronous call to the database that will return you the status of the call and then on the basis of this response decide if the call was successful or not.
Please take a look at this link, to see how to use the Response for INSERT , INSERT_UPDATE and DELETE actions of the JDBC adapter.
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.