Open an Output Channel Manually

About this task

You can open the output channel manually if you create and invoke a business process similar to the SWIFTNetOpenOutputChannel or SWIFTNet7OpenOutputChannel business process.

Note: Do not modify the SWIFTNetOpenOutputChannel business process because that may affect your ability to automatically open an output channel.

The business process you will need to create must rely on the output channel configuration in the SWIFTNet7 Adapter and you must have already configured this adapter with the appropriate output channel settings.

Note: This manual operation will not function if the SWIFTNet7 Adapter is not configured with the correct output channel settings or the adapter is not enabled.

You may want to manually open an output channel in these circumstances:

  • When automatically opening the output channel fails because there is a gap in the channel (that is, the channel was not closed properly) and the SWIFTNet7 Adapter was configured to open in Normal mode, which will cause the open request to fail because it will need to be opened in Force mode. To resolve this issue, you can manually invoke the SWIFTNetManualOpenOutputChannel business process (see example below) with the Force mode equal to TRUE.
  • When the SWIFTNet7 Client service encounters an error when sending a message using the output channel, and this sets the status to LOCKED. To resolve this issue, you can manually invoke the SWIFTNetManualOpenOutputChannel business process (see example below) with the Force mode equal to TRUE.
  • When you close the output channel manually and need to open the output channel again. In this situation you can manually invoke the SWIFTNetManualOpenOutputChannel business process (see example below) with the Force mode equal to FALSE.

This is the sample SWIFTNetManualOpenOutputChannel business process to open an output channel manually:

<process name="SWIFTNetManualOpenOutputChannel">
		<sequence name="SWIFTNetManualOpenoutputChannel">
			<operation name="set user token">
				<participant name="SetUserToken"/>
				<input message="SetUserTokenMessage">
						<assign to="USER_TOKEN">admin</assign>
						<assign to="." from="*"/>
				</input>
			</operation>
			<!-- build Open request -->
			<operation name="Service">
					<participant name="SWIFTNet7ClientService"/>
					<output message="openOutputChannelRequest">
							<assign to="." from="*"/>
							<assign to="forceOpen">TRUE</assign>
							<assign to="serverAdapterName">SWIFTNetServer7Adapter</assign>
					</output>
					<input message="inmsg">
							<assign to="." from="*"/>
					</input>
				</operation>
			</sequence>
</process>

You can supply values for the forceOpen parameter (this is an optional parameter and the default value is FALSE) and the serverAdapterName parameter (this is an optional parameter and the default value is SWIFTNetServerAdapter) in the business process above. The forceOpen parameter indicates whether to open in Force mode (if set to TRUE) and the serverAdapterName parameter indicates where to get the output channel configuration from (from which instance of the SWIFTNet7 Adapter). If you are using the default SWIFTNet7 Adapter, you do not need to specify this parameter.

Note: The adapter must be enabled when you execute this business process.

To open an output channel manually:

Procedure

  1. Configure and enable the SWIFTNet7 Adapter.
  2. Create a new business process based on the example above and name it SWIFTNetManualOpenOutputChannel.
  3. Supply the following parameters in the business process:
    • forceOpen, which indicates whether to open in Force mode (if set to TRUE). This is an optional parameter and the default value is FALSE.
    • serverAdapterName, which indicates where to get the output channel configuration from (from which instance of the SWIFTNet7 Adapter). Three parameters are required: outputChannelName (the output channel name), serverAdapterName (the SWIFTNet7Adapter name), and queueName (the queue name).
  4. After you have finished editing, save the business process.
  5. Execute the business process you created, SWIFTNetManualOpenOutputChannel, to send the Open Output Channel request.
  6. If the business process successfully completes, the output channel has been opened successfully. If an error occurs, you should check the output channel configuration in the SWIFTNet7 Adapter.

Results

Once the output channel is open, you can send messages using this output channel. The resend scheduler should work automatically in the background until the SWIFTNet7 Adapter is disabled.