WebSphere MQ Suite Close Queue Service
The WebSphere MQ Suite Close Queue service is used with the other WebSphere MQ Suite services to send and receive messages from a WebSphere MQ server.
The following table provides an overview of the WebSphere MQ Suite Close Queue service:
Category | Description |
---|---|
System Name | WSMQCloseQueue |
Graphical Process Modeler (GPM) categories) | All Services, Messaging |
Description | Used as part of the WebSphere MQ Suite to close a queue. |
Business usage | Used in conjunction with the other WebSphere MQ Suite services to send and/or receive messages from a WebSphere MQ server |
Usage example | Should be called after all puts and/or gets have been performed to a given queue. |
Preconfigured? | Yes – a default instance is created during install, which can be used by all business processes. Default instance name is WSMQ_CloseQueue |
Requires third-party files? | com.ibm.mq.jar version 5.2.0 or higher and associated message catalog property files (i.e. mqji_en_US.property). These files need to be installed using install3rdParty. |
Platform availability | All supported Sterling B2B Integrator platforms |
Related services | Related services:
|
Application requirements | You must have a WebSphere MQ server. |
Initiates business processes? | No. This service does not invoke business processes or process any business process documents. |
Invocation | Invoke the default instance in a business process and specify the appropriate parameters |
Business process context considerations | This service is not mandatory but is recommended to ensure expected results. The Close Session service will automatically close any queues still open. Furthermore, the Queue Manager will close any handles still opened once disconnected. |
Returned status values | Returned status values:
|
Restrictions | None |
Persistence level | Default |
Testing considerations | While testing this service, it is recommended to turn on debugging (wsmq_debug=Yes), which provides useful information if problems occur. |
Implementing the WebSphere MQ Suite Close Queue Service
There are no steps required for implementing this service. The default configuration, WSMQ_CloseQueue, is ready for use as soon as Sterling B2B Integrator is installed. However, you can edit the service's parameter settings for specific business processes in the GPM.
Setting Up the Service in the GPM
Use the field definitions in the following table to set up the service configuration in the GPM:
Field | Description |
---|---|
Config | Select the name of the service configuration from the list. |
Queue Name(wsmq_qname) | The name of the queue to close. Required. Valid value is alphanumeric. |
Parameters Passed From Business Process to Service
The following table contains the parameters passed from the business process to the WebSphere MQ Suite Close Queue service:
Parameter | Description |
---|---|
Queue Name(wsmq_qname) | The name of the queue to close. Required. Valid value is alphanumeric. |
wsmq_sessionid | The session identifier to use from a previously established session. Valid value is the value from a previously opened session. Required. |
Business Process Example
The following example illustrates how the WebSphere MQ Suite Close Queue service can be used in a business process:
<process name = "PUTexample">
<sequence name="OpenSession">
<operation name="Open Session">
<participant name="WSMQ_OpenSession"/>
<output message="toService">
<assign to="." from="*"/>
<assign to="wsmq_hostname">some_host_name</assign>
<assign to="wsmq_channel">some_channel_name</assign>
<!-- <assign to="wsmq_debug">Yes</assign> -->
</output>
<input message="fromService">
<assign to="." from="*"/>
</input>
</operation>
<sequence name="SessionOpened">
<operation name="Open Queue">
<participant name="WSMQ_OpenQueue"/>
<output message="toService">
<assign to="wsmq_sessionid" from="string(wsmq_sessionid)"/>
<assign to="wsmq_qname">some_queue_name</assign>
<assign to="wsmq_MQOO_type">PUT</assign>
<assign to="wsmq_MQOO_failifquiescing">Yes</assign>
</output>
<input message="fromService"/>
</operation>
<operation name="PUT message(s)">
<participant name="WSMQ_PutMessage"/>
<output message="toService">
<assign to="." from="*"/>
<assign to="wsmq_qname">some_queue_name</assign>
</output>
<input message="fromService">
<assign to="." from="*"/>
</input>
</operation>
<operation name="Commit the PUT">
<participant name="WSMQ_Commit"/>
<output message="toService">
<assign to="wsmq_sessionid" from="string(wsmq_sessionid)"/>
</output>
<input message="fromService"/>
</operation>
<operation name="Close Queue">
<participant name="WSMQ_CloseQueue"/>
<output message="toService">
<assign to="wsmq_sessionid" from="string(wsmq_sessionid)"/>
<assign to="wsmq_qname">some_queue_name</assign>
</output>
<input message="fromService"/>
</operation>
<sequence name="CloseSession">
<operation name="Close Session">
<participant name="WSMQ_CloseSession"/>
<output message="toService">
<assign to="." from="*"/> <!—wsmq_sessionid passed by default -->
</output>
<input message="fromService"/>
</operation>
</sequence>
<onFault>
<operation name="Make sure session is closed">
<participant name="WSMQ_CloseSession"/>
<output message="toService">
<assign to="wsmq_sessionid" from="string(wsmq_sessionid)"/>
</output>
<input message="fromService"/>
</operation>
</onFault>
</sequence> <!-- end of SessionOpened sequence -->
</sequence> <!-- end of OpenSession sequence -->
</process>