Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Code Block
languagehtml/xml
 <TryCopyField SourceField = "85005" TargetField = "95005" /> 

There are two (mandatory) attributes: “SourceField” and “TargetField”. The action tries to copy tags within current FIX message.

 Absence of the tag defined by “SourceField” does not cause fail, the action is just ignored.

Code Block
languagehtml/xml
 <TryCopyField SourceField ="85005" TargetField  ="95005" DefaultValue = "NONE"/> 
 

It is possible to use default value for missed tags. Use optional attribute “DefaultValue” for this case.  

Code Block
languagehtml/xml
 <TryCopyField SourceField="126" TargetField="432" Method="UTCToLocalDate"/> 

The “Method” attribute contains the method name that uses for conversion during copying. The “UTCToLocalTime” means that the conversation from UTC time to LocalDate will be performed.

Code Block
languagehtml/xml
 <TryCopyField SourceField="18" TargetField="18" Method="Trim"/>
The “Trim” method trims spaces and tabs from SourceField and copies the resulted value into TargetField.

 

<CopyField> action

 
Code Block
languagehtml/xml
 <CopyField SourceField = "11" TargetField = "95005" />

There are two (mandatory) attributes: “SourceField” and “TargetField”. The action tries to copy tags within current FIX message. Absence of the source leads to whole rule failure.

Code Block
languagehtml/xml
 <CopyField SourceField="126" TargetField="432" Method="UTCToLocalDate"/>

The “Method” attribute contains the method name that uses for conversion during copying. The “UTCToLocalTime” means that the conversation from UTC time to LocalDate will be performed.

 

Code Block
languagehtml/xml
 <CopyField SourceField="18" TargetField="18" Method="Trim"/>

The “Trim” method trims spaces and tabs from SourceField and copies the resulted value into TargetField.

 

<RemoveField>  action

 

Code Block
languagehtml/xml
 <RemoveField>
	<Val>7729</Val>
	<Val>7730</Val>
	<Val>7731</Val>
</RemoveField>

 

The action tries to remove given list of tags from the processed FIX message. Absence of the tag does not cause fail.

 


<MoveField> action

 

Code Block
languagehtml/xml
 <MoveField SourceField ="11" TargetField ="95005" />

The action is short form for the following sequence of actions: <CopyField>, <RemoveField>.

 

 

 

<AddOrUpdateField> action

 

Code Block
languagehtml/xml
 <AddOrUpdateField Field="56" Value="NONE"/>

There are two attributes: “Field” and “Value”. The action tries to insert tag into current FIX message. If tag exists, old value is overwritten. 

 

<AddField> action

 

Code Block
languagehtml/xml
<AddField Field="56" Value="NONE"/>

There are two (mandatory) attributes: “Field” and “Value”. The action inserts tag into current FIX message. In case of presence of tag action fails.

 

<ConditionalFieldAction> action

 

<ConditionalFieldAction> action evaluates Case’s SourceValues against “Field” tag. Based on result of the evaluation it copies “Value” to “Field”. “Field” attribute is optional; “SourceField” will be used if it is omitted.

 

Code Block
languagehtml/xml
<ConditionalFieldAction SourceField="167">
  <Case SourceValue="OPT">
    <AddOrUpdateField Field="461" Value="OXXXX" />
  </Case>
  <Case SourceValue="FUT">
    <AddOrUpdateField Field="461" Value="FXXXX" />
  </Case>
  <Case SourceValue="USTB">
    <AddOrUpdateField Value="TBILL" />
  </Case>
  <Case SourceValue="RP">
    <AddOrUpdateField Value="REPO" />
  </Case>
</ConditionalFieldAction>

If (SecType (167) = 'OPT') CFICode (461) = 'OXXXX'.

If (SecType (167) = 'FUT') CFICode (461) = 'FXXXX'.

If (SecType (167) = 'USTB') SecType (167) = 'TBILL'.

If (SecType (167) = 'RP') SecType (167) = 'REPO'.

 

 

 

<RemoveFromField> action

 

