Integration Server 10.3 | Built-In Services Reference Guide | Publish Folder | Summary of Elements in this Folder | pub.publish:publish
 
pub.publish:publish
WmPublic. Publishes a document locally or to the messaging provider.
This service broadcasts the document (that is, distributes the document to all clients that subscribe to it).
Input Parameters
documentTypeName
String Fully qualified name of the publishable document type of which you are publishing an instance.
If you intend to publish the document to a messaging provider (Broker or Universal Messaging), the publishable document type must be in sync with the associated provider definition. The provider definition is a representation of the publishable document type and its properties on the provider. In the case of Universal Messaging, this is a channel. For Broker, it is a Broker document type. If the document type and provider definition are not synchronized, publication might fail.
document
Document Document (IData object) conforming to the document type in documentTypeName.
local
String Optional. Flag specifying whether the document is to be published locally or to the messaging provider. Set to:
*true to publish locally (to this Integration Server only).
*false to publish to the messaging provider using the messaging connection alias specified in the document type of which you are publishing an instance. This is the default.
The local parameter is applicable only when the publishable document type uses Broker as the messaging provider.
If the publishable document type specifies the IS_LOCAL_CONNECTION alias, the document can be published locally only. Integration Server ignores the value of local.
A publishable document type that specifies Universal Messaging as the messaging provider cannot be published locally. If the document type in documentTypeName is associated with a Universal Messaging connection alias, Integration Server ignores the value of local.
delayUntilServiceSuccess
String Optional. Flag indicating whether the publish should happen when the pub.publish:publish service executes or after the top-level service successfully completes. If the top-level service fails, Integration Server will not publish the document. Set to:
*true to delay publishing until after the top-level service executes successfully.
Note:Integration Server does not return the status output parameter when delayUntilServiceSuccess is set to true.
*false to publish the document when the publish service executes. This is the default.
Output Parameters
status
String Status indicating whether the service was successful. Integration Server reports status only for locally published documents. A value of:
*success indicates that the service executed successfully.
Note:
If at least one subscribing trigger has room in its queue, the status is set to success.
*noSubscriber indicates that Integration Server does not contain any triggers that subscribe to the document.
*capacityExceeded indicates that the document could not be placed in the queue of the subscribing trigger because the trigger queue is currently at its maximum capacity.
Note:Integration Server reports this status only when the watt.server.publish.local.rejectOOS property is set to true.
Usage Notes
You can use pub.publish:publish to publish documents to Universal Messaging, Broker, or locally within Integration Server.
The messaging connection alias assigned to a publishable document type determines the message provider to which the Integration Server publishes the document. Only subscribers to the document type on that messaging provider will receive the published document. The Connection alias name property for the document type specifies the message provider. If there is no specified message provider alias, Integration Server publishes the document to the provider in the default messaging connection alias.
If the messaging connection alias specified for the document type does in documentTypeName does not exist when the pub.publish:publish service executes, Integration Server issues a ServiceException. Make sure to code your service to handle this situation.
Integration Server writes a message to the journal log whenever it rejects or discards a document.
For a Universal Messaging connection alias the Publish Wait Time While Reconnecting value specifies the number of milliseconds that a publishing service using alias will wait for a connection to the Universal Messaging server to be re-established after the connection fails. If Integration Server re-establishes the connection before the Publish Wait Time While Reconnecting elapses, the publishing service continues executing. If the specified time elapses before a connection is re-established, the publishing service ends with an ISRuntimeException. Make sure to code your service to handle this situation.
If the pub.publish:publish services publishes a document to Broker and outbound client-side queuing is disabled (the watt.server.publish.useCSQ property is set to "never"), Integration Server issues a ServiceException if the Broker is not available when the service executes. Make sure to code your service to handle this situation.
If the pub.publish:publish services publishes a document to Universal Messaging and use of the client side queue is disabled for the Universal Messaging connection alias, Integration Server throws an ISRuntimeException if the Universal Messaging server is not available when the service executes. Make sure to code your service to handle this situation.
Integration Server issues a ServiceException when the dispatcher is shut down during the execution of this service. In this situation, Integration Server does not save the data in the outbound document store (client side queue), and the document will not appear in the outbound document store. Make sure to code your service to handle this situation.
For more information about building a service that publishes a document locally or to a messaging provider, see the Publish-Subscribe Developer’s Guide.
See Also
pub.publish:deliver
pub.publish:publishAndWait
pub.publish:envelope