I come across the scenario, where I need to invoke a flow service A, in case of any error occur in service B. However I didn’t want to invoke it from catch block of service B. So is there any way to invoke the service A in case of failure scenario of service B, before the cursor goes to catch block of service B.
I have to implement a business scenario where I am invoking service B in try block of service A. In case of input-output validation error for service B, cursor will go in catch block of service A. So in this case also I need to invoke service B. but I do not want to invoke it from catch block. After successfully invocation of service B there could be possibility of error in service A. So I am not invoking service B in catch block because it might be successfully invoked in try block of service A or it may be multiple invocation of same service. Please suggest any possible way to implement this except below.
pub sub
Check in catch block to identify if service has been invoked successfully from try block
service invocation outside of the try catch.
sub service option: Invoking service B inside any service and then invoking that service from service A.
In your ServiceB do you also have any main try/catch block in the catch block do you exit (On Signal Failure) block is there to handle the error and send it to Service B?
In case of input output validation in Service B, cursor will go in catch block of Service A because this error occur in service A itself. In catch block I do not want to invoke service B because in this case service B has been earlier invoked in try block of service A. But in case of any other error in service A before invoking service B then cursor will go in catch block of service A and in this scenario I need to invoke Service B but not in catch block. Is there any way to handle this except below
pub sub
2. Check in catch block to identify if service has been invoked successfully from try block
3. service invocation outside of the try catch.
4. sub service option: Invoking service B inside any service and then invoking that service from service A.