Adapter Development Kit 9.12 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Using the Services for Managing Namespace Nodes | Connection Services | wm.art.dev.connection:createConnectionNode
 
wm.art.dev.connection:createConnectionNode
This service creates a new connection node in the specified package and folder, and initializes the connection in a disabled state.
You must perform the following steps to populate the input pipeline:
1. Use wm.art.dev.connection:fetchConnectionManagerMetadata service to identify the supported connection manager properties and configure the connectionManagerSettings input parameter.
*All connection manager properties have default values.
*The default value is set in the defaultValue metadata attribute.
*You can use the default values or override them with values that conform to the underlying data types of the properties.
*The property values are not automatically set to their default values; you must explicitly set all the required properties.
*If you omit a property, then no attempt is made to locate and assign default values to the property.
*The connection manager properties may be optional or a required property.
*A required property is identified when the isRequired metadata attribute is set to true.
*The absence of the isRequired attribute implies that the property is not required.
*If you fail to set a required property, the wm.art.dev.connection:createConnectionNode service throws an exception.
*You may have properties that might be required, based on the current value of some other property.
*The poolable connection manager property is always required.
*The remaining connection manager properties depend on the value of poolable property.
*If poolable is set to true, then the remaining connection manager properties must be assigned values as well.
*If poolable is set to false, you may omit the remaining connection manager properties.
2. Use wm.art.dev.connection:fetchConnectionMetada service to identify the connection-specific properties and configure the connectionSettings input parameter.
*Connection-specific properties may or may not have default values, depending on the specific adapter's implementation.
*Depending on the underlying data type of the property, it might not be possible to assign a default value to a connection specific property.
*You may use the default values or override them with values that conform to the underlying data types of the properties.
*The property values are not automatically set to their default values; you must explicitly set all the required properties.
*If you omit a property, then no attempt is made to locate and assign default values to the property.
*Connection-specific properties may be optional or a required property.
*A required property is identified when the isRequired metadata attribute is set to true.
*The absence of the isRequired attribute implies that the property is not required.
*If you fail to set a required property, the wm.art.dev.connection:createConnectionNode service throws an exception.
*You may have properties that might be required, based on the current value of some other property.
*The number of properties to be configured is adapter-dependent. At a minimum, set those properties whose isRequired attribute is set to true.
3. Enable the connection using the pub.art.connection:enableConnection service.
For more information, see the webMethods Integration Server Built-In Services Reference for your release.
The resource domains registered by the connection factories are set in the connection's properties according to the interdependencies between the resource domains. Knowledge of these interdependencies is adapter-specific, and beyond the scope of this service. This service does not interpret resource domains.
Input Parameters
Name
Description
connectionAlias
String. Required. Name of the connection in the format: folder:node.
packageName
String. Required. Package where the connection is installed.
adapterTypeName
String. Required. Name of the adapter. Same as the value returned by calling WmAdapter.getAdapterName method.
connectionFactoryType
String. Required. Fully qualified path of the connection factory implementation class.
connectionManagerSettings
IData. Required. Structure for passing connection's manager property values. The connection's manager property are predefined for all connections
poolable
Boolean. Required. Determines whether to pool the connection.
Note:
If poolable is false, then the following property values are not used:
*minimumPoolSize
*maximumPoolSize
*poolIncrementSize
*blockingTimeout
*expireTimeout
minimumPoolSize
Integer. Minimum number of connections retained in the pool.
maximumPoolSize
Integer. Maximum number of connections retained in the pool.
poolIncrementSize
Integer. Number of connections to add to the pool when additional connections are needed without exceeding the maximumPoolSize value.
blockingTimeout
Integer. Milliseconds to wait for a connection.
expireTimeout
Integer. Milliseconds of inactivity that may elapse prior to destroying the connection.
connectionSettings
IData Required. Structure for passing a connection's property values. The actual connection properties and their underlying data types vary from adapter to adapter. You must set a connection property's value in accordance with its data type. To determine the value, call the service wm.art.dev.connection:fetchConnectionMetadata and note the parameterType attribute for that property.
systemName
String. Internal name of the property.
For more information about the predefined connection manager properties, see wm.art.dev.connection:fetchConnectionManagerMetadata
For more information about the adapter-specific connection properties, see wm.art.dev.connection:fetchConnectionMetadata
Output Parameters
None.
Example
You must construct connectionManagerSettings and connectionSettings to create a connection node. The value of property's systemName is the internal name of the property. When constructing the connectionSettings input parameters, use this internal name as the key for setting a property's value. For example, if a connection defines a property named hostPort, then its systemName returned by wm.art.dev.connection:fetchConnectionMetadata service is hostPort. If the caller is a Java application, it might then use this information to set this property's value as follows:
IData pipeline = IDataFactory.create();
IDataCursor pipeCursor = pipeline.getCursor();
.
.
.
IData connSettings = IDataFactory.create();
IDataCursor connCursor = connSettings.getCursor();
connCursor.insertAfter("hostPort", new Integer(1234));
.
.
.
pipeCursor.insertAfter("connectionSettings", connSettings);
.
.
.
In this example, the hostPort property takes a java.lang.Integer value.