The Property Group Mediator is similar to the Property Mediator. It sets or removes properties on the message context flowing through synapse. However, unlike the Property mediator, the Property Group mediator handles multiple properties as a group. You can select the property action (i.e., whether the property must be added to or removed from the message context) for each individual property. Therefore, in a scenario where you need to set/remove multiple properties, you can add a single Property Group Mediator configuration instead of multiple Property Mediator configurations.
The Property Group mediator is a conditionally content aware mediator.
The Property Group Mediator configuration includes a description and a set of properties grouped together.
In the source view, multiple Property Mediator configurations are enclosed within the
<propertyGroup> element. You can also add a description in the opening element. (e.g.,
<propertyGroup description="A group of properties to include in the greeting message">).
In the design view, you can configure the Property Group Mediator as follows:
- Enter a meaningful description for the property group in the Description field.
- To add a new property, click the Add a new element icon.
As a result, the Property Mediator dialog box opens. Here, you can select a predefined property from the list or configure a custom property. For detailed descriptions of the parameters you need to configure for each property, see Property Mediator - Configurations.
- To remove a property, click the Delete selected element(s) icon.
- To arrange the properties in the required order within the property group configuration, you can select any property and then click the following icons to move it up/down the list.
The following Propert Group Mediator configuration adds the
To properties to the message context. It also removes the
MessageID property from the context. All four properties are handled together as a group.