How to wait for the response of DB action

Hi.

Please sincerely share any idea to quickly solve the following problem without UM (Broker)
when using JDBC Adapter.

(Step)

  1. Delete 2000 data including the datum whose primary key is XXX in DB.
  2. Insert the data whose primary key is XXX.

(Problem)
Step 2 fails because Step 1 does not finished before Step 2. (Step 1 takes long time.)

We would like to make the flow service as Step 2 explicitly start after Step 1 completely finish.

Best regards,
Shogo Tatsuzawa

Hi,

I suggest to use local transaction for these DB operations.

-Use below inbuilt service to contro the flow

pub.art.transaction:startTransaction - should place before delete
pub.art.transaction:commitTransaction - should be after delete operation
pub.art.transaction:rollbackTransaction - should be in catch block after getlost error

once the transaction is committed, set a flag value to true.

branch on flag, if it is true then insert other records.

Thanks,
Sreekanth

Dear sreekanth-san,

pub.art.transaction:startTransaction - should place before delete
pub.art.transaction:commitTransaction - should be after delete operation
pub.art.transaction:rollbackTransaction - should be in catch block after getlost error

once the transaction is committed, set a flag value to true.

branch on flag, if it is true then insert other records.

The steps above successfully worked in my case!!
Thanks for the advice very much.

Best regards,
Shogo Tastuzawa

great.

regards,
Sreekanth