The mediation policy processing model explains the conditions under
which information is taken from mediation policies and applied to message
flows.
If your Service Component Architecture (SCA) module has multiple mediation policies
attached to it, and the mediation policies have multiple properties and conditions,
how does the run time decide which mediation policy properties to use for
a particular message flow? Also, when does the run time use the property values
shown by the administrative console?
Hierarchy of mediation policies
In a message flow,
you can override the values of dynamic properties defined for the current
SCA module. The run time applies the following rules to decide which property
values to apply to a message flow:
- Mediation policies with gate conditions have the highest precedence. Therefore,
property values defined by these mediation policies have the highest precedence.
Note: Before
a mediation policy with gate conditions can be further evaluated, all of the
gate conditions must be met.
- Mediation policies without gate conditions have a lower precedence. Therefore,
property values defined by these mediation policies have a lower precedence.
Administrative console values are used if there is no suitable
property in a mediation policy.
Merging mediation policies
If multiple mediation policies
(at the same precedence) contain the same dynamic property, the mediation policies
are merged. In this case, the value of the property must be the same in all
the merged mediation policies. Any mismatch is termed a policy error, which
means that there is no mediation policy for that policy merge.
Therefore,
the merging of mediation policies has the following steps:
- Process the highest-precedence mediation policies.
- Merge the mediation policies.
- If any property occurs in multiple mediation policies, the value of the
property must be the same in all mediation policies.
- Process the lower-precedence mediation policies.
- Merge the mediation policies.
- If any property occurs in multiple mediation policies, the value of the
property must be the same in all mediation policies.
- If there are no property mismatches, the values of the properties are
stored in the SMO, unless they have already been set by the highest-precedence
mediation policies.
- If there are property mismatches, no properties from this precedence-level
are used.
Note: If a property has been successfully set in the highest-precedence
policies, but it causes a mismatch in the lower-precedence policies, the normal
rules apply. Because there has been a policy merge error, no mediation policies
from the lower-precedence level are used; the output will be sent to the policyError terminal.
The value from the highest-precedence policies is used.
Any dynamic property that has not been assigned a value from a
mediation policy document, is assigned the value shown by the administrative
console.
Example: Successful merge
The following example
shows a successful merge of mediation policies, attached to an SCA module.
The
SCA module has the following promoted properties:
- Property_1
- Property_2
- Property_3
- Property_4
- Property_5
In addition, the SCA module has the following mediation policies
attached:
- Policy_X, with associated conditions
- Policy_XX, with associated conditions
- Policy_Y, with no associated conditions
There are no mismatches between property values, at the same precedence.
Table 1. Example showing a successful merge of mediation policiesMediation policy precedence |
Mediation policy name |
Promoted property: alias name |
Promoted property: value |
Use this promoted property value |
Merged mediation policy values |
Properties used for message flow |
Highest precedence: with conditions |
Policy_X |
Property_1 |
A |
Yes |
Property_1 = A |
Property_1 = A |
Property_2 |
B |
Yes |
Property_2 = B |
Property_2 = B |
Policy_XX |
Property_3 |
C |
Yes |
Property_3 = C |
Property_3 = C |
Lower precedence: without conditions |
Policy_Y |
Property_1 |
D |
No |
|
|
Property_4 |
E |
Yes |
Property_4 = E |
Property_4 = E |
Administrative console promoted
properties |
|
|
|
|
|
|
Property_1 |
F |
No |
|
|
Property_2 |
G |
No |
|
|
Property_3 |
H |
No |
|
|
Property_4 |
I |
No |
|
|
Property_5 |
J |
Yes |
|
Property_5 = J |
Example: Unsuccessful merge
The following example
shows an unsuccessful merge of mediation policies, attached to an SCA module.
The
SCA module has the following promoted properties:
- Property_1
- Property_2
- Property_3
- Property_4
- Property_5
In addition, the SCA module has the following mediation policies
attached:
- Policy_X, with associated conditions
- Policy_XX, with associated conditions
- Policy_XXX, with associated conditions
- Policy_Y, with no associated conditions
There are mismatches between property values, at the same precedence:
the mismatches occur between the property values in Policy_X and Policy_XX.
Therefore, Policy_X and Policy_XX are not merged and none of the property
values in Policy_X, Policy_XX or Policy_XXX are used (even though there are
no merge errors in Policy_XXX). The mediation policy processing then processes
mediation policies at the next level of precedence. The only mediation policy
at this level is Policy_Y. Therefore, the values from Policy_Y are used.
Table 2. Example showing an unsuccessful merge of mediation policiesMediation policy precedence |
Mediation policy name |
Promoted property: alias name |
Promoted property: value |
Use this promoted property value |
Merged mediation policy values |
Properties used for message flow |
Highest precedence: with conditions |
Policy_X |
Property_1 |
A |
No |
|
|
Property_2 |
B |
No |
|
|
Policy_XX |
Property_1 |
C |
No |
|
|
Policy_XXX |
Property_3 |
D |
No |
|
|
Lower precedence: without conditions |
Policy_Y |
Property_1 |
D |
Yes |
Property_1 = D |
Property_1 = D |
Property_4 |
E |
Yes |
Property_4 = E |
Property_4 = E |
Administrative console promoted
properties |
|
|
|
|
|
|
Property_1 |
F |
No |
|
|
Property_2 |
G |
Yes |
|
Property_2 = G |
Property_3 |
H |
Yes |
|
Property_3 = H |
Property_4 |
I |
No |
|
|
Property_5 |
J |
Yes |
|
Property_5 = J |