B2B Send System Service

The B2B Send system service sends messages to trading partners. It does this by retrieving and by using information from trading profiles and the associated trading profile contract to identify how and where to send information.

After you create a business process that uses the B2B Send service, the same business process can be associated with any number of contracts to send messages to the consumption profile of the contract. The following table provides an overview of the B2B Send system service:

Category Description
System name B2B_SEND
Graphical Process Modeler (GPM) category All Services
Description The B2B Send system service sends messages to trading partners. It does this by retrieving and using information from trading profiles and the associated trading profile contract to identify how and where to send information.
Business usage Use this service in a business process to send a document or message to a trading partner identified as the consumption profile (receiving partner) in a contract.
Usage example Send messages to a trading partner.
Preconfigured? Yes
Requires third-party files? Yes
Platform availability All supported Sterling B2B Integrator platforms
Related services This service is one of four services that are used in Sterling B2B Integrator for B2B communications using trading profiles. The other three services are:
  • B2B Respond service – Responds to messages from a production (sending) trading partner using trading profile information in the contract.
  • B2B Request Response service – Uses the production (sending) profile of a contract to send a request to and retrieve a response from the production trading partner.
  • B2B Lookup service – Finds trading partner contract records and retrieves profile information. It is a system service included automatically in your business process if you include the B2B Respond service, the B2B Request Response service, or the B2B Send service.
Two other services provide EDI documents that can be sent using the B2B Send adapter. These services are:
  • EDI Encoder service – Determines which enveloping services need to run and sends the document to the translator for translation, if needed.
  • EDI Enveloping service – Determines which business processes need to run to apply EDI envelopes.
Note: The EDI Encoder and Enveloping services prepare the document to be sent.
Application requirements This service runs two subprocesses: the B2B_LOOKUP business process and the transport business process specified in the consumption profile for the Send message mode. The subprocesses use information from a trading profile, including the consumption profile transport configuration parameters from a contract, to send a message.
Initiates business processes? Pre-configured to start the B2B_LOOKUP business process, which launches the transport workflow identified in the profile's transport settings.
Invocation Runs as part of a business process. It cannot be the first participant in a business process unless the business process runs as a subprocess, because it requires the b2b-contract-id as an input parameter.
Business process context considerations None
Returned status values InvokeBusinessProcess(Spawn) successfully invoked instance xxx of B2B_LOOKUP:1.
Restrictions The trading profile information and contract must be configured before using this service.
Persistence level None
Testing considerations If there is an error, go to the business process monitor (select Business Process > Monitor > Current Processes) and check the status. Also navigate through the subprocesses under this service in the process monitor.

About B2B Services and Trading Partner Setup

B2B services are dynamic services, independent of transport protocols or adapters, trading profiles, and contracts, that determine how to exchange data between trading partners. By using these services in a business process, you can eliminate the need to configure in the business process many of the details necessary to define this data exchange. All of this information has been defined in the trading profiles, and the B2B services dynamically look up the requirements in the profiles.

To communicate with trading partners, you must define a trading partner record and use at least one of the following B2B services in every business process (unless you are using the EDIINT Message service):
  • B2B Lookup Service
  • B2B Send Service
  • B2B Respond Service
  • B2B Request-Response Service

How the B2B Send Service Works

The B2B Send service is preconfigured and installed as part of Sterling B2B Integrator. No additional configuration of this service is necessary.

When using the B2B Send service in a business process:
  1. The service runs as part of the business process.
  2. This service starts the B2B Lookup service.
  3. The B2B Lookup service locates:
    • The consumption profile of the contract
    • The transport protocol of the consumption profile
    • The appropriate transport business process for the profile transport protocol (default), or the business process associated with the send message mode in the consumption profile, if specified

      The default transport business processes are:

      HTTP_SEND_ENVELOPE_OFF

      FTP_SEND_ENVELOPE_OFF

      SMTP_SEND_ENVELOPE_OFF

  4. The B2B Lookup service either runs the default business process, if none was specified in the profile, or runs the business process specified in the consumption (receiver) profile for Send message mode.
  5. The B2B Lookup service starts the appropriate communications adapter.
  6. The communications adapter sends a message to the receiver transport server that is identified in the transport section of the profile information.

