In this section: How to: |
Routes contain references to transformsers, processes, and outlets. A route describes the path that a document takes during its passage through the system, after the inlet converts the input message to a document that can be processed. Multiple routes can be defined for the same channel if desired.
Transformers contain a transform component such as information to a common format suitable for general business processing. For example, similar messages from two trading partners might differ slightly in format; a common format is often desirable for business processing. Transforms are constructed using iWay Transformer. For more information, see the iWay Transformer User(tm)s Guide.
Processes perform the actual business operations on the document. A business process is composed of one or more services, with appropriate switching, testing, iteration, and error handling. Processes can call on other processes and Web services, and in turn can be packaged as Web services for external consumption. Business processes are constructed using iWay Designer. For more information, see the iWay Designer User(tm)s Guide.
Outlets pass the processed document to one or more designated recipients. They convert the document to a transport format and then emit the message.
To define a route using the iWay Service Manager Administration Console:
The Routes pane opens.
The table that is provided lists each route that is defined with a brief description. If you click the document schematic icon in the References column for a specific route, you will see which components are referencing that route. (If you click the eye icon in the View column for a specific route, and then the process icon between the two arrows, you will see a visual depiction of that route.)
The New Route Definition pane opens.
The Construct Route pane opens.
The table that is provided is used to list the components that are currently registered with the route.
The Select component type pane opens.
The table that is provided lists the component types you can select and register with the route you are defining.
Note: Each route that is being defined is required to have a registered process. The remaining components are optional during route configuration. For more information on creating a component, see Configuring iWay Registry Components.
The Select a process definition pane opens.
The table that is provided lists existing process flows you can select for the route you are defining.
You are returned to the Construct Route pane, which now includes the process (move) you registered with your route (SampleRoute).
You can now add additional components, such as a transformer or an outlet.
If you return to the main Routes pane, you will notice that the route you just defined (SampleRoute) has been added to the list, as shown in the following image.
You can modify a route by changing one of the components already defined for the route or by adding new components.
Note: If you change one of the components assigned to a route, such as a process, the component will be changed in the registry, not only in the particular route you are modifying.
To modify a route:
The Construct Route pane opens.
The table that is provided shows the component that has been registered for the route you are modifying. In this example, the move process is used.
The table that is provided lists components that are currently assigned to the selected process.
The Construct Process pane for the move process opens.
For more information on transforms, see Configuring iWay Registry Components.
The Component Properties pane opens.
The route is now modified.
To delete a route:
A confirmation dialog box opens, prompting you to confirm the deletion of the route.
The route is deleted from the system.
Tip: To delete more than one route at once, you can select multiple check boxes in the Routes pane and click Delete.
To rename an route:
The Rename pane opens.
You are returned to the main Routes pane.
The new name for the route you provided is shown.
To copy a route:
A copy of the route is made, as shown in the following image.
Making copies of a route is useful for versioning and testing purposes.
Tip: To copy more than one route at once, you can select multiple check boxes in the Routes pane and click Copy.
iWay Service Manager provides mechanisms to support routing strategies. This section describes how you can use iSM to execute business logic and route documents to a particular location. The following topics are provided:
The route processing order depends on how the routes are configured after they are added to a channel. If there are no conditions defined for the routes, the routes are executed in order from top to bottom, and you can modify the routing order by reordering the place of a route on the list. If you assign conditions to one or more routes on a channel, a document is routed according to whether it meets the conditions of one of the routes.
The following image shows the order of routes before the modification.
The following image shows the order of routes after the pfivpws route was moved up.
At least one of the routes assigned to a channel must be the default. If conditions are assigned to the route(s) on a channel and if a document does not meet the conditions assigned, the document is handled by the default route.
The placement of the default route matters if there are no conditions on the routes assigned to a channel.
The following image shows the set default icon.
The set default icon on the route you modified now appears as active.
As a document moves through a channel, you can apply conditions to the routes assigned to the channel to direct the flow of the document dynamically based on the document's contents. The particular route that the document takes is therefore selected based on whether the document matches the conditions. If none of the conditions on the route(s) is met, the document will be handled by the default route. If no default route is set, the message will not be handled.
You can also control the routing of a document by specifying whether a channel allows fixed or dynamic routing. If the routing on a channel is set to fixed, a selected route in the channel remains in force for the duration of the messaging process. Dynamic routing, which is the default when a channel is created, allows the channel to evaluate the message at each stage in the document processing to determine which route to use. For more information on fixed and dynamic routing, see Specifying Fixed or Dynamic Routing.
The conditional routing and test feature supports complex expressions and a wide range of tests that can be performed. It compiles a complex expression the first time that it is encountered and uses the compilation in subsequent testing. This feature results in faster processing.
A requirement of conditional routing is that the function return a value of true or false, as do the COND(), ALL(), and ANY() functions as well as the _IS and _HAS functions.
You can use other functions that return a value and test their result in the COND(), ALL(), and ANY() function. Examples include the _LENGTH() and _SUBSTR() functions.
For more information on using functions, see the iWay Service Manager Component and Functional Language Reference Guide.
You add conditions to routes after the route has been added to a channel. In this way, you can reuse routes that have already been defined and customize them to perform the document processing required by each channel.
The Set Condition pane appears, as shown in the following image.
If no condition is set, iWay Service Manager first checks the route tag in the document to see if it matches the route name.
The route is updated with the condition.
iWay Software |