I have a requirement where i need to control the action pipeline processing based on some conditions.
The condition is placed right in the first action processing of RequestResponse service. If the condition is met it should route to different service and success response should return to calling service. Further more it should not continue with other succeeding action pipeline.
I can achieve this scenario using ContentBasedRouter or StaticRouter and this should be placed always at the end of your service which will eventually terminates your service action.
Is there any otherway you can control your action processing at the beginning of your service and not executing below actions?
Based on above conversations, there are two ways to do control it
1) if condition is met, return null.
2) if condition is met, throw ActionProcessingFaultException(...)
Both are not ideal way of controlling the response. If i use #1 , i will get empty response for RequestResponse service.
Using #2, i should always depend on the Exception thrown by any of the action class and then construct your custom message , I think this is not the best way for handling success response for my requirement.
Please let me know how could i achieve the controlling of action pipeline without using above methods.