Page 1 of 1

Routine activity failure

Posted: Sun Oct 14, 2012 4:59 am
by sumesh.abraham
I have a requirement to send notification if the record counts in target table is different from the source table, after the load is completed. I am accomplishing this using a server routine. I am returning 0 if counts match and -1 if counts do not match. In the routine activity in sequence job, I am using trigger as return value = -1 to call the notification activity. I noticed that whenever the returned value is -1, sequencer gets aborted.

When I disabled "Automatically handle activities that fail", I do not see this behavior. Is this the right approach to solve the issue or is this approach could possibly cause issues with other actvity execution in the sequencer? Appreciate your help!

Posted: Sun Oct 14, 2012 7:27 am
by chulett
Yes, that will affect all activities. Check the help for that "automatically handle" option as it explains how to override its check and handle that particular one yourself.

Posted: Sun Oct 14, 2012 3:18 pm
by ray.wurlod
The other way to disable a failure - and any non-zero return from a Routine activity counts as a failure - from invoking the Exception Handler is to have an explicit Failure trigger from the Routine activity.

Posted: Sun Oct 14, 2012 3:54 pm
by chulett
Which is what the help would tell them. :wink:

Re: Routine activity failure

Posted: Tue Oct 16, 2012 12:29 am
by aravindunni31
Instead of returning the value as -1, try getting as a different value. Like If Count matches, it should return EQUAL. Else NOTEQUAL. Try this