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:
|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.|
|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
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.|
|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.
- 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.
- The service runs as part of the business process.
- This service starts the B2B Lookup service.
- 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:
- 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.
- The B2B Lookup service starts the appropriate communications adapter.
- 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.
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.
- Create a business process (SendOutBoundDocuments) that uses the B2B Send service.
- 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.
- 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
- The EDI_Outbound_To_TP business process receives the XML file as the primary document.
- 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.
- 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.
- The SendOutBoundDocuments business process receives the enveloped document as the primary document.
- 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
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.
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.
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
- 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.
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.
- Configure the trading profile and a corresponding contract and obtain the b2b-contract-id from the trading profile contract.
- 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:
The following table describes the fields used as input to the B2B Send service in the business process:
|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
|xport-raw-response||Whether to receive a raw response. Optional. Valid
The following table describes the output parameter from the subworkflows run by the B2B Send service.
|b2b-profile-id||The consumption profile ID from the contract.|
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.
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.
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.
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>