使用 Enterprise Integration Pack 为 Azure 逻辑应用解码 EDIFACT 消息Decode EDIFACT messages for Azure Logic Apps with the Enterprise Integration Pack

使用解码 EDIFACT 消息连接器,可验证 EDI 和特定于合作伙伴的属性、将交换拆分为事务集或保留整个交换,以及为已处理的交易生成确认。With the Decode EDIFACT message connector, you can validate EDI and partner-specific properties, split interchanges into transactions sets or preserve entire interchanges, and generate acknowledgments for processed transactions. 要使用此连接器,必须将此连接器添加到逻辑应用中的现有触发器。To use this connector, you must add the connector to an existing trigger in your logic app.

开始之前Before you start

下面是需要准备好的项:Here's the items you need:

  • Azure 帐户;可以创建试用帐户An Azure account; you can create a trial account
  • 已定义的、与 Azure 订阅关联的集成帐户An integration account that's already defined and associated with your Azure subscription. 必须拥有集成帐户,才能使用解码 EDIFACT 消息连接器。You must have an integration account to use the Decode EDIFACT message connector.
  • 已在集成帐户中至少定义了两个合作伙伴At least two partners that are already defined in your integration account
  • 已在集成帐户中定义了 EDIFACT 协议An EDIFACT agreement that's already defined in your integration account

为 EDIFACT 消息解码Decode EDIFACT messages

重要

EDIFACT 连接器仅支持 UTF-8 字符。The EDIFACT connector supports only UTF-8 characters. 如果输出中包含意外的字符,请检查 EDIFACT 消息是否使用 UTF-8 字符集。If your output contains unexpected characters, check that your EDIFACT messages use the UTF-8 character set.

  1. 创建逻辑应用Create a logic app.

  2. 解码 EDIFACT 消息连接器没有触发器,因此必须添加用于启动逻辑应用的触发器,如请求触发器。The Decode EDIFACT message connector doesn't have triggers, so you must add a trigger for starting your logic app, like a Request trigger. 在逻辑应用设计器中,添加触发器,然后将操作添加到逻辑应用。In the Logic App Designer, add a trigger, and then add an action to your logic app.

  3. 在搜索框中,输入“EDIFACT”作为筛选器。In the search box, enter "EDIFACT" as your filter. 选择“解码 EDIFACT 消息”。Select Decode EDIFACT Message.

    搜索 EDIFACT

  4. 如果以前未创建与集成帐户的任何连接,系统会提示现在创建该连接。If you didn't previously create any connections to your integration account, you're prompted to create that connection now. 为连接命名,并选择要连接的集成帐户。Name your connection, and select the integration account that you want to connect.

    创建集成帐户

    带有星号的属性必填。Properties with an asterisk are required.

    属性Property 详细信息Details
    连接名称 *Connection Name * 为连接输入任何名称。Enter any name for your connection.
    集成帐户 *Integration Account * 输入集成帐户的名称。Enter a name for your integration account. 确保集成帐户和逻辑应用位于同一 Azure 位置。Make sure that your integration account and logic app are in the same Azure location.
  5. 在完成连接创建时,选择“创建”。When you're done to finish creating your connection, choose Create. 连接详细信息应如此示例所示:Your connection details should look similar to this example:

    集成帐户详细信息

  6. 在创建连接后,选择要解码的 EDIFACT 平面文件消息,如此示例中所示。After your connection is created, as shown in this example, select the EDIFACT flat file message to decode.

    集成帐户连接已创建

    例如:For example:

    选择要解码的 EDIFACT 平面文件消息

EDIFACT 解码器详细信息EDIFACT decoder details

