Flow service

Hi,

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.

Any help will be much appreciated…

Hi Niraj,

If you do not want to execute service A in the same context as service B you can think of publish-subscribe scenario.

This means that you publish a document from the catch clause of the service B.

A trigger that waits for that kind of document will execute service A.

In this way service B can evolve separately of service A.

Is this what were you looking for?

Vlad Turian

Why not catch block? Can you explain please?

Niraj – I understood your need, can you tell me what’s your business use case here to follow the specified approach ?

Thanks,

Hi Niraj,

usually this is exactly the scenario which are catch blocks intended for.

Can you share a screen shot of your service describing your scenario?

Regards,
Holger

Hi

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.

  1. 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.

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?

HTH,
RMG

Hi,

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.

Which is your parent service in this scenario?

HTH,
RMG