The rule mediator

This mediator is similar to the previous one, but it offers us more options and processes, so we can handle complex scenarios that we can't achieve with the conditional router.

This is the syntax:

<rule> 
   <ruleset> 
      <source [ key="xs:string" ]> 
         [ in-Lined ] 
      </source> 
      <creation> 
         <property name="xs:string" value="xs:string"/>* 
      </creation> 
   </ruleset> 
 
   <session type="[stateless|stateful]"/>* 
 
   <facts> 
      <fact name="xs:string" type="xs:string"                                          expression="xs:string" value="xs:string"/>+ 
   </facts> 
 
   <results> 
      <result name="xs:string" type="xs:string"                                        expression="xs:string" value="xs:string"/>* 
   </results> 
 
   [<childMediators> 
      <mediator/>* 
   </childMediators>] 
 
</rule> 

Here, keep the following points in mind:

  • The Ruleset contains the list of ...

Get WSO2 Developer’s Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.