---
title: "O2C Demo: Repository Binding Builds the Landscape and BPM | Nodinite"
description: "The Repository Binding each Order-to-Cash demo Log Event carries: the JSON structure, what each property means, how the Nodinite Logging Service builds Systems, Services, relations, and the BPM from it, and why it works when events arrive out of order."
---

# :fa-sitemap: O2C Demo: Repository Binding

This page is part of the [Order-to-Cash demo][O2C Overview]. It explains the [Repository Binding][] each [Log Event][Log Events] carries, which is the point of the demo: :Nodinite: builds the [Integration][Integrations], [Systems][], [Services][], service relations, and the [BPM][BPMs] from logging alone.

## :fa-gears: Repository Binding Context Options

Each Log Event includes a **Repository Binding JSON** in the Context section that automatically creates the integration landscape. This mechanism turns raw Log Events into a documented, visualized integration landscape. The context key is `ExtendedProperties/1.0#RepositoryBinding`; [Repository Binding][] and [BPM Binding][] document every property.

### Repository Binding Structure

The structure for each step:

```json
{
  "Name": "Standard Transport Contract",
  "Service": {
    "Name": "INT1337-ServiceCode-Description",
    "Direction": "Receive|Send",
    "System": {
      "Name": "System Name"
    },
    "Integration": {
      "Name": "INT1337 - Order-to-Cash"
    },
    "ExternalServiceRelations": [
      {
        "Name": "INT1337-PreviousService",
        "Direction": "Send",
        "System": {
          "Name": "Previous System Name"
        }
      }
    ],
    "InternalServiceRelations": [
      {
        "Name": "INT1337-SameStepService",
        "Direction": "Receive",
        "System": {
          "Name": "System Name"
        }
      }
    ],
    "BPMs": [
      {
        "Name": "INT1337 - Order-to-Cash Flow",
        "ArtifactRenaming": "Step Description",
        "Domain": {
          "Name": "Domain Name",
          "Index": 0
        },
        "Step": 0,
        "ServiceRelations": [
          {
            "Name": "INT1337-RelatedService",
            "ArtifactRenaming": "Related Step Description",
            "Direction": "Send",
            "Step": 1,
            "Label": "To related step",
            "ConnectorStyle": 0,
            "SourceAttachmentPoint": 3,
            "TargetAttachmentPoint": 1,
            "System": {
              "Name": "Related System Name"
            },
            "Domain": {
              "Name": "Related Domain Name",
              "Index": 1
            }
          }
        ]
      }
    ]
  }
}
```

### Key Concepts

* **Service**: Defines this step's Service (e.g., `INT1337-RCV-Order-Incoming`, `INT1337-ENT-Order-Entry`)
* **System**: The System where the Service runs (e.g., `Portal`, `ERP`, `WMS`)
* **Direction**: `Receive` or `Send` - this demo uses only these two directions, but real-world scenarios may include other directions like `Both`, `Unknown`, etc.
* **ExternalServiceRelations**: Links to Services in **different Systems** (cross-system connections). Added for `Receive` direction Services to reference the previous `Send` Service that triggered this step
* **InternalServiceRelations**: Links to Services in the **same System** (same-system connections). Added for `Send` direction Services to reference the paired `Receive` Service in the same step
* **BPMs**: Business Process Model array containing process flow metadata for visualization
* **Domain**: The business [Domain][Domains] and its index in the process flow (0=Sales, 1=Planning, 2=Logistics, 3=Finance)
* **Step**: 0-based step number in the process (0 for the first step, 1 for the second, etc.) - displays as 1-based in the UI. **Note:** Step numbers are always non-negative (0 or positive integers)
* **ServiceRelations** (BPM): Links to downstream Services, showing process flow arrows in the BPM. Each relation **must** include:
  * **Name**: The name of the related Service
  * **Direction**: The **direction of the related Service** (not the current Service). For example, if the current Service is "Receive" and points to a downstream "Send" Service, the Direction field is "Send"
  * **System**: The System where the related Service runs
  * **Domain**: The Domain where the related Service exists
  * **Step**: The step number of the related Service (always 0 or positive)
  * **ArtifactRenaming**: Display name for the related milestone in the BPM matrix
  * **Label**: Text label for the connector arrow
* **ConnectorStyle**: Arrow style, `0` to `7` (0=Arrow, the right-angle default); see the [Connector Styles][BPM Binding - Connector Styles] table

### How the Logging Service Processes the Binding

The [Logging Service][] reads the binding while it processes the event; the [Web Client][] doesn't. It applies the binding when [`AllowRepositoryAutomapping`][AllowRepositoryAutomapping] is `true` **and** the Repository Parameter for each kind of item ([Integrations][], [Systems][], [Services][], and [Contracts][]) allows it: `AutomappingOperationsOnIntegrations`, `AutomappingOperationsOnServices`, `AutomappingOperationsOnSystems`, and `AutomappingOperationsOnContracts`, each `{"Create":true,"Update":true}`. `Create: false` stops new items of that kind; `Update: false` leaves existing Services and Contracts as they are.

![The Order Received event of ORD-10005 with its Repository Binding in the Context Values, then the Integration INT1337 - Order-to-Cash and the Service INT1337-RCV-Order-Incoming in the Repository, on the System Portal with its Standard Transport Contract, animated walkthrough (7.13)][1]  
*Animated walkthrough: **Show Details** on the Order Received event of order `ORD-10005`, the **Context Values** with `ExtendedProperties/1.0#RepositoryBinding`, then **Repository** > **Integrations** > *INT1337 - Order-to-Cash* and **Services** > *INT1337-RCV-Order-Incoming*, on the System Portal, in the Integration INT1337, with its Transport Contract. The Resources card is blurred.*  

For each event, the Logging Service:

1. Creates the [Integration][Integrations] when it doesn't exist. An existing Integration is never changed; the Service is only linked to it.
2. Creates the [System][Systems] when it doesn't exist. A System is never updated or renamed. An existing Service gets a System only when it has none, and a Service never moves to another System.
3. Creates the [Service][Services] with its Direction, System, Integration, **Transport Contract**, and service relations. An existing Service gets the Integration link, the Transport Contract, and the relations added. The Transport [Contract][Contracts] is named after the binding's `Name` (*Standard Transport Contract*) and holds the event's [Message Type][Message Types] and [Endpoint][Endpoints].
4. Creates the [Domain][Domains] and the [BPM][BPMs] when they don't exist, and gives the BPM its lanes, the step, and its connectors.

The Logging Service rereads `AllowRepositoryAutomapping` and the four Repository Parameters at most every 5 minutes, and applies an identical binding JSON once per 10 minutes. When a binding can't be applied, the [Log Audit][Log Audit Search] gets an entry *There was a problem applying the Repository Binding for message with EventId …*.

Items the binding creates get a description saying they were created from a Log Event. If you rename such an item, later events with the old name create it again.

>[!IMPORTANT]
>In production environments, events may arrive out of sequential order due to network latency, system delays, retry logic, or asynchronous processing. The Repository Binding structure includes explicit **Step**, **System**, and **Domain** information in **every** ServiceRelation, so :Nodinite: reconstructs the process flow correctly regardless of event arrival order. This demo uses sequential ordering for simplicity, but the structure handles non-sequential scenarios.

|Approach|Result|
|---|---|
|❌ Without Repository Binding|You must create all Systems, Services, and relations manually in the [Web Client][]|
|✅ With Repository Binding|:Nodinite: builds the landscape automatically from logging|

## :fa-hand-point-right: Next Steps

* :fa-map: [Integration Landscape][Integration-Landscape] - The Systems, Services, and relations the binding creates  
* :fa-diagram-project: [BPM Expected Layout][] - The BPM the binding creates  
* :fa-terminal: [O2C Demo: Data Generation][O2C Data Generation] - Generate the events and see it happen  

## :fa-link-horizontal: Related Topics

* :fa-house: [Order-to-Cash Demo Overview][O2C Overview]  
* :fa-sitemap: [Repository Binding][]  
* :fa-diagram-project: [BPM Binding][]  
* :fa-gear: [AllowRepositoryAutomapping System Parameter][AllowRepositoryAutomapping]  
* :fa-layer-group: [Repository Model][]  
* :fa-file-code: [O2C Demo: Log Event Structure][O2C Log Event Structure]  
* :fa-diagram-project: [O2C Demo: Process Steps, Systems, and Services][O2C Process]  

[1]:{ndm}/Documentation%20Pictures/IM/WebClient/Repository/BPMs/O2C/O2C_RepositoryBinding_ToRepository.gif

[AllowRepositoryAutomapping]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/AllowRepositoryAutomapping.md
[BPM Binding]:{ndr}/Core%20Services/Log%20Event/Features/BPM%20Binding.md
[BPM Binding - Connector Styles]:{ndr}/Core%20Services/Log%20Event/Features/BPM%20Binding.md#connector-styles
[BPM Expected Layout]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/BPM-Expected-Layout.md
[BPMs]:{ndr}/Repository%20Model/BPMs/Overview.md
[Contracts]:{ndr}/Getting%20Started/4.%20Repository/Contracts/Overview.md
[Domains]:{ndr}/Repository%20Model/Domains/Overview.md
[Endpoints]:{ndr}/Repository%20Model/Endpoints/Overview.md
[Integration-Landscape]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Integration-Landscape.md
[Integrations]:{ndr}/Repository%20Model/Integrations/Overview.md
[Log Audit Search]:{ndr}/Administration/6.%20Tools/2.%20Log%20Audit%20Search.md
[Log Events]:{ndr}/Core%20Services/Log%20Event/Overview.md
[Logging Service]:{ndr}/Core%20Services/Logging%20Service/Overview.md
[Message Types]:{ndr}/Repository%20Model/Message%20Types/Overview.md
[O2C Data Generation]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/O2C-Data-Generation.md
[O2C Log Event Structure]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/O2C-Log-Event-Structure.md
[O2C Overview]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Overview.md
[O2C Process]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/O2C-Process-and-Services.md
[Repository Binding]:{ndr}/Core%20Services/Log%20Event/Features/Repository%20Binding.md
[Repository Model]:{ndr}/Repository%20Model/Overview.md
[Services]:{ndr}/Repository%20Model/Services/Overview.md
[Systems]:{ndr}/Repository%20Model/Systems/Overview.md
[Web Client]:{ndr}/Getting%20Started/Overview.md