cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC asynchronous call - update

Former Member
0 Kudos

Hi,

Scenario: Proxy to JDBC (asynchronous call)

The process sends an update command to the database. The where clause does not exist i.e. The record can not be updated since it does not exist

(data on database recid = 1, 2, 3)

(update where recid = 10)

The message is marked in message monitoring as successful, I would have expected the message to fail since the update can not happen.

Is this the correct behaviour? If yes, how can I get the message to fail to notify the administrator that there is an issue.

Thanks,

Leanne

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks

Former Member
0 Kudos

If u just want to generate an Error in AF for UPDATE then u can do by:

- Pass the wrong data from the source file..like if there is data then give wrong format..in integer then pass 34324fsdfsdf etx

- Not good but u can do that also : Misispell the UPDATE say UPDAT.

- just disable few feilds in JDBC target(Mapping)

Thanks

Farooq.

Former Member
0 Kudos

Hi,

The communication channel messages are also successful.

I want an error when the update can not be performed, is this possilbe? Setting the Update to 'Upda' is an invalid command.

Thanks,

Leanne

Former Member
0 Kudos

Just for generating an Error "Like Update is not performed" in XI is not possible.

You can just throw an Adapter Specific Alert from Alert Framework.

Just for test :YOu can do one thing...just give the wrong table name in the JDBC Message type.

See if u want that XI will send the message to DB and if updates does not perform in DB due to any reson then u want message from DB that updates not done right??

This is not possible that in Asyhch call DB will send or tell u that updates is successfull ot not.

U cal only check the status in adapter and configure your alerts based on JDBC adapter....so if any problem come like wrong Test data, DB is down, channel is inactive etc then it will inform ur administrator.

Thanks

Farooq.

former_member190313
Active Participant
0 Kudos

hi

this is right but along with this also we can track the errors and send the alert if update query fails in db

sheetal

Former Member
0 Kudos

> I want an error when the update can not be performed,

> is this possilbe? Setting the Update to 'Upda' is an

> invalid command.

No u cannot not..communication between JDBC adapter and DB is successfull then XI will become out of pic....now if there is some problem in DB due to that Updates is not happing then it is diff case..

Bottom like...if JDBC adapter is green and sent the message to DB (in ur case UPDATE) then it will update.

Thanks

Farooq.

<b>

*Rewards Points if u find it useful/helpful*</b>

Former Member
0 Kudos

Better change the table name in JDBC Message Type and then try to execute ur interface...so JDBC adapter will try to insert the records in table that is not available in DB...by this u can say UPdate is fail from XI to DB:)

Thanks

Farooq

<b>*Rewards Points if u find it useful/helpful*</b>

Former Member
0 Kudos

Hi,

Is there any way to keep this a asynchronus call and raise an error since the update can not occur? Having a synchronous call will be very heavy for the system since the connection will have to remain open for all the payloads passed (and they are millions of records)

Thanks,

Leanne

prateek
Active Contributor
0 Kudos

Ur requirement is related to processing of data at receiver side.

This can only be achieved in 2 ways:

1. A response

2. An application ack. But JDBC receiver doesnt support application ack.

Regards,

Prateek

bhavesh_kantilal
Active Contributor
0 Kudos

XI will not raise an error at all.

What happens when you execute a valid update statement as a SQL query and there are no rows matching found. It is not a error right? XI behaves the same way.

As pointed by Prateek, the logical way to approach this is to make a synchronous call to the Update Query , get the response back , the response will contain the count of number of rows updated and if it is Zero, you can trigger a alert etc as needed by you.

BPM plus a synch call seem to be the simplest of solutions to this requirement.

Regards

Bhavesh

former_member190313
Active Participant
0 Kudos

hi

you will see the failed query in adapter monitoring.

There you can set the alert to notify about failed update

if you need more help do tell me !

regards

sheeetal