Basic Techniques

In this section:

The following sections describe basic techniques that can be considered when creating application consoles for iWay Service Manager.


Top of page

x
Using the _PROPERTY() Function

The _PROPERTY() function takes three arguments:

  1. The path to a properties file. In most cases, it is a best practice to store this value in a special register (SREG).

    Note: The standard special register, iwayworkdir, locates the configuration directory. This is a convenient place to store a property file. For example:

    sreg('iwayworkdir')/my.properties
  2. The name of the required property.
  3. A default value to return if the property can not be resolved.

The properties file uses the standard format for Java properties, key=value, and may include comment lines beginning with # characters.

The properties file is loaded into memory when the _PROPERTY() function is first invoked. At each subsequent invocation, the last modified time of the properties file is checked. If the file has been modified since the previous invocation, the properties in memory are refreshed from the file.


Top of page

x
Configuring an NHTTP Listener for Use With an Application Console

The NHTTP listener provides several parameters that can be useful when developing application consoles. The following table lists and describes these parameters.

Parameter

Description

Allowable Clients

Access to the NHTTP listener is restricted only to the host names and IP addresses in the supplied list.

SSL Client Authentication

When set to true, only clients with certificates in the trust store of the listener (for example, the trust store for the SSL Context Provider used by this listener) are allowed to connect.

GET Handling

When set to event, HTTP GET requests create an XML event document that is sent to the process flow. This can be useful during the development of a dynamic application console. For more information, see Sample Application Console (Red Console).

Response Content Type

You must set the response content type accordingly since the application console often returns HTML documents.

The following image shows the Configuration pane of an NHTTP listener in the iSM Administration Console.



x
Configuring Conditional Routes

The behavior of an application console channel is determined by the URL of an incoming request. As defined by the GET Handling parameter for the NHTTP listener, the elements of the URL are included in a GET event document. In theory, it would be possible to handle all possible events in a single, complex process flow. However, in most cases, it is simpler and more extensible to use several simple processes and conditional routing. This section provides an overview of how to configure a conditional route.

  1. Using the iSM Administration console, configure inlets, outlets, and routes as required.

    For more information on how to create and configure channels in iSM, see the iWay Service Manager User’s Guide.

  2. Create a channel with your inlet and outlet, and then add a route.

  3. In the Conditions column, click the small icon with a blue plus sign next to the route that you added.

    The Set Condition pane opens, as shown in the following image.

  4. Enter your condition using iSM runtime function syntax.
  5. Click Update when you are finished.

    You are returned to the previous Construct Channel pane. Notice that the small icon with a blue plus sign has changed to a small blue pencil, which indicates that a condition has been specified.

  6. To set the route as a default route, click the small gray icon next to the plus sign/pencil condition icon.

    When you have set the route as the default, the icon changes to blue.


iWay Software