Apama Documentation : Connecting Apama Applications to External Components : Working with Connectivity Plug-ins : Using Connectivity Plug-ins : Creating dynamic chains from EPL
Creating dynamic chains from EPL
You can define chains under the dynamicChains section of the configuration file which are not tied to a specific dynamicChainManager. These chains are not created on startup. Instead, multiple instances of these chains can be created on demand from EPL using the ConnectivityPlugins EPL API. There is a static method on the com.softwareag.connectivity.ConnectivityPlugins event type:
createChain(string chainInstanceId, sequence<string> channels, string chainDefnName, dictionary<string, string> substitutions) returns Chain;
Calling this method creates and starts a new instance of a chain defined under dynamicChains and returns a com.softwareag.connectivity.Chain object which can later be used to destroy the chain via the destroy() method.
The arguments to createChain are:
Argument
Description
chainInstanceId
The identifier to use for the new chain instance. This identifier is used for logging, and it must be unique.
channels
A sequence of channels to which this chain is to be subscribed in the correlator. Events sent to these channels from EPL are delivered to this chain.
chainDefnName
The name of a chain defined under dynamicChains in the configuration file. This must not be for a transport which has a dynamicChainManager.
substitutions
A map of key-value pairs to be substituted into the chain definition using @{key} syntax.
At the point when createChain returns, the chain is created and able to receive events. The chain exists until either the correlator is shut down or the .destroy() method is called on the Chain object returned by createChain.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback