Message routing describes queuing and dispatching to different targets a message from/to IFS Applications. This will be based on the message type and/or the content of the message. This page describes the different ways a message may be routed and how to configure message routing rules and addresses.
SOAP_IFS
and
SOAP_SIMPLE
. Note: You may use any other envelope that is defined in the connect configuration.
UNKNOWN_XML
. NONE_XML.
Routing parameters are always located in the SOAP header and it's recommended to use :
Example of routing from SOAP_IFS
UNKNOWN_XML is the whole inbound XML strings that can't be recognized by IFS Connect as having a known envelope. Routing parameters can be located in any element or attribute in the XML string.
Example of routing from UNKNOWN_XML
NONE_XML is the whole inbound strings that is not recognized as valid XML. Routing parameters are search strings that can be located anywhere in the incoming string.
Note: This should only be used when a java-transformer is implemented (Transformation must be done from the incoming format to IFS XML).
Example of routing from NONE_XML
The location based routing uses Name and Location parameters with information
provided by the different Transport Connectors. This type of routing is very useful
when there is no way to solely use the content for uniquely identifying a message.
Please notice that these routing parameters only apply to the Connector that is
receiving the message. A file Name parameter is for example ignored if the message
is received as a mail.
The following rules can be used:
Outbound Routing Rules with value APPLICATION_MESSAGE
in the Route
From
field are used for routing of outbound messages.
Routing of outbound messages is performed in two steps:
The routing is performed in the PL/SQL code. The only goal of this stage is to find out the name of the queue the message should be put into. At this point only the following application message header fields are used:
The algorithm is trying to find a rule that matches most conditions, even if there are conditions on the rule that are not satisfied. If any rule can not be found at this point or the found rule doesn’t define any queue, the message will be placed in the ‘ERROR’ queue and its state set to 'Failed'.
The mentioned fields are created differently depending on use of PLSQL Access Provider or use of existing messages in the Connectivity outbox. See more details in the two sections below.
The routing parameters are created in the call to Post_Outbound_BizAPI
with the
following mapping.
CONNECT
bizapi_name
sender_
receiver_
Example
of outbound routing when using PLSQL Access Provider
Examples of this are Internet Transaction Services (ITS) that publish existing
IFS Applications EDI messages to XML.
The routing parameters are fetched from the Connectivity outbox header with the
following mappings.
Media_Code
from the Connectivity header eg INET_TRANSBizApi Name
Sender
from the Connectivity headerReceiver
from the Connectivity header Note: The connection between Class_Id and BizApi name is done in application server task definition
Example of outbound routing for Internet Transaction Services.
The content based routing will take place after the message has been executed. The data for routing is parsed in the following order:
When parsing application message all existing simple attributes, i.e. neither aggregates nor arrays, are taken with exception of the OBJ_VERSION attribute.
Content based conditions are used only once, i.e. only the first occurrence of an attribute or element (XML tag) matching a given condition in all three data sources will be taken. And this is independently if the condition will be satisfied or not. Therefore it is not recommended to use elements that can occur in more then one data source. The similar is valid if there are several occurrences of the same element in one data source.
If there are nested elements matching the same condition in an XML document, the most inner one will be taken. But if a condition defines an XML tag attribute, for nested tags matching the same condition the most outer one will be taken instead.
Because of the double routing mechanism there is a limitation. The rule chosen in the first step will be not necessary the same as the one chosen for the final routing in the second step. The first one does not necessary fully satisfy the source. There will be no problem as long as both rules are defined for the same queue. In other case the message will be set in state 'Failed'.
Standard routing is a very powerful mechanism, but can be quite heavy and take time, especially in an installation with many message queues and/or many routing rules. This is because every rule has to be matched against the message. In many cases the flexibility of the standard routing is unnecessary and can be replaced with a simplified, "light", algorithm, which is very quick.
Simplified Routing can be enabled for inbound and outbound messages
independently. For inbound messages only messages of type SOAP_IFS
(Route
From field in Routing Rule definition) can be routed using the simplified
routing. For outbound messages the type must be APPLICATION_MESSAGE
.
Simplified routing uses one of the four message attributes: MESSAGE_TYPE
,
MESSAGE_FUNCTION
, SENDER
or RECEIVER
.
To enable Simplified Routing go to Setup IFS Connect feature of IFS Solution Manager, choose Routing, then the appropriate type of message you want enable Simplified Routing for (INBOUND or OUTBOUND) and choose the attribute you want to use for Simplified Routing:
For inbound messages the attribute will be matched against the corresponding
SOAP_IFS
header parameter: fndcn:Type
, fndcn:Function
,
fndcn:Sender
or fndcn:Receiver
. For outbound messages
it will be the value of the corresponding attribute of the Application Message.
During the server startup all routing rules of the particular type having the
chosen parameter defined as Content based condition with operation equals
will be loaded to a hash map in the memory with the attribute value as a key.
Example rule configuration with SENDER attribute for inbound and RECEIVER for outbound messages.
On arrival the message is checked for existence of the defined attribute. If the attribute exists, the algorithm just make a simple look up in the hash map with the attribute value as a key, which will typically result in one or maybe a couple of rules only. If the attribute value is not present in the map, i.e. there are no rules with appropriate Content based definition, or attribute doesn't exist in the message, the standard routing will be used instead.
Note that the map can return a rule (or a collection of rules) that have additional conditions, which are not satisfying the message. The message will then fail with error saying that no matching rules have been found, even if there can exist other rules matching the message. Standard routing will not be used in such case.
Example
A central onshore site is configured to communicate with a number of offshore sites, each of them containing a copy of the central database. Information is replicated using IFS Connect with simplified routing.
Each site has it's own ID on form "S<nn>", where "<nn>"
represents a two-digits site number, e.g. "S25". Each time an offshore
site is sending a message with update information, it is setting it's ID in the
Sender header field of the IFS_SOAP
message.
The onshore site wants to have a separate Routing Rule for each
offshore site, thus the configuration contains as many routing rules as there
are offshore sites with the offshore site's ID specified as a Content based
condition, e.g. for site 25: Search: fndcn:Sender, Op:
equals, Match: S25
.
Outbound routing rules that has the value REPORT
as Route
From
field will be used in routing the Report Designer type reports. There
are three main attributes that can be used on routing an ordered Report Designer
type report data.
MESSAGE_TYPE
MESSAGE_FUNCTION
SENDER
Message Type define the content of the data that is generated. The content will vary with the logical printer that will be used in ordering the report. There are three main type of logical printers
When the SEND_XML_TO_CONNECT
logical printer is used, it will generate
an xml file that includes the raw data extracted by the RDF file (pl/sql code that
is specific to the report). The SEND_FULL_XML_TO_CONNECT
logical printer
will generate an xml file with all translated data and some framework added data.
The SEND_PDF_TO_CONNECT
logical printer generates the same pdf file
that is used in previewing and printing.
In routing term you can use the logical printer name as the content based condition to separately identify the content type.
Example of routing a full xml file.
There is a unique id for each and every report which is an UPPERCASE name ending
with _REP (e.g. PURCHASE_ORDER_PRINT_REP). You can use this report id when routing
the report. For this you have to define the routing rule with MESSAGE_FUNCTION
equals to the report id.
When a report is sent to connect its result key will be set in the Sender field
of the message. So you can use a routing rule that looks for the SENDER
of a given value in routing. The result key is a unique number when a new report
is generated. It has the same value when the same report is ordered over and over
again.
In general the destination address contains a separate section to be used in formatting the in and out going messages. This section describes the attributes like Envelope, Encoding and Transformers. To keep the original format of the PDF files that are routing, the destination address should not have any of the above format attributes. Otherwise it will affect the file format of the original PDF file and the end result may be a corrupted file.
Destination address of a Report Designer type Report Rule
Node Solution Manager/Integration/IFS Connect/Routing Addresses
will list all available destination addresses.
You can create a new address or edit an existing one from here. Click
Create New
to create a new destination
address. You can set the destination parameter values there.
Note: It's important to give the destination a unique description so you can see what it is. Many destinations may be defined in an operational system and this method of documenting them is very important.
The right hand side of the window enable you to enter the destination address. The content of this part will depend on the Destination Type.
Note: BizAPIs and Handler Operations are executed in separate thread using concept of Work Managers.
In those cases the file name is given it is possible to use placeholders on form %PLACEHOLDER%. The list of available placeholders is shown in a tool tip message for respective field.
Note: When the Destination Type is BizAPI the BizAPI Address has an LOV containing all BizApi's installed in the application server. It is possible to call other interfaces in the application server. Enter the operation in the format <handler>:<operation>. For example there is a predefined Routing Address 'Load Connectivity Inbox' using an interface not being defined as a BizAPI: ConnectivityProcessingHandler:LoadInboxMessage.
Note: The keyword TAG is defined with an attribute of the Application message. If there is a transformer, then the keyword TAG will get its value after the transformer is applied. If the attribute is not defined in the application message body it will give an error.
The in and outgoing files can be adjusted to this settings.
Note: Transformers can be set up in a flow, e.g. first transformer for preprocessing (removing namespace), second transformer for the next stage and so on.
Note: Transformers are stored in the database and are administrated in the IFS Connect configuration tool. Blank or None designates that no transformation is to be performed.
This will open the Channel Address Data form.
These are some optional attributes which can be used when send messages use some
customized envelops.
If you select the node Solution Manager/Integration/IFS Connect/Routing Rules
you can see a list of available rules. When you select the tab Inbound
all available inbound rules will be listed. On each rule select Show Details
in the context menu to see the detail of the selected rule.
To create a new inbound rule select tab Inbound
and press feature
toolbar button Create New
. This will open up a detail form of a new
rule with some default values. Set values there as required and press Save
button to add the new rule.
The identification of the message is done by looking at the attribute value of a node of an xml file or any string in a non xml file. The Route From defines the format of the file i.e. whether the file is an xml file, xml file with an envelop or non xml file. The default values in the drop down are
- SOAP_IFS , the message is identified according to the content of the IFS defined soap envelope.
- SOAP_SIMPLE,
- SOAP_EPAGES,
- UNKNOWN_XML, the message is identified by one or several xml nodes in a file that lacks an envelope.
- NONE_XML, the message is identified by a string in the file.
You may use any other envelop that is defined in the IFS Connect configuration.
Note: It's important to give the rule a unique description so you can see what it is. Many rules may be defined in an operational system and this method of documenting them is very important.
Enabled
or Disabled
.
Defines routing parameters on the values provided from the different transport connectors, e.g. file name given by the file connector, the URL from the Http connector etc. See Inbound Routing for location base routing parameters.
Defines the search paths in the inbound message. See Inbound Routing about the routing parameters.
Note: By clicking on the link
Destination Address
orAsynchronous Response Address
you can add/remove the Addresses link to the routing rule. The click event will pop up a dialogue box with list of all destination addresses available and by checking/unchecking the check box you can add/remove an address to/from a rule. The already selected addresses are default checked when the dialogue box popup.
Tab Outbound
in the above route condition list feature will list
all available outbound rules. To create a new outbound rule select the tab
Outbound
and press Create New
.
Distinguish from where the message is sent. The options in the list of values are:
- APPLICATION_MESSAGE - the message is from IFS Application and is concerning for a business flow. Normally a message produced by a BizApi
- REPORT - used for routing the Report Designer type reports
Note: It's important to give the rule a unique description so you can see what it is. Many rules may be defined in an operational system and this method of documenting them is very important.
Enable
or Disable
.
Defines the search paths in the outbound message-header. See Outbound Routing about the routing parameters.
With the message routing client, you can test route rules and destination addresses.
All destination addresses other than BizApi addresses can be tested in the detail
window. Open an address and click Test
toolbar button to open a test
window.
Type a message or load from a file and press Send
. The result status
will be displayed in the bottom window.
Open an inbound routing rule and click Test Content Condition
from the RMB menu.
This will open an Open File Dialog
to select the input message for
the route rule. When a file is selected, it will be matched with the current routing
rule. The result will be displayed in separate window. This functionality can be
used to check whether a particular message matches a selected inbound routing rule.
Note: This test functionality doesn't match location based conditions.
In the overview form of Inbound/Outbound routing rules you can check whether
a message matches any rule available in the system. Click Test Rules
from RMB menu. This will open a separate test window.
Enter the necessary details values and click Get Matching Rules
.
The result will be displayed in the bottom pane. If there are more than one matching
rule, the selected rule will be highlighted in boldface.