0 Replies Latest reply on Dec 8, 2011 4:27 AM by madhucm

    Controlling Action Processing Pipeline

    madhucm

      Hi,

      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?

       

      I know there are lots of discussions on Controlling Action pipeline process or stopping action pipeline(http://community.jboss.org/thread/166075 , http://community.jboss.org/message/603897#603897).

       

      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.

       

       

      Thanks,

      Madhu CM