Topic
6 replies Latest Post - ‏2013-06-24T18:37:06Z by hclewelad
hclewelad
hclewelad
21 Posts
ACCEPTED ANSWER

Pinned topic DP Call Processing Rule - calling another MPG

‏2013-06-20T14:42:47Z |

 

This question again may be obvious, but is it possible to call a Rule that is in anther MPG in the same domain using the Call Processing Rule? A project I am updating uses a transform to build a variable that is a rule name that is called by the Call processing Rule. I noticed that the drop down on the Processing Rule configuration shows all the rules in the current project but doesn't have the options like http:// that would allow for a call to a foreign Rule.

Is this something I would want to do or should I just modify the Rule I want to replace to do a Route that calls the method out of the other MPG?

Thanks,

dale

  • JoeMorganNTST
    JoeMorganNTST
    427 Posts
    ACCEPTED ANSWER

    Re: DP Call Processing Rule - calling another MPG

    ‏2013-06-20T16:43:19Z  in response to hclewelad

    Have you tried just using the Call processing rule action and selecting the rule you want to call?

    Be careful... remember, any changes to the rule in the original MPG will also change this call.  This may be what you want, but if you're not prepared for it, it could be a problem.

     

    • hclewelad
      hclewelad
      21 Posts
      ACCEPTED ANSWER

      Re: DP Call Processing Rule - calling another MPG

      ‏2013-06-20T17:24:25Z  in response to JoeMorganNTST

      It doesn't appear to be an option, the only rules that show up are the rules in the current MPG and nothing from the other MPG in the same domain. The only other options are var:// stuff and  ACCEPT, REJECT options which I have never used.

      I think I am barking up the wrong tree by following the current design, I think I would probably be better off converting the existing application from a Static backend to a Dynamic backend and leaving the Call Processing Rule alone.

      Thanks for you help on this, and I am beginning to see that DataPower takes the "cat-skinning" paradigm to new heights.

      dale

      • JoeMorganNTST
        JoeMorganNTST
        427 Posts
        ACCEPTED ANSWER

        Re: DP Call Processing Rule - calling another MPG

        ‏2013-06-20T18:19:23Z  in response to hclewelad

        You can create a reusable rule very easily.  Just go to the MPG, open the processing policy, click on the rule containing the actions you want to be able to re-use.  Click the "Create Reusable Rule" button, and then drag your mouse around the actions you want to be able to reuse.

        The only unfortunate thing about doing it this way is that it creates a somewhat arbitrary name for the reusable rule (I wish we could have the option to provide the name, because you cannot easily rename things in DataPower).  In any case, once done, this new rule should be available in the drop down.

         

        • HermannSW
          HermannSW
          4369 Posts
          ACCEPTED ANSWER

          Re: DP Call Processing Rule - calling another MPG

          ‏2013-06-20T20:57:24Z  in response to JoeMorganNTST

          > ... (I wish we could have the option to provide the name, because you cannot easily rename things in DataPower) ...>
          >
          that sounds like a valid ER (https://www.ibm.com/developerworks/rfe).

          Here is only a workaround I can offer you to rename your reusable rules:

          1. create a new reusable rule, note the name generated
          2. save config
          3. open "dom.cfg" file in "config:" folder if you are in domain "dom"
          4. search for the rule name noted
          5. replace with the name you want (different to any other name)
          6. save the file
          7. restart the domain

          Yes, this is "not nice" and the reason why you should create an ER.


          Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

          • JoeMorganNTST
            JoeMorganNTST
            427 Posts
            ACCEPTED ANSWER

            Re: DP Call Processing Rule - calling another MPG

            ‏2013-06-20T21:46:41Z  in response to HermannSW

            Done!  Thanks for the link.

            • hclewelad
              hclewelad
              21 Posts
              ACCEPTED ANSWER

              Re: DP Call Processing Rule - calling another MPG

              ‏2013-06-24T18:37:06Z  in response to JoeMorganNTST

               

              That reusable rule is pretty nice. Thanks!

              dale