In this section: How to: |
Special registers are named tokens that contain information available to services. You can use special registers in:
Special registers are accessed by their token name, SREG(sregname).
Some special registers are completed automatically by iWay Service Manager (iSM) during operation. For example, the correlation ID of a message from a queue (for example, JMS, MQ, or SONIC) can be obtained by SREG(correlid). An emitter with the property correlid= that is used to set the correlation ID might be set to SREG(msgid) so that the reply is correlated with the incoming message.
You can define other special registers to the iSM configuration by using the defined special register facility. You can also use a defined special register elsewhere in the configuration and as a value substitution in a document. This feature enables you to define a value, such as a queue manager name, in one place and reference it in another. A system with a dozen MQSeries listeners would then need to change the queue manager name only in one place.
In addition, you can use a special register in the LDAP function as a value for the filter, enabling a search on a complex name without having to spell it out in several places.
To display system-wide special register names and values:
The Register Settings pane opens.
The name, value, and data type for the special registers in use are displayed.
To display special registers (register sets) for a channel:
The Registers pane opens.
The special register sets used by various conduits are displayed in this pane. In this example, the special register set for a channel called javadoc is shown.
You can use the Registers pane to define groups of registers that can be assigned to channels and process flows (in iWay Designer). These registers may be used to configure components of a channel and process flow, or used by these components at run time in the case when components refer to registers.
The Register set pane for the javadoc channel opens.
This table lists the names, types, values, and descriptions of registers that belong to a register set. For example, javadocport is a register that has been defined for the javadoc register set.
To see where the javadocport register is actually being used, you can look at the inlet of the javadoc channel, which is an HTTP listener.
To use the register set for a channel, the SREG definition must fully qualify the register set, for example, SREG(javadoc.javadocport). Notice the period that separates the register set from the actual register name defined within the register set.
The following image shows the Listeners pane for the javadoc listener.
Notice the Port field, which contains the following value:
SREG(javadoc.javadocport)
This procedure uses a special register to configure an emitter. For example, to send reply mail to the sender, you can configure an email emitter as follows:
Destination=SREG(from)
To use a special register:
The Emitters pane opens.
The Select emitter type pane opens.
Configuration parameters for the email emitter are displayed.
The following pane, which contains a Name and Description field for the emitter is displayed.
Once executed, this emitter will send an email message to the recipient using the address defined in the special register SREG(from).
You can enrich a document by referring to a special register that supplies content for the document. For example, you can update the following document with the name of the sender of the email message.
<document> <sender></sender> </document>
To place the name of the sender of the email in the document code:
<document> <sender>SREG(from)</sender> </document>
After execution, the document is enriched as follows:
<document> <sender>John_Smith@iWaysoftware.com</sender> </document>
Processing a document using this method requires that the EvalWalk service be configured and chained. For more information, see the iWay Service Manager Component and Functional Language Reference Guide.
iWay Software |