Message headers handling

The tenants are kept separated. The logical IDs of the source tenant are not expected to be known by the target tenant and the other way around.

When a message is received by the network connection point on the target tenant side, these headers are changed:

  • The TenantID of the source tenant from the message header is changed to the TenantID of the target tenant.
  • The ToLogicalID is changed to the "Default" value.
  • The FromLogicalID is changed to the LogicalID of the network connection point on the target side.

To route a message successfully, the explicit routing must be incorporated. See the example for a detailed description.

Example

The Process.SalesOrder document should be sent from connection point A from tenant X to connection point B in tenant Y. The Acknowledge.SalesOrder reply document should then be sent back from connection point B in tenant Y to connection point A in tenant X. The document flow can be split into these sections:

  1. Tenant X: A --> Process.SalesOrder --> network connection point (to tenant Y)

    ToLogicalID is set by connection point A and can be used to route the message to the network connection point.

    Alternatively, you can define a data flow. In that case the ToLogicalID is ignored.

  2. Tenant Y: network connection point (from tenant X) --> Process.SalesOrder --> B

    When the message is delivered to the tenant, the ToLogicalID was set to "Default". Therefore, the data flow must be used to route this message to the connection point B.

  3. Tenant Y: B --> Acknowledge.SalesOrder --> network connection point (to tenant X)

    Connection point B accepts the message and replies with Acknowledge.SalesOrder. ToLogicalID is set with the value from FromLogicalID (logical ID of network connection point).

    ToLogicalID can be used to route the message back to the network connection point.

    Alternatively, you can define a data flow. In that case the ToLogicalID is ignored.

  4. Tenant X: network connection point (from tenant Y) --> Acknowledge.SalesOrder --> A

    When the message is delivered back in tenant X, the ToLogicalID was set to "Default". Therefore, it cannot be used to route this message back to the connection point A.

    To cover this, there is special functionality that allows to route such a message automatically. To use this functionality, these conditions must be met:

    1. The document verb is Acknowledge or Show.
    2. There is a connection point that sends the corresponding Process or Get.
    3. There is an active data flow from this connection point directly to the document's sender (FromLogicalID).

    If these conditions are not met, you must use a data flow to route this message to connection point A. You must also use a data flow if the conditions are met by more connection points than required.