Catch "Write to Database" Smart Service exceptions

Hi, All:
I have a question about exception thrown by write to db smart service: Is there any way to catch the exception(any db transaction exception) so that to handle it gracefully like bypassing following nodes to end the whole process instance. We do not want this smart service node simplLY got stuck with just sending alert message, leading he whole process instance incomplete.

OriginalPostID-229706

OriginalPostID-229706

  Discussion posts and replies are publicly visible

Parents
  • A few things:

    1) Most DB transaction errors are predictable, so your design should be able to avoid most error scenarios before activating the DB write.

    2) It's not perfect, but you can infer an exception using a timer. For instance, activate a node scheduled to execute 10 minutes from when it is reached at the same time you activate your DB write. Cancel the time node if your DB write finishes successfully. If the 10 minutes is reached, there was probably an error and you can have your process route to your error logic. Note that this will not work if you need to chain the user to a subsequent form.

    3) If you can make your logic work in SAIL, the new smart service functions (including write to data store) have some built in error handling capabilities. Check the documentation for more info.

    Hope that helps.
Reply
  • A few things:

    1) Most DB transaction errors are predictable, so your design should be able to avoid most error scenarios before activating the DB write.

    2) It's not perfect, but you can infer an exception using a timer. For instance, activate a node scheduled to execute 10 minutes from when it is reached at the same time you activate your DB write. Cancel the time node if your DB write finishes successfully. If the 10 minutes is reached, there was probably an error and you can have your process route to your error logic. Note that this will not work if you need to chain the user to a subsequent form.

    3) If you can make your logic work in SAIL, the new smart service functions (including write to data store) have some built in error handling capabilities. Check the documentation for more info.

    Hope that helps.
Children
No Data