在 Azure 逻辑应用中创建并管理贸易合作伙伴协议Create and manage trading partner agreements in Azure Logic Apps

贸易合作伙伴 协议 (agreement) 通过定义在交换企业对企业 (B2B) 消息时使用的特定的行业标准协议 (protocol),帮助组织和企业彼此无缝通信。A trading partner agreement helps organizations and businesses communicate seamlessly with each other by defining the specific industry-standard protocol to use when exchanging business-to-business (B2B) messages. 协议有一些常见的好处,例如:Agreements provide common benefits, for example:

  • 使组织能够以熟知的格式交换信息。Enable organizations to exchange information by using a well-known format.
  • 可提高进行 B2B 交易的效率。Improve efficiency when conducting B2B transactions.
  • 创建和管理起来很容易,并且可以轻松地用来构建企业集成解决方案。Are easy to create, manage, and use for building enterprise integration solutions.

本文介绍如何创建 AS2、EDIFACT 或 X12 协议。在通过 Enterprise Integration PackAzure 逻辑应用构建适用于 B2B 方案的企业集成解决方案时,可以使用该协议。This article shows how to create an AS2, EDIFACT, or X12 agreement that you can use when building enterprise integration solutions for B2B scenarios by using the Enterprise Integration Pack and Azure Logic Apps. 创建协议后,可以使用 AS2、EDIFACT 或 X12 连接器来交换 B2B 消息。After you create an agreement, you can then use the AS2, EDIFACT, or X12 connectors for exchanging B2B messages.

若要创建用于交换 RosettaNet 消息的协议,请参阅交换 RosettaNet 消息To create agreements for exchanging RosettaNet messages, see Exchange RosettaNet messages.

先决条件Prerequisites

  • Azure 订阅。An Azure subscription. 如果还没有 Azure 订阅,请注册试用版订阅If you don't have an Azure subscription yet, sign up for a Trial Subscription.

  • 用于存储协议和其他 B2B 项目的集成帐户An integration account for storing your agreement and other B2B artifacts. 此集成帐户必须与 Azure 订阅相关联。This integration account must be associated with your Azure subscription.

  • 至少两个已在集成帐户中创建的贸易合作伙伴At least two trading partners that you've already created in your integration account. 协议需要有主机合作伙伴和来宾合作伙伴。An agreement requires both a host partner and a guest partner. 两个合作伙伴都必须使用与你要创建的协议(如 AS2、X12 或 EDIFACT)相同的“业务标识”限定符。Both partners must use the same "business identity" qualifier as the agreement you want to create, such as AS2, X12, or EDIFACT.

  • 可选:要在其中使用协议的逻辑应用,以及用于启动逻辑应用工作流的触发器。Optional: The logic app where you want to use your agreement and a trigger that starts your logic app's workflow. 若只创建集成帐户和 B2B 项目,则不需逻辑应用。To just create your integration account and B2B artifacts, you don't need a logic app. 但是,必须先将集成帐户关联到逻辑应用,然后逻辑应用才能使用集成帐户中的 B2B 项目。However, before your logic app can use the B2B artifacts in your integration account, you must link your integration account to your logic app. 如果不熟悉逻辑应用,请查看什么是 Azure 逻辑应用快速入门:创建第一个逻辑应用If you're new to logic apps, review What is Azure Logic Apps and Quickstart: Create your first logic app.

