biztalk server
40 TopicsHandling Errors in SAP BAPI Transactions
We tackle a topic that has been set aside in previous posts about SAP BAPI transactions, namely, error handling. The orchestration previously presented in Debatching SAP BAPI Transaction Requests is improved to a flexible fault-tolerant BAPI batch processing solution with the following features: Graceful handling of exceptions and errors from invalid data; Option to specify whether processing should continue or abort; Log all errors and non-committed transactions.SAP BAPI Transactions Walkthrough
One of the ways that BizTalk can access SAP servers is by using Business Application Programming Interfaces (BAPIs). In this article, we present a general scenario where the same BizTalk orchestration processes multiple BAPI transactions received separately as part of the same Logical Unit of Work (LUW) on the SAP server.Attachments in the Office 365 Outlook Email Adapter
Starting with the release of BizTalk Server 2020, email attachments are supported by the Office 365 Outlook Email adapter. As a growing number of businesses are adopting Office 365, this new feature is an interesting alternative to the POP3 Adapter on the receive side, and to the SMTP Adapter on the send side, in scenarios such as (non-exhaustive list): Migration of existing deployed POP3/SMTP BizTalk applications to a more modern platform; Integration of Office 365 and BizTalk to transfer data via email attachment payloads; Organizations that use Outlook 365 by connecting other email accounts. The article Office 365 Outlook Adapters in Action provides an example of how to use attachments in a BizTalk ochestration. Receiving Attachments 1. Multipart BizTalk Messages The first way to receive and save attachments in the Office 365 Outlook Email adapter is by creating a multipart BizTalk message where each part corresponds to an attachment. This is equivalent to the Apply MIME decoding option set to true in the POP3 adapter configuration. The receive location transport property settings for this configuration are shown below. Note that by default, the "Include attachments" checkbox is unchecked, and it needs to be checked explicitly. As an example, let's receive the following email with attachments (as shown in the Outlook desktop app): The corresponding BizTalk message, shown in the screenshot below, will have one part per attachment. The part named "body" corresponds to the email body as sent by the server, which is with HTML body type by default in Outlook 365. Subsequent parts are named after the attachment names. Each part of the BizTalk message contains character set information, and MIME type as content type. 2. MIME Content The second way to receive attachments is by choosing MIME email payload, as shown below: In this case, the BizTalk message body will contain the entire MIME representation of the email (headers, body and attachments). Sending Attachments Let's consider an email send port with the configuration below. Send ports with transport type Office 365 Outlook Email can be configured to attach the parts of a multipart BizTalk message to an email, as well as specific files. This is the equivalent of the MessagePartsAttachments and Attachments properties in the SMTP send port configuration. For illustration, we forwarded the email with attachments received earlier. The corresponding BizTalk multipart message looked like: The email sent by the send port is shown below, in the Outlook desktop client app used by the recipient. Note that the attachment types are preserved, and the body is shown as HTML in the same way as the original email. References: Office365 Outlook Email adapter POP3 Adapter SMTP Adapter Office 365 Outlook Adapters in ActionScatter-Gather Pattern with SAP BAPI Transactions
This article is the third installment of a series on SAP BAPI transactions in which variations of the same orchestration are presented step-by-step. In the last iteration, messages were debatched with an in-orchestration pipeline and sent sequentially. In this article, we introduce parallelism by implementing the Scatter-Gather pattern. In this new design, a parent orchestration starts a separate child orchestration for each BAPI transaction, and a self-correlating port is used for getting the responses back. Child orchestrations implement a variation of the Content-Based Router pattern whereby message content determines subsequent BAPI action and connection state.