Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

This article describes how you can build Message Center Editor-style routing inside a single IWS translator. This kind of routing allows you to route different messages to different translators based on conditions derived from incoming data fields.

The router's main function is to look at the incoming message (one of the many messages which comes in the data file) and, based on values in this message, route it to one translator or another. For example, a BUY trade may need a different treatment than a SELL. And you may need yet another mapping for CANCELs.

In this example, you create multiple translators (although they are just dummies) and you add router choices. The router choices are essentially just expressions, based on which a specific message goes to one translator or another.

On this page

Create a Simple Workflow

You can create a simple workflow with a Begin shape, Task Translator shape, and End shape. In this example, you create a solution that is not based on an existing template.

Open IWS and create a simple solution by dragging a Begin shape, a Task Translator shape, and an End shape from the toolbox onto the worksheet.

Workflow with Begin, Task Translator, and End Shapes

When you drop the Task Translator shape onto worksheet, it becomes an empty "shell" of the translator, This is fine if you are just building a sketch of your future workflow, But eventually you need to provide the details, such as how the messages will be routed inside the translator, and how they will be mapped from the incoming format to the outgoing format. 

Provide Task Translator Details

When you drop the Task Translator shape onto worksheet, it becomes an empty "shell" of the translator, This is fine if you are just building a sketch of your future workflow, But eventually you need to provide the details, such as how the messages will be routed inside the translator, and how it will be mapped from the incoming format to the outgoing format. 

To provide those details: 

  1. Double-click the Task Translator shape, task_translator. 
    You see the Add task box.
  2. In the Name box, enter the name of the translator, and then click OK.
    Add Task boxYou see the Select parameters box. In the Select Parameters box, you provide information about incoming and outgoing data formats.
  3. In this example, it is sufficient to select  Delimited File for delimited (CSV) on both the Source Format andDestination Format tabs, and click Apply. 
    (Do not worry about adding other details for the purpose of this example).
    Select Parameters box

    After you click the Apply button (and ok the warning about deprecated classic mode), the system finally creates your translator, Right away, the system opens the translator tab, where you see the routing diagram with the MessageRouter shape, identified with a red box in the following figure. Notice that the Processing Tasks options are now available in the Toolbox pane.
    Translator tab

    The next time you double-click the Task Translator shape in the diagram (the shape with the gears), you see this translator tab immediately. You perform the creation/initialization part of the setup just once. The content of the toolbox is different, because you are now in the "second level" of design – inside the task_translator.


    There is also a "third level" of design. You can double-click the router (MessageRouter shape in red box in the previous figure). When you do so, you see the Router's Choice option in the Objects toolbox.
    Router's Choice option

    Alternately, you can double-click the translator (MessageTranslator shape #4 in the prior figure) to define the mapping, which is also at the third level of design. 

Define Routing Expressions and Mappings

After you create the translator, you can define routing expressions and mappings.

When you define routing expressions and mappings in more granular level tabs and save them, the system does not automatically refresh the diagram shown in the higher level router_translator tab. You must refresh the router_translator tab information manually to reflect your most recent changes by clicking Apply settings from the router worksheet button on the worksheet.

To define routing expressions and mappings:

  1. Double-click the router translator shape to add and manage routing expressions.Router Translator Tasks
    You see the "third level" of design. 
  2. In the Objects toolbox, drag one or more Router's Choice elements onto the worksheet. 
    The router's choice is a shape which holds the condition (expression). Based on that condition, a specific message is routed to one translator or another. There is a default choice as well. The system uses the default choice if none of the provided conditions are met, that is, if none were evaluated to true.
  3. Populate an expression for the router and enter a value for the Description property, which is an info label visible in the router translator. 
    For ease of mapping, you can also add the Source grid to the worksheet, but it is not necessary.
    Set Up Router's Choice Elements
  4. Click the router_translator tab and then click Apply settings from the router worksheet button below the router block to refresh the worksheet.
    The canvas expands to show you the newly added router's choices.
    View Router's Choices
  5. In the Processing Tasks toolbox, drag two Message Translator tasks and drop them to the right of each router choice, Then connect the elements. 
    In the following example, Translator1 and Translator2 are currently just empty shapes.
    Create Translator1 and Translator2 Shapes
  6. Double-click the Translator1 and Translator2 shapes and define the mapping for each one.
    Define Translator1 and Translator2 Mappings
    By default, outbound rules group incoming data.
  7. To avoid that situation, and to have line-by-line routing instead, click the router_translator tab, and then click Properties.
  8. Clear the Enable Grouping check box in the router translator's Worksheet Properties dialog box.
    Worksheet Properties Box - Enable Grouping check box
  9. Click Publish.
    In the Publish Solution preview screen, you can now see that the stream contains additional translators, and there are appropriate mapping expressions in the rsf file.
    Publish Solution window




  • No labels