I have a scenario where I need to throw BusinessRuleException in the external workflow, I used THrow activity and catches the exception in Catches …but how I should let the Main workflow know that BusinessRuleException has happened in external work flow, how can I pass BusinessRuleException to Main workflow?
I hope you kept your workflow in Try Catch block. If any exception occurs then it will come to Catch block and here throw BusinessRule Exception then other workflow will get to know this.
I am using RE framework, If I have thrown BusinessruleException in my external workflow using Throw activity, then do I need to pass this exception in argument to main workflow to let Main workflow know about this exception. Or Main workflow can know that BusinessRuleExcepton has happened in external workflow on its own?
If the exception you are throwing is not caught at level above, it will be known to Main or the initiator workflow.
However if you need to catch it and still be known to Main workflow i would recommend you to use Rethrow.
Thanks Pankaj for reply, but I am still not clear.
My query is, If my external workflow has thrown an exception and if I require my Main work flow to process the recovery steps as per the exception in external workflow. In this scenario, does external workflow has to explicitly inform main flow about the exception. Do I have to use the out arguments to inform Main about the type of exception?
If not then how Main or initiator workflow would come to know about the exception in external workflow
If i understand you correctly, you main objective is to propagate the error thrown by an external wf to parent/initiator/main workflow once you have caught an error in external workflow .
if this is what you need, once you have caught the error in external wf, using Rethrow will cause the same exception to be thrown again and which can be appropriately caught in the wf that is level above and you will be able to do as you please/recover from the exception.