Code Block
languagehtml/xml
<RemoveField<RemoveFromField Field="1955" Order="10"/>
Every action element can contain the “Order” attribute. Order is an integer value that defines a sequence of actions within a current rule.
The “Order” attribute is optional
>
  <Val>.TO</Val>
  <Val>.V</Val>
</RemoveFromField>

This action removes values from a multi value string. Absence of the values does not cause fail.

 


<KeepFields> action

 

Code Block
languagehtml/xml
<KeepFields Tags="151, 14, 30" />

The “Tags” attribute is a list of tags, which are to be copied as is. This action is a short form for the sequence of TryCopyField actions with the SourceField attribute equals the TargetField one:

<TryCopyField SourceField=”151” TargetField=”151” />
<TryCopyField SourceField=”14” TargetField=”14” />
<TryCopyField SourceField=”30” TargetField=”30” />.

 

 

 

<WeedField> action

 

Code Block
languagehtml/xml
<WeedField Field="18" />

This action replaces special characters in the given tag on the space character. The special characters are \t, \n, \r, \v, \f, \’ ,”. Absence of the tag does not cause fail.

 

<StopProcessing> action

 

Code Block
languagehtml/xml
<StopProcessing/>

The action just stops processing of current FIX message. The rest of the rules will be skip.

 

Code Block
languagehtml/xml
<StopProcessing ResultCode="94" Description=""Required tag missing: Price" />

More advanced version of the “StopProcessing” action; ResultCode and Description are used at BL layer (see <CreateReject /> action in BL configuration) to generate a reject message.

 


Multiple message transformation configurations

It is possible to define more than one file with rules. The exact list of file names is set up via BL XML configuration file. Rules are applied for processed message in the order they are appeared in the files.

 

Groups of rules and rule routing

Group of rules is a set of rules and / or other groups. It is possible to route FIX messages from concrete FIX session to given group of rules. Routing is set up via BL XML configuration.

 

 

Code Block
languagehtml/xml
<DllHandlers>
 <Handler Name="FixConvert" Description="FixConvert" DllName="BLLanguageExtension.dll" RulesDir="D:/Products/FIXEdge/FixConvert/conf" />
</DllHandlers>

Here is fragment of BL config. There is “FixConvert” handler declaration with additional parameter – path to the folder where all FixConvert configs are.

 

 

Code Block
languagehtml/xml
<RuleGroup Name="CommonRules">
  <UseRule>Add1000</UseRule>
  <UseRule>Add1001</UseRule>
  <UseRule>Add1002</UseRule>
</RuleGroup>

Here is a group named “CommonRules”.  <UseRule> element is referenced to concrete rules.

There is an optional integer attribute (“Order”) that defines the sequence of applied rules.

Code Block
languagehtml/xml
<RuleGroup Name="TNXRules">
  <UseGroup>CommonRules</UseGroup>
  <UseRule Order = "0">TNXSpecific001</UseRule>
  <UseRule Order = "1">TNXSpecific002</UseRule>
  <UseRule Order = "2">TNXSpecific003</UseRule>
</RuleGroup>

Here is a group named “TNXRules”.  It contains the “CommonRules” group defined previously and 3 additional TNX specific rules. 

<UseGroup> element is referenced to concrete group of rules.

Code Block
languagehtml/xml
<RuleGroup Name="BMXRules">
  <UseGroup>CommonRules</UseGroup>
  <UseRule Order = "0">BMXSpecific001</UseRule>
  <UseRule Order = "1">BMXSpecific002</UseRule>
</RuleGroup>

 

 

Here is a group named “BMXRules”.  It contains the “CommonRules” group defined previously and 2 additional BMX specific rules. 

 

 

BL configuration fragment:

Code Block
languagehtml/xml
<DllHandlers>
  <Handler Name="FixConvert" Description="FixConvert" DllName="fixconvert.dll" />
</DllHandlers>
<Rule>
  <Source>
    <FixSession SenderCompID="TNX" TargetCompID=".*" />
  </Source>
  <Action>
    <HandlerAction Name="FixConvert" RuleGroup ="TNXRules" />
  </Action>
</Rule>

This BL-config rule runs all TNX rules agains all messages from TNX.