...
Code Block |
---|
|
<Rule Name="SimpleRule">
<Condition>
<Inclusion>
<FieldEqualsTo Field = "35">
<Val>D</Val>
<Val>G</Val>
<Val>F</Val>
</FieldEqualsTo>
</Inclusion>
<Exclusion/>
</Condition>
<ActionIfTrue>
<TryCopyField SourceField ="11" TargetField ="95011" />
</ActionIfTrue>
<ActionIfFalse>
<StopProcessing/>
</ActionIfFalse>
</Rule> |
...
Conditions are within <Condition> element and Actions are within <ActionIf> tags in the example. Rules with no Actions (<ActionIfTrue>, <ActionIfFalse>) elements are ignored during rules execution. Rules with no <Condition> element are applied for all FIX messages unconditionally.
<ActionIfTrue>, <ActionIfFalse> elements
There are two optional action blocks – ActionIfTrue and ActionIfFalse. Success actions will be executed one-by-one once rule’s conditions evaluated as true. Otherwise, ActionIfFalse actions sequence will be executed.
<Condition> elements
Conditions are used for rule triggering. <Condition> element can consist of two elements - <Inclusions> and <Exclusions> (both are mandatory). Check's value for <Inclusions> tag is calculated as is. Check's value for <Exclusions> tag is inverted (logical NOT) after calculation. There is only one attribute ("Name", optional) in this element. It is unique within current XML configuration file.
Here are two examples:
Code Block |
---|
| <Condition Name="IsOrderFlow"> |
<Inclusion> <FieldEqualsTo
<Inclusion>
<FieldEqualsTo Field="35"> |
| There is only one concrete check in the example - the FieldEqualsTo check. The condition is evaluated as true in case of 35th tag in a message is equal to one of D, G, F, 8, 9 value only. |
Code Block |
---|
| <Condition Name="NotIsOrderFlow"> |
<Exclusion> <FieldEqualsTo
<Exclusion>
<FieldEqualsTo Field="35"> |
FieldEqualsTo> FieldEqualsTo>
</Exclusion> |
| In the example the condition is evaluated as true in case of 35th tag in a message is not equal to one of D, G, F, 8, 9 value only. |
...