Use Sterling B2B Integrator to Copy a File to a Sterling Connect:Direct for UNIX Node

In this sample, shown in BPML, the Sterling B2B Integrator CopyToCDUX business process passes a document to the Connect:Direct Server Adapter (PNODE) which copies the file to the Sterling Connect:Direct® for UNIX node (SNODE). The business process functions much like a Sterling Connect:Direct process.

In the first operation of the CopyToCDUX business process, the File System Adapter collects (reads) the invoice.dly file from the Sterling B2B Integrator local file system. This file becomes the primary document of the business process.

The second operation uses the CD Server Begin Session Service to establish a connection to the remote Sterling Connect:Direct for UNIX node, CDUX. The local node name of the Connect:Direct Server Adapter is SI51CD. The Begin Session Service uses the remote user ID of cduser to authenticate to the Sterling Connect:Direct server.

The third operation uses the CD Server CopyTo Service to copy the primary document to the remote Sterling Connect:Direct server. The destination file name is daily.inv. The Sysopts specifies that the file datatype of the file is text and the file is not translated. The Session Token created by the CD Server Begin Session Service identifies the session that is established with the remote Sterling Connect:Direct node. The SessionToken value in the CD Server CopyTo Service ensures that this service copies the file using the session initiated by the CD Server Begin Session Service.

The fourth operation uses the CD Server End Session Service to terminate the session with the Sterling Connect:Direct server.

Note: To see BPML source code like the example shown below, select View > Source while using the Sterling B2B Integrator Graphical Process Modeler (GPM). To see the business process as depicted in the GPM user interface, select View > Graph.
  <process name="CopyToCDUX">
  <sequence>
<operation name="File System Adapter">
      <participant name="CollectForCD"/>
      <output message="FileSystemInputMessage">
        <assign to="Action">FS_COLLECT</assign>
        <assign to="filter">invoice.dly</assign>
        <assign to="collectionFolder">/daily/tran</assign>
        <assign to="deleteAfterCollect">false</assign>
        <assign to="." from="*"></assign>
      </output>
      <input message="inmsg">
        <assign to="." from="*"></assign>
      </input>
    </operation><operation name="CD Server Begin Session Service">
      <participant name="CDServerBeginSession"/>
      <output message="CDServerBeginSessionServiceTypeInputMessage">
        <assign to="LocalCDNodeName">SI51CD</assign>
        <assign to="RemoteCDNodeName">CDUX</assign>
        <assign to="RemotePasswd">xxxxxxxx</assign>
        <assign to="RemoteUserId">cduser</assign>
        <assign to="UsingObscuredPasswd">NO</assign>
        <assign to="." from="*"></assign>
      </output>
      <input message="inmsg">
        <assign to="." from="*"></assign>
      </input>
    </operation>
    <operation name="CD Server CopyTo Service">
      <participant name="CDServerCopyTo"/>
      <output message="CDServerCopyToServiceTypeInputMessage">
        <assign to="RemoteFileName">/invoices/daily.inv</assign>
        <assign to="Sysopts">:datatype=text:xlate=no:</assign>
        <assign to="SessionToken" from="//BeginSessionResults/SessionToken/node()">
        </assign>
        <assign to="." from="*"></assign>
      </output>
      <input message="inmsg">
        <assign to="." from="*"></assign>
      </input>
    </operation>
    <operation name="CD Server End Session Service">
      <participant name="CDServerEndSession"/>
      <output message="CDServerEndSessionServiceTypeInputMessage">
        <assign to="SessionToken"
         from="//BeginSessionResults/SessionToken/node()"></assign>
        <assign to="." from="*"></assign>
      </output>
      <input message="inmsg">
        <assign to="." from="*"></assign>
      </input>
    </operation>
   </sequence>
</process>