The B2B Send service always runs a subprocess. (It is configured to start the B2B Lookup business process, but this process can be changed in the service configuration.) This process in turn runs another sub-process that sends the message. This is either one of the default transport businesses processes specified above or another business process identified in the consumption profile.

Note: After a business process is created that uses the B2B Send service, the same business process can be associated with any number of contracts to send messages to the consumption profile of the contract.

Business Scenario

You have invoices that are currently in XML format that you need to translate and send to several business partners. These partners require their information be sent in a variety of ways: HTTP, FTP, AS2, and SMTP, as well as in a variety of formats, including EDI 810. You want a single business process that can process all invoices, translate them to the correct format, create the necessary document envelopes, and send the invoices to each customer using the correct transport method.

To solve the business scenario, use the following example that demonstrates sending an EDI 810 document using HTTP:
  1. Create a business process (SendOutBoundDocuments) that uses the B2B Send service.
  2. Configure a consumption trading profile, a production trading profile, and a contract for these two profiles.

    The trading partner information should include a map to translate the XML document to an EDI 810 document as well as all of the required envelope and transport information. It also should reference the SendOutBoundDocuments business process in the contract definition.

  3. Create a business process (EDI_Outbound_To_TP) that uses the EDI Encoder service and the EDI Enveloping service.

    This business process uses the EDI Encoder and EDI Enveloping services to translate this information, create the document envelopes, and send it to the trading partner using the B2B Send service.

This business solution is described for both the GPM and for the Business Process Modeling Language (BPML).

GPM Configuration for the EDI_Outbound_To_TP Business Process Example

EDI_Outbound_To_TP Business Process Example
  1. The EDI_Outbound_To_TP business process receives the XML file as the primary document.
  2. The EDI Encoder service takes the sender, receiver, and lookup alias as input parameters. Based on this information, it determines which enveloping services to run and sends the document to the translator, if required.
  3. The EDI Enveloping service envelopes the document using the parameters specified in the Trading Partner configuration and then runs the SendOutBoundDocuments process specified in the contract.
  4. The SendOutBoundDocuments business process receives the enveloped document as the primary document.
  5. The B2B Send Service uses the b2b-contract-id that is in process data to identify from the trading partner setup how and where to send the document. In this example, the document is sent using HTTP.

GPM Configuration for the SendOutBoundDocuments Business Process Example

SendOutBoundDocuments Business Process Example

The SendOutBoundDocuments Business Process consists only of the B2B Send service. In this case, it always runs as a subprocess and the b2b-contract-id is in process data when it is run. There is no additional configuration required for this service in the GPM.

Process Data Example

The example below shows that the process data contains the b2b-contract-id that was output to process data from the EDI Enveloping service. This information is required in the business process for the B2B Send service to work.

Process Data Example

Contract Configuration with the SendOutBoundDocuments Business Process Example

The SendOutBoundDocuments business process is specified in the contract as shown in the Trading Partner-Contracts Business Process setup.

SendOutBoundDocuments Business Process Example

Business Process Modeling Language (BPML) Example

For a generic business process, the values have to be dynamically generated, based on the consumption profile. The following example shows the corresponding business process solution using BPML and the (hard-coded) AccepterLookupAlias, ReceiverID, and SenderID:

  • EDI_Outbound_To_TP Business Process
    BPML Example
  • SendOutBoundDocuments Business Process
<process name="SendOutBoundDocuments">
 <sequence name="Main">
 <operation name="B2B Send">
  <participant name="B2B_SEND"/>
  <output message="B2B_SEND_SERVICEInputMessage">
  <assign to="." from="*"></assign>
  </output>
  <input message="inmsg">
  <assign to="." from="*"></assign>
  </input>
 </operation>
 </sequence> 
</process>

The Business Process Monitor shows the order in which the business processes ran.

Business Process Monitor

Implementing the B2B Send Service

The B2B Send service is preconfigured and installed as part of Sterling B2B Integrator. No additional configuration of this service is necessary. However, to use the B2B Send service, you must create and enable a business process that includes the preconfigured B2B Send service.

To implement the B2B Send Service, complete the following tasks:
  1. Configure the trading profile and a corresponding contract and obtain the b2b-contract-id from the trading profile contract.
  2. Use the B2B Send service in a business process.

Editing the B2B Send Service

Should you need to edit configuration setup for the B2B Send service, you can edit the B2B Send service using the GPM. The following example shows the GPM parameters for the B2B Send service:

Service Editor
Note: The dimmed values were generated from the preconfigured B2B Send system service configuration.

The following table describes the fields used as input to the B2B Send service in the business process:

Parameter Name Description
Config Name of the Service configuration. Required.
b2b-contract-id The contract ID with the transport information to be used to send the message. This value is input from the business process in process data. Valid value is any valid contract ID.
b2b-raw-response Whether to receive a raw response. Optional. Valid values are:
  • true - receive raw response
  • false - do not receive raw response (Default)
Can be used interchangeably with xport-raw-response.
xport-raw-response Whether to receive a raw response. Optional. Valid values are:
  • true - receive raw response
  • false - do not receive raw response (Default)
Can be used interchangeably with b2b-raw-response.

The following table describes the output parameter from the subworkflows run by the B2B Send service.

Parameter Name Description
b2b-profile-id The consumption profile ID from the contract.

Usage Example

The following examples of the GPM and BPML describe the most basic implementation of the B2B Send service in a business process. In this case, the b2b-process-id is known and directly input to the service. The Assign activity is used to identify the b2b-contract-id in the business process.

GPM Example

In the business process, precede the B2B Send service with the Assign Activity and configure it to assign the contract ID to b2b-contract-id or the contract name to b2b-contract-name.

GPM Example

The following figure shows the graphical view of the GPM parameters for the Assign activity. The contract ID (3c9217:f5894f9-24ca) is assigned to b2b-contract-id. This is a required parameter for the B2B Send service and is found in the trading partner contract information. The B2B Lookup service looks up the trading partner transport information and uses the specified transport protocol (such as HTTP, SMTP, or FTP) to send the message.

Assign Activity

BPML Example

The following example provides BPML that corresponds the previous GPM example:

<process name="ExampleB2BSetup"> 
 <sequence name="Main"> 
 <assign name="Assign" to="b2b-contract-id">3c9217:f5894f94f9:-24ca</assign> 
 <operation name="B2B Send"> 
  <participant name="B2B_SEND"/> 
  <output message="B2B_SEND_SERVICEInputMessage"> 
  <assign to="." from="*"></assign> 
  </output> 
  <input message="inmsg"> 
  <assign to="." from="*"></assign> 
  </input> 
 </operation> 
 </sequence> 
</process>

The following example provides the process data in the business process when the B2B Send service runs, including the b2b-contract-id that must be in process data for the service to complete successfully:

<ProcessData> 
 <PrimaryDocument SCIObjectID="L2000-000248:f96c:fb0bd69aa1:-73af"/> 
 <b2b-contract-id>3c9217:f5894f94f9:-24ca</b2b-contract-id> 
</ProcessData> 

Example Using b2b-raw-response

<operation name="B2B_SEND">
      <participant name="B2B_SEND"/>
      <output message="B2B_SEND_ADAPTERInputMessage">    
       <assign to="b2b-contract-id">xxx</assign>
       <assign to="b2b-raw-response">true</assign>
       <assign to="." from="*"></assign>
      </output>
      <input message="inmsg">
        <assign to="." from="*"></assign>
      </input> 
</operation>