Skip to main content
Feedback

RosettaNet messages with attached documents

Updated 

You can send and receive MIME attachments with RosettaNet messages. Store the attachments in a Document Cache component, then point the Trading Partner component to that cache.

note

Attachments are supported only for RosettaNet Implementation Framework (RNIF) 2.0. RNIF 1.1 doesn't support attachments.

How attachments are linked

The RosettaNet connector links the business document, the RosettaNet message, and the attachments with a dynamic document property named RNET_ROOT_DOCUMENT_ID. Add this property as an index on the Document Cache component. The connector uses it as the index key when it stores attachments for outbound messages, and as the lookup key when it retrieves attachments for inbound messages.

  • Outbound messages: You must set a unique value for RNET_ROOT_DOCUMENT_ID. For example, use the Unique Value assignment in a Set Properties step.
  • Inbound messages: The connector assigns a unique value automatically.
tip

Use a separate Document Cache component for each trading partner. Sharing a cache across partners increases the risk of misconfiguration, which can cause attachments to not be found.

Configuring the Trading Partner component

  1. In the Trading Partner component, open the Message Options section. Set Attachment Cache to the Document Cache component that has RNET_ROOT_DOCUMENT_ID configured as an index.

    note

    The Attachment Cache option appears only for "Partners that I trade with" components.

    The Document Cache component configuration settings showing the RNET_ROOT_DOCUMENT_ID dynamic document property added as an index.

  2. In the Start step, set the trading partner type. Then set the Trading Partner action for the HTTP communication method. Any RosettaNet listeners that you add to the action are enabled.

  3. For the HTTP communication method, enable MIME Passthrough.

Receiving attachments

When a Trading Partner connector receives a RosettaNet message with attachments, the connector does the following:

  1. Extracts the service content and saves it as the root document. The connector sets RNET_ROOT_DOCUMENT_ID on the root document. The same value indexes the attachments in the attachment cache, so you can use it to retrieve them.

  2. Extracts each attachment and saves it as an attachment document in the cache named in the receiving connector's Attachment Cache field. Each attachment document has the following dynamic document properties:

    PropertyDescription
    RNET_ROOT_DOCUMENT_IDIdentifies the root document that the attachment belongs to.
    RNET_ATTACHMENT_CONTENT_IDThe attachment's content ID, if it exists.
    RNET_ATTACHMENT_CONTENT_TYPEThe attachment's content type. (Optional)
    RNET_ATTACHMENT_NAMEThe attachment's name. (Optional)
    RNET_ATTACHMENT_DESCRIPTIONThe attachment's content description. (Optional)
  3. Sends the message body to the integration process.

To get the list of attachments for a document, use the Retrieve From Cache step.

Sending attachments

When a process sends a RosettaNet message with attachments to a Trading Partner connector, the connector does the following:

  1. Looks up attachments in the receiving trading partner's attachment cache. It uses the RNET_ROOT_DOCUMENT_ID property on each process document.

  2. If the property is found and the receiving trading partner has an attachment cache, retrieves the attachments and adds each one after the service content as a MIME part.

    note

    If RNET_ROOT_DOCUMENT_ID isn't found, or the receiving trading partner has no attachment cache, the connector doesn't process attachments.

  3. Sets MIME headers from the dynamic document properties of each attachment document in the cache:

    Dynamic document propertyMIME header
    RNET_ATTACHMENT_CONTENT_IDContent-ID
    RNET_ATTACHMENT_CONTENT_TYPEContent-Type
    RNET_ATTACHMENT_NAMEContent-Type name parameter
    RNET_ATTACHMENT_DESCRIPTIONContent-Description
    RNET_ATTACHMENT_CONTENT_TRANSFER_ENCODINGContent-Transfer-Encoding
  4. Sends the RosettaNet message with MIME attachments to the trading partner endpoint.

On this Page