Hi all,
My scenario is:
User A submit the form, then we do some jdbc service update, then route to user B.
The requirement is if JDBC component fails, then the task should be routed back to user A.
The problem is in workflow, JDBC component does not throw out any exception for me to catch.
Is there any way I can detect the exception from JDBC component if it fails ?
(The actual requirement is if there is any exception happening, the task must be routed back to previous user. For most of the component I can find the exception icon, but not including JDBC service component.)
Thank you,
Tuan Anh
Views
Replies
Total Likes
One option is you can write a simple Custom DSC (which replicate the JDBC functionality) to catch your your exception and proceed accordingly.
Nith
Views
Replies
Total Likes
Hi Nith,
For my project, we use JDBC component quite frequently with different tables, procedures and function.
If my understand is correct, what you mean is I need to write a Java custom component with JDBC connection, PreparedStatement code ... for each SQL statement.
If each of them need to be written as a custom component like that then it will be very difficult to mantain because we have about 60 tables, functions, procedure to query.
Do I understand your reply correctly?
If my understand is correct, is there any other way to detect the exception?
Regards,
Tuan Anh
Views
Replies
Total Likes
I agree your point.
Now, what do you mean by exception in your case?
1. Syntax error in the SQL query? or
2. Error while performing DML queries such as duplicate records, constrain violation etc??
you can't do anything for the 1st type of exceptions; however for 2nd type of exceptions, you can try the following option:
Try to return the status code from your stored procedure. Based on the retun value, you can route back the form to the previous user.
Will it help your need?
PS: I don think you can customize the JDBC component provided by Adobe.
Nith
Views
Replies
Total Likes
Hi Nith,
Thank you for your reply,
My exception here includes both your 1st and 2nd (generally all type of exception that can happen within JDBC component).
My client thought livecycle workflow works as a payment gateway, means if the task cannot be routed to next user for any reason, it needs to undo everything and rolls back to previous user. It does not seem to be possible with workflow process management with JDBC components. Maybe Adobe thought it is critical to complete the JDBC job so they make the component not throw any exception out...
Regards,
Tuan Anh
Views
Replies
Total Likes
Anyways, Please update me if you find any solution for this problem.
Thanks & Regards,
Nith
Views
Replies
Total Likes
Hi ,
I just want to throw some ideas to see if it help.
Besides creating custom component, is it possible to use standard ES service "ExecuteScript" to do query??
Inside the Execute Script service, you can get exception messages and save in a process variable.
You can refer to the following sites to see if it help
http://forums.adobe.com/thread/343136
http://blogs.adobe.com/livecycledocs/2009/04/saving_exception_messages_usin.html
Hi benjamin,
Thanh you for your reply and I'm sorry for late reply.
Excute script is one of the solution, better than write custom componet but then we still need to write execute script for each of the database call.
I will consider this approach if there's nothing I can do.
Thank you,
Regards,
Tuan Anh
Views
Replies
Total Likes
The next version of LiveCycle will contain an exception hanlder for the JDBC service.
Jasmin
Thank you for your reply, Jasmin.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies