Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions modules/solutions/cdm_maintain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ cdm_maintain/
├── 📄 module.toml
├── 📄 default.config.yaml
├── 📁 data_modeling/
│ └── 📁 nodes/ # Sample maintenance records
│ └── 📁 nodes/ # Sample maintenance records and grid zone annotations
└── 📁 upload_data/ # Files uploaded via `cdf data upload` command
├── 📄 *.Manifest.yaml # Upload manifests
└── 📁 files/ # Sample attachments
Expand Down Expand Up @@ -112,6 +112,7 @@ Template for integrating source system data:
### 5. Sample Data
Ready-to-load sample records to validate your setup:
- **Sample activities and assets**
- **Grid zone annotations** (`gridZoneAnnotations.Node.yaml`) — maps zones on the sample P&ID to activities via `rootLocation` and `gridReference`
- **Test documents and attachments** (uploaded via `cdf data upload` command, manifests in `upload_data/`)

## 🔧 Configuration
Expand All @@ -130,7 +131,9 @@ Each module's `default.config.yaml` declares the variables used by that module.
| `cdf_maintain_location` | `appDataSpace` | `maintain_solution_model` | Solution model space (cross-module ref) |
| `cdf_maintain_location` | `sourceDataSpace` | `maintain_source_data` | Source data space (cross-module ref) |
| `cdf_sample_data` | `instanceSpace` | `maintain_source_data` | Space where sample instances are written |
| `cdf_sample_data` | `appDataSpace` | `maintain_solution_model` | Space for grid zone annotation nodes (must match `cdf_maintain_location`) |
| `cdf_sample_data` | `location` | *(required)* | Root asset externalId prefix (must match `cdf_maintain_location`) |
| `cdf_sample_data` | `location_name` | *(required)* | Human-readable location name used in gridzone and activity data (must match `cdf_maintain_location`) |

## 🏃‍♂️ Getting Started

Expand All @@ -141,11 +144,6 @@ Each module's `default.config.yaml` declares the variables used by that module.
- Data model deployment
- Instance creation
- File uploads (for sample data)
- `data` plugin enabled in `cdf.toml` (required for `cdf data upload` to upload sample files):
```toml
[plugins]
data = true
```

### 2. Configure the Package

Expand All @@ -166,7 +164,9 @@ variables:
sourceDataSpace: maintain_source_data
cdf_sample_data:
instanceSpace: maintain_source_data
appDataSpace: maintain_solution_model
location: <your_location_id>
location_name: <Your Location Name>
```

### 3. Add and deploy the package
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,25 @@ properties:
type: direct
list: true
nullable: true
isInApp:
type:
type: boolean
list: false
Comment thread
LZoladkiewicz-Cognite marked this conversation as resolved.
nullable: true
sourceId:
type:
type: text
list: false
nullable: true
rootLocation:
type:
type: text
list: false
nullable: true
gridReference:
type:
type: text
list: false
nullable: true
constraints: {}
indexes: {}
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,27 @@ properties:
containerPropertyIdentifier: sourceId
name: sourceId
description: Unique identifier matching the externalId, used for activity lookup by the app
isInApp:
container:
type: container
space: {{schemaSpace}}
externalId: SourceMaintenanceOrder
containerPropertyIdentifier: isInApp
name: isInApp
description: Whether the activity should be shown in the app
rootLocation:
container:
type: container
space: {{schemaSpace}}
externalId: SourceMaintenanceOrder
containerPropertyIdentifier: rootLocation
name: rootLocation
description: Root location this activity belongs to, used for gridzone filtering
gridReference:
container:
type: container
space: {{schemaSpace}}
externalId: SourceMaintenanceOrder
containerPropertyIdentifier: gridReference
name: gridReference
description: Grid zone identifier this activity is mapped to (matches the zone property on FileGridZoneAnnotation)
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
isActive: "true"
isCompleted: "false"
isCancelled: "false"
isInApp: true
Comment thread
LZoladkiewicz-Cognite marked this conversation as resolved.
rootLocation: "{{location_name}}"
gridReference: "DEMO Grid-1"
files:
- space: {{instanceSpace}}
externalId: DEMO-FILE
Expand Down Expand Up @@ -76,6 +79,9 @@
isActive: "true"
isCompleted: "false"
isCancelled: "false"
isInApp: true
rootLocation: "{{location_name}}"
gridReference: "DEMO Grid-2"
files:
- space: {{instanceSpace}}
externalId: DEMO-FILE
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Grid Zone Annotations for DEMO-FILE.pdf
# Nodes live in {{appDataSpace}} (appDataInstanceSpace)
# rootLocation must match the rootLocation set on activity nodes ({{location_name}})
# zone values must match the gridReference set on activity nodes

# Zone 1 — upper-left quadrant
- space: {{appDataSpace}}
externalId: "{{location}}_gridzone_demo_grid1"
sources:
- source:
type: view
space: {{appDataSpace}}
externalId: FileGridZoneAnnotation
version: v1
properties:
fileReference: "DEMO-FILE"
Comment thread
LZoladkiewicz-Cognite marked this conversation as resolved.
rootLocation: "{{location_name}}"
zone: "DEMO Grid-1"
x1: 0.0
x2: 0.5
y1: 0.0
y2: 0.5

# Zone 2 — upper-right quadrant
- space: {{appDataSpace}}
externalId: "{{location}}_gridzone_demo_grid2"
sources:
- source:
type: view
space: {{appDataSpace}}
externalId: FileGridZoneAnnotation
version: v1
properties:
fileReference: "DEMO-FILE"
rootLocation: "{{location_name}}"
zone: "DEMO Grid-2"
x1: 0.5
x2: 1.0
y1: 0.0
y2: 0.5

# Zone 3 — lower-left quadrant
- space: {{appDataSpace}}
externalId: "{{location}}_gridzone_demo_grid3"
sources:
- source:
type: view
space: {{appDataSpace}}
externalId: FileGridZoneAnnotation
version: v1
properties:
fileReference: "DEMO-FILE"
rootLocation: "{{location_name}}"
zone: "DEMO Grid-3"
x1: 0.0
x2: 0.5
y1: 0.5
y2: 1.0

# Zone 4 — lower-right quadrant
- space: {{appDataSpace}}
externalId: "{{location}}_gridzone_demo_grid4"
sources:
- source:
type: view
space: {{appDataSpace}}
externalId: FileGridZoneAnnotation
version: v1
properties:
fileReference: "DEMO-FILE"
rootLocation: "{{location_name}}"
zone: "DEMO Grid-4"
x1: 0.5
x2: 1.0
y1: 0.5
y2: 1.0
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Space where sample data instances are written (must match schemaSpace in cdf_maintain_source_data_model)
instanceSpace: maintain_source_data
# Space for solution model data (must match appDataSpace in cdf_maintain_solution_model and cdf_maintain_location)
appDataSpace: maintain_solution_model
# Location identifier — must match the location variable in cdf_maintain_location
location: <change_me>
# Human-readable location name — must match location_name in cdf_maintain_location
location_name: <change_me>
Loading