Knowledge Base

Showing results for 
Search instead for 
Did you mean: 

How can custom correlation be used with validation?


Use Case Description

Using the flight search sample application, this example shows the use of the validation configuration. Prior to applying the custom correlation configuration with validation, the flow map shows the following.


Flow Map Without Correlation




Flow Map With Correlation and Validation

Providing custom correlation configuration along with validation that specifies correlation for the requests for United Airlines searches, indicated by the value "UA232" in the getter chain configuration, we get the following flow map.




The validator configuration is specified in the validator-config element in addition to the standard producer and consumer XML shown in other examples. This XML snippet just shows the validator-config for this example. Place this element and its associated attributes and child elements inside the <intrumentation> element of your producer or consumer XML.


Validation XML Example

Consumer XML configuration for custom-activity-correlation.xml

<validator-config> <validator class-match-type="MATCHES_CLASS" match-pattern="java.util.HashMap"> <data-match-config> <data-gatherer-type>POSITION</data-gatherer-type> <position>0</position> <getter-chain>this</getter-chain> <transformer-type>GETTER_METHODS</transformer-type> </data-match-config> </validator> <!-- no data match conditions with a class match validation --> <validator match-type="NOT_EMPTY"> <data-match-config> <data-gatherer-type>POSITION</data-gatherer-type> <position>0</position> <getter-chain>get(object/UA232)</getter-chain> <transformer-type>GETTER_METHODS</transformer-type> </data-match-config> </validator> </validator-config>
Version history
Revision #:
9 of 9
Last update:
‎12-30-2018 11:07 AM
Updated by:

Found this article helpful? Click the Thumbs Up button.
Have an additional comment? Post it below.
0 Kudos