I have a script that's initializing my operations and it's calling a stored procedure.
What I'd like to have happen is if there's an error produced from that stored procedure, whether it be database specific or not, I want to cancel the operation chain.
I can't seem to get this to work.
Within the operation logs, I'll receive a warning about there being a database error, but even with having an OnError, Step 2 is still firing.
My thought is that if I can't do this in one script, I'll create another one that performs the condition and checks the last error and then have that one call Step 2. I'd like to avoid that overhead.
Thanks for your help.
Here's an example of what I'm trying to do:
CallStoredProcedure("<TAG></TAG>",
"INIT_INTEGRATION_RUN",
0,
"SF Cases",
$operationId);
//check for an error and if so, prevent the next operation from running
error = $jitterbit.operation.error;
WriteToOperationLog(error);
WriteToOperationLog($jitterbit.operation.last_error);
if(Length(error) > 0,CancelOperationChain("Error Initializing Integration Run"));