解码 EDIFACT 连接器执行以下任务:The Decode EDIFACT connector performs these tasks:

  • 针对贸易合作伙伴协议验证信封。Validates the envelope against trading partner agreement.
  • 通过将发送方限定符和标识符与接收方限定符和标识符进行匹配来解析协议。Resolves the agreement by matching the sender qualifier & identifier and receiver qualifier & identifier.
  • 当交换有多个基于协议的接收设置配置的事务时,将交换拆分为多个事务。Splits an interchange into multiple transactions when the interchange has more than one transaction based on the agreement's receive settings configuration.
  • 分解交换。Disassembles the interchange.
  • 验证 EDI 和特定于合作伙伴的属性包括:Validates EDI and partner-specific properties including:
    • 验证交换信封结构Validation of the interchange envelope structure
    • 针对控制架构对信封进行架构验证Schema validation of the envelope against the control schema
    • 针对消息架构对事务集数据元素进行架构验证Schema validation of the transaction-set data elements against the message schema
    • 对事务集数据元素执行的 EDI 验证EDI validation performed on transaction-set data elements
  • 验证交换、组和事务集控制编号不重复(如果已配置)Verifies that the interchange, group, and transaction set control numbers are not duplicates (if configured)
    • 针对以前收到的交换检查交换控制编号。Checks the interchange control number against previously received interchanges.
    • 针对交换中的其他组控制编号检查组控制编号。Checks the group control number against other group control numbers in the interchange.
    • 针对该组中的其他事务集控制编号检查事务集控制编号。Checks the transaction set control number against other transaction set control numbers in that group.
  • 将交换拆分为事务集,或保留整个交换:Splits the interchange into transaction sets, or preserves the entire interchange:
    • 将交换拆分为事务集 - 出错时暂停事务集:将交换拆分为事务集并分析每个事务集。Split Interchange as transaction sets - suspend transaction sets on error: Splits interchange into transaction sets and parses each transaction set. X12 解码操作仅将未通过验证的事务集输出到 badMessages,并将剩余事务集输出到 goodMessagesThe X12 Decode action outputs only those transaction sets that fail validation to badMessages, and outputs the remaining transactions sets to goodMessages.
    • 将交换拆分为事务集 - 出错时暂停交换:将交换拆分为事务集并分析每个事务集。Split Interchange as transaction sets - suspend interchange on error: Splits interchange into transaction sets and parses each transaction set. 如果交换中的一个或多个交易集未能通过验证,X12 解码操作会将该交换中的所有交易集输出到 badMessagesIf one or more transaction sets in the interchange fail validation, the X12 Decode action outputs all the transaction sets in that interchange to badMessages.
    • 保留交换 - 出错时暂停事务集:保留交换并处理整个批量交换。Preserve Interchange - suspend transaction sets on error: Preserve the interchange and process the entire batched interchange. X12 解码操作仅将未通过验证的事务集输出到 badMessages,并将剩余事务集输出到 goodMessagesThe X12 Decode action outputs only those transaction sets that fail validation to badMessages, and outputs the remaining transactions sets to goodMessages.
    • 保留交换 - 出错时暂停交换:保留交换并处理整个批量交换。Preserve Interchange - suspend interchange on error: Preserve the interchange and process the entire batched interchange. 如果交换中的一个或多个交易集未能通过验证,X12 解码操作会将该交换中的所有交易集输出到 badMessagesIf one or more transaction sets in the interchange fail validation, the X12 Decode action outputs all the transaction sets in that interchange to badMessages.
  • 生成技术(控制)和/或功能确认(如果已配置)。Generates a Technical (control) and/or Functional acknowledgment (if configured).
    • 技术确认或 CONTRL ACK 报告收到的完整交换的语法检查结果。A Technical Acknowledgment or the CONTRL ACK reports the results of a syntactical check of the complete received interchange.
    • 功能确认会确认接受或拒绝收到的交换或组A functional acknowledgment acknowledges accept or reject a received interchange or a group

查看 Swagger 文件View Swagger file

若要查看 EDIFACT 连接器的 Swagger 详细信息,请参阅 EDIFACTTo view the Swagger details for the EDIFACT connector, see EDIFACT.

后续步骤Next steps

了解有关 Enterprise Integration Pack 的详细信息Learn more about the Enterprise Integration Pack