Predefined iWay Enable Services

In this section:

iWay Enable is delivered with a set of predefined services (also known as agents) that are used within the iWay Enable sample demo applications. You can use these services in any iWay Service Manager application, in the same way that other iWay services are used.


Top of page

x
Accumulator Service (com.ibi.agents.Accum)

The Accumulator service is used when you need to collect data within an iterative process flow and then deliver it as a single composite data element.

The Accumulator service performs two functions.

The Accumulator service is used in the REST style service demo application (Addrest), which is packaged with iWay Enable. In the Addrest demo application, the Accumulator service collects the data that matches a given search string and then returns the cumulative result set. For more information on the Addrest demo application, see Deploying the Century Cellular Corporation Demo Application.

When the Accumulator service collects documents, it appends one document to another. It stores the result internally in the accumulation variable. After the process is complete, you can dump the cumulative document.

You can define the Accumulator service on the Services pane of the iWay Service Manager Administration Console, as shown in the following image. You can access the Services pane under Components in the Registry section of the console. The class name for the Accumulator service is com.ibi.agents.Accum.

The Accumulator service requires values for two configuration parameters, Operation and Name, as shown in the following image.

For the Operation, you can click Accumulate Data to accumulate documents, resulting in a single document, or you can click Dump Data to return the cumulative document to the process flow thread.

For the Name, you can type the name of the accumulation.


Top of page

x
Apache Ant Script Service (com.ibi.agents.Ant)

This service enables you to run an Apache Ant script at any point in the processing of a document. You can run scripts that perform external tasks during normal processing of a message, or you can run initialization scripts at any point at which the service is accessible.

The Apache Ant Script service is used in the Century Cellular Corporation (CCC) demo application, which is packaged with iWay Enable. In the ccc.rearm process flow of the demo application, the Apache Ant Script service runs a build script. The build script simulates incoming transactions by unzipping a data file into an incoming directory for further processing. For more information on the CCC demo application, see Deploying the Century Cellular Corporation Demo Application.

You can define the Apache Ant Script service on the Services pane of the iWay Service Manager Administration Console, as shown in the following image. You can access the Services pane under Components in the Registry section of the console. The class name for the Apache Ant Script service is com.ibi.agents.Ant.

The configuration parameters for the Apache Ant Script service are shown in the following image.


Top of page

x
Realtime Token Replacer Service (com.ibi.agents.Replacer)

The Realtime Token Replacer service enables you to transform any incoming string by applying token replacement logic as specified in the configured property file. With this feature, a single service can execute complex replacement logic on an entire incoming document. The Realtime Token Replacer service is key to the implementation of iWay Enable gauges and charts.

You can define the Realtime Token Replacer service on the Services pane of the iWay Service Manager Administration Console, as shown in the following image. You can access the Services pane under Components in the Registry section of the console. The class name for the Realtime Token Replacer service is com.ibi.agents.Replacer.

The configuration parameters for the Realtime Token Replacer service are shown in the following image.

You can represent the configuration parameters for the service by either:

For the Input String and Property File parameters, you can type any valid iFL statement that is evaluated at run time. This feature provides extensive flexibility. It allows you to use conditional statements and various look-ups to set the Input String, which needs to be transformed, based on the replacement rules specified in the property file. The replacement rules can also be dynamically discovered, based on a given condition.

A property file that is configured for the Realtime Token Replacer service contains a set of rules that are executed on a given document string. It can also contain iFL expressions, giving it even greater run-time flexibility. This feature enables the Realtime Token Replacer service to transform documents based on a given set of replacement conditions, instead of running the document through a full iWay transformation.

The file is formatted as a Java property file:

SearchString=ReplacerString

ReplacerString can be a complex iFL expression, such as one that is used in driving the gauges and charts within iWay Enable resources.

The property file can contain N number of entries. All the replacement rules are applied to the incoming document, allowing for complete transformation in a single path. Use of a property file also provides easy maintenance, as you can add requirements to the replacement rules, or modify them, within the file itself, without affecting message processing within iWay Enable.



Example: Sample Property File for Chart Resources

In this example, the specified search strings for the incoming document are @-clickURL and @-caption. When a search string is found, it is replaced, based on conditional statements with values stored in iWay Special Registers (SREGs).

@-clickURL=_IF(COND(SREG(click),isnotempty),_concat(clickURL='',
_IF(COND(_STARTSWITH(SREG(click),'^'),istrue),n-SREG(host-context)/
ism/enable-run/_substr(SREG(click),1),SREG(host-context)/ism/enable-run/
SREG(click)),''),'')
@-caption=_IF(COND(SREG(caption),isnotempty),SREG(caption),'')

iWay Software