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 | Overview | Polling Notification Services | wm.art.dev.notification:createPollingNotificationNode
 
wm.art.dev.notification:createPollingNotificationNode
This service creates a new instance of a polling notification in the specified package and folder from the specified notification template and connection alias, and initializes the new polling notification in a disabled state.
You must perform the following steps to populate the input pipeline:
1. Use fetchPollingNotificationTemplateMetadata service to identify the supported polling notification template properties and configure the input parameter notificationSettings structure.
*Polling notification 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 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.
*Polling notification 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.notification:createPollingNotificationNode 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.
2. This service creates a publishable document node in a notificationNamePublishDocument folder where notificationName is the value you specify for the notificationName input parameter. The name of publishable document is not configurable.
3. When a polling notification is triggered, Integration Server generates a runtime publishable output document.
*The names and types of the data fields in the publishable output document is predefined.
*Specify the names and types of the data fields in the publishable output document in the service's publishableRecordDef input parameter in notificationSettings parameter.
*The fieldNamesand fieldTypes properties of publishableRecordDef are an array of String. A one-to-one correspondence exists between the elements in these two arrays.
*The values assigned to the fieldNames and fieldTypes properties of publishableRecordDef must correspond to fields that the notification class outputs in its runNotification method.
*The service execution may fail if an empty publishableRecordDef is specified.
5. A newly created polling notification is not assigned a delivery schedule. You must configure the polling notification's delivery schedule before enabling it. Provide a valid scheduleSettings input parameter in the call to createPollingNotificationNode or updatePollingNotificationNode service.
6. You can activate the polling notification using the pub.art.notification:enablePollingNotification service.
For more information, see the webMethods Integration Server Built-In Services Reference for your release.
Note:
This service does not validate that the fields in the publishable document are actually generated by the notification.
The resource domains registered by the polling notification templates are set in the polling notification'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
notificationName
String. Required. Name of the polling notification in the format: folder:node.
packageName
String. Required. Package the polling notification is installed.
connectionAlias
String. Required. Name of the connection in the format: folder:node.
notificationTemplate
String. Required. Fully qualified pathname of the polling notification template class.
notificationSettings
IData. Required. Structure for passing the polling notification's property values.
systemName
String. Required. Internal name of the property.
*The following Java data types are supported for connections: char, short, int, long, float, double, boolean, java.lang.String, java.lang.Character, java.lang.Short, java.lang.Integer, java.lang.Long, java.lang.Float, java.lang.Double, java.lang.Boolean.
*Arrays of all the above data types are also supported.
scheduleSettings
IData. Required. Structure for specifying the scheduling properties.
notificationInterval
Integer. Frequency to poll in seconds.
notificationOverlap
Boolean. Specifies whether notifications can overlap.
notificationImmediate
Boolean. Specifies whether to invoke the notification immediately.
clusterProperties[k]
IData[]. A k-dimensioned array of cluster properties.
systemName
String. Required. Internal property name
parameterType
String. Required. Data type of the property
publishableRecordDef
IData. Required. Structure for specifying the definition of the runtime publishable output document.
fieldNames
String[]. Names of the fields used in the polling notification's output document.
fieldTypes
String[]. Data types of the fields used in the polling notification's output document.
jmsSettings
IData. Structure specifying the JMS setting.
isJMSConfigured
Boolean. Specifies whether the document is published to a JMS provider.
ConnectionAliasName
String. Required. Connection name of the JMS provider. This field is relevant if the value of isJMSConfigured is true.
DestinationName
String. Required. Name of the destination where the document is published. This field is relevant if the value of isJMSConfigured is true.
DestinationType
String. Required. Type of destination where the document is published. Possible values are:
*Queue
*Topic
This field is relevant if the value of isJMSConfigured is true.
Output Parameters
None.
Example
You must construct notificationSettings to create a polling notification node. The value of a property's systemName is the internal name of the property. When constructing the notificationSettings input parameter, you must use this internal name as the key for setting a property's value. For example, if a polling notification template defines a property named sqlCommand, then its systemName as returned by fetchPollingNotificationTemplateMetadata service is sqlCommand. 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 ntfySettings = IDataFactory.create();
IDataCursor ntfyCursor = ntfySettings.getCursor();
ntfyCursor.insertAfter("sqlCommand", "SELECT * FROM fooTable");
.
.
.
pipeCursor.insertAfter("notificationSettings", ntfySettings);
.
.
.
In this example, the sqlCommand property takes a java.lang.String value.