gravitee-io/gravitee-docs

Conditional policies

Opened this issue · 0 comments

From 3.15, we'll be adding condition on every policy.
The idea is to add a condition before execution of policy, the condition can use Expression Language.
If the condition is true, the policy is executed. If not, it isn't.

The objective is to avoid flow duplication.
Example : you got the same API but you can have two type of body (Json / XML), you can add both Json / XML transformation policy with a condition on body type on it so you don't have to duplicate the flow for both type of body.

It can be use at platform policy level also.

If a condition is set on a policy, an icon is displayed on the card in the policy studio.