I’m using the REFramework and trying to bubble up an exception from like 2 levels down back up to the Try Catch in the Process Transaction state so that the program can just continue on with the next transaction. However, the exception that I’m throwing inside this sub-sub-workflow is just stopping the entire program.
As comes standard, the Process Transaction state contains the Try Catch, where the Try invokes Process.xaml and one of the Catches is for a BusinessRuleException. In Process.xaml I invoke workflow1 (which is a flowchart), which in turn invokes workflow2, which contans a Throw activity for a New BusinessRuleException. More schematically,
Process Transaction > Try: Invoke Process.xaml; Catch: BusinessRuleException
Process.xaml > Workflow1.xaml (flowchart) > Workflow2.xaml > Throw
The REFramework is not catching this two-level-deep exception even though it is the only Try Catch in that chain as far as I can tell. According to replies like this one, if there are no Try Catches in the way, the exception should bubble up automatically, but that doesn’t seem to be happening in my program.
I seem to be able to bubble it up by wrapping these inner workflows with Try Catches all the way up but it seems messy and not a best practice. I’ve also seen mentions of using Rethrow to bubble it up but I think that requires the same wrapping with Try Catches and multiple levels.
What am I doing wrong?