创建协议Create agreements

  1. 登录到 Azure 门户Sign in to the Azure portal. 在 Azure 主菜单中,选择“所有服务”。On the main Azure menu, select All services. 在搜索框中,输入“集成”作为筛选器。In the search box, enter "integration" as your filter. 从结果中选择此资源:集成帐户From the results, select this resource: Integration accounts

    查找集成帐户

  2. 在“集成帐户”下,选择要在其中创建协议的集成帐户。Under Integration accounts, select the integration account where you want to create the agreement.

    选择要在其中创建协议的集成帐户

  3. 在右侧窗格的“组件”下,选择“协议”磁贴。In the right-hand pane, under Components, choose the Agreements tile.

    选择“协议”

  4. 在“协议”下,选择“添加”。Under Agreements, choose Add. 在“添加”窗格中提供有关协议的信息,例如:In the Add pane, provide information about your agreement, for example:

    选择“添加”

    属性Property 必须Required ValueValue 说明Description
    名称Name Yes <agreement-name><agreement-name> 协议的名称The name for your agreement
    协议类型Agreement type Yes AS2X12EDIFACTAS2, X12, or EDIFACT 协议 (agreement) 的协议 (protocol) 类型。The protocol type for your agreement. 创建协议 (agreement) 文件时,该文件中的内容必须与协议 (agreement) 类型匹配。When you create your agreement file, the content in that file must match the agreement type.
    主机合作伙伴Host Partner Yes <host-partner-name><host-partner-name> 主机合作伙伴代表指定协议的组织The host partner represents the organization that specifies the agreement
    主机标识Host Identity Yes <host-partner-identifier><host-partner-identifier> 主机合作伙伴的标识符The host partner's identifier
    来宾合作伙伴Guest Partner Yes <guest-partner-name><guest-partner-name> 托管方代表与管理方进行交易的组织The guest partner represents the organization that's doing business with the host partner
    来宾标识Guest Identity Yes <guest-partner-identifier><guest-partner-identifier> 来宾合作伙伴的标识符The guest partner's identifier
    接收设置Receive Settings 多种多样Varies 多种多样Varies 这些属性指定主机合作伙伴如何从协议中的来宾合作伙伴处接收所有传入消息。These properties specify how the host partner receives all incoming messages from the guest partner in the agreement. 有关详细信息,请参阅相应的协议类型:For more information, see the respective agreement type:

    - AS2 消息设置- AS2 message settings
    - EDIFACT 消息设置- EDIFACT message settings
    - X12 消息设置- X12 message settings

    发送设置Send Settings 多种多样Varies 多种多样Varies 这些属性指定主机合作伙伴如何向协议中的来宾合作伙伴发送所有传出消息。These properties specify how the host partner sends all outgoing messages to the guest partner in the agreement. 有关详细信息,请参阅相应的协议类型:For more information, see the respective agreement type:

    - AS2 消息设置- AS2 message settings
    - EDIFACT 消息设置- EDIFACT message settings
    - X12 消息设置- X12 message settings

    重要

    协议的解决方案取决于是否匹配在合作伙伴和传入消息中定义的这些项:The resolution for an agreement depends on matching these items that are defined in the partner and incoming message:

    • 发送方的限定符和标识符The sender's qualifier and identifier
    • 接收方的限定符和标识符The receiver's qualifier and identifier

    如果这些值因合作伙伴而更改,请确保同时更新协议。If these values change for your partner, make sure that you update the agreement too.

  5. 创建完协议后,请在“添加”页上选择“确定”,返回到集成帐户。 When you're done creating your agreement, on the Add page, choose OK, and return to your integration account.

    “协议”列表现在会显示新协议。The Agreements list now shows your new agreement.

编辑协议Edit agreements

  1. Azure 门户中的 Azure 主菜单上,选择“所有服务”。In the Azure portal, on the main Azure menu, select All services.

  2. 在搜索框中,输入“集成”作为筛选器。In the search box, enter "integration" as your filter. 从结果中选择此资源:集成帐户From the results, select this resource: Integration accounts

  3. 在“集成帐户”下,选择要编辑其协议的集成帐户。Under Integration accounts, select the integration account that has the agreement you want to edit.

  4. 在右侧窗格的“组件”下,选择“协议”磁贴。In the right-hand pane, under Components, choose the Agreements tile.

  5. 在“协议”下选择协议,然后选择“编辑”。Under Agreements, select your agreement, and choose Edit.

  6. 进行更改,并保存所做的更改。Make and then save your changes.

删除协议Delete agreements

  1. Azure 门户中的 Azure 主菜单上,选择“所有服务”。In the Azure portal, on the main Azure menu, select All services.

  2. 在搜索框中,输入“集成”作为筛选器。In the search box, enter "integration" as your filter. 从结果中选择此资源:集成帐户From the results, select this resource: Integration accounts

  3. 在“集成帐户”下,选择要删除其协议的集成帐户。Under Integration accounts, select the integration account that has the agreement you want to delete.

  4. 在右侧窗格的“组件”下,选择“协议”磁贴。In the right-hand pane, under Components, choose the Agreements tile.

  5. 在“协议”下选择协议,然后选择“删除”。Under Agreements, select your agreement, and choose Delete.

  6. 确认要删除所选协议。Confirm that you want to delete the selected agreement.

后续步骤Next steps