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.
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.
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.
To open an output channel manually:
Procedure
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.