Calling 2nd service only on failure of 1st service.

Any sample proxy available implementing below requirement ?

1. Call 1st Service

2. Only If call to 1st Service Fails

3. Call 2nd Service

4. Return the response from 2nd Service.

5. Else If call to 1st Service is successful

6. Return the response from 1st Service.

I believe 2 service callouts are needed and target endpoint configuration should not be required. Please let me know your input or any sample proxy you have.

Solved Solved
0 2 198
1 ACCEPTED SOLUTION

@Sunandita Dam We can also use service callout for the first service and target endpoint for the second service. We can define conditions to execute targets also i.e if condition-> first service fails then only target should be called.

View solution in original post

2 REPLIES 2

@Sunandita Dam , It should be straight forward. Implement a service callout in response flow of 1st service with a conditional statement to execute service callout.

@Sunandita Dam We can also use service callout for the first service and target endpoint for the second service. We can define conditions to execute targets also i.e if condition-> first service fails then only target should be called.