Skip to content

Commit b843d14

Browse files
authored
feat(dr-egeria): default editing commands to forLineage=true; Solution Component deployment status (odpi#403)
* feat(dr-egeria): default editing commands to forLineage=true; Solution Component deployment status Requested by Mandy Chessell. forLineage defaults (Promise support) - Egeria only returns Promise-classified elements (and Memento, logically deleted, elements) to requests with forLineage=true. Setting For Lineage on a command did not help: it only reached the request body, while the existence check, name lookups and fetch-by-GUID always used false -- so e.g. Update Solution Component on a promised component missed it and was rewritten into a Create. - pyegeria: new lineage_visible() context manager. Inside it, every JSON request body sent by any client (both BasePlatformClient and BaseServerClient request paths) goes out with forLineage=true, including bodies SDK helpers build with it false. - Dr.Egeria: editing commands run inside lineage_visible(True); report commands (View/List/Run) default to false. An explicit For Lineage value wins, except Declassify Promise, which always uses true. A Memento element found by an editing command is treated as not found, so a Create for a deleted element's name still creates rather than updating the deleted one. Solution Component (0730) - Create Solution Component gains Deployment Status / User Defined Deployment Status, sent as deploymentStatus / userDefinedDeploymentStatus. Shared attribute definitions kept identical in the Curation and Solution Architect families (global attribute namespace). - Fix "compoent(s)" typos in Link Solution Components / Link SubComponent. Verified against a live server: a promised Solution Component was found and updated in place by Update Solution Component with no For Lineage attribute (same GUID, no duplicate), deploymentStatus stored, report-style find hid it by default and showed it inside lineage_visible(). Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com> * test: don't depend on a live Egeria server in the AssetCatalog request-body tests AssetCatalog's constructor calls check_connection(), so these tests only passed on machines with an Egeria server at localhost:9443 -- CI has none, and main has failed since odpi#402 added test_asset_lineage_for_lineage.py. Stub check_connection and use a port nothing listens on, so any real network call fails loudly instead of silently relying on a local server. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com> --------- Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
1 parent 0e746f1 commit b843d14

22 files changed

Lines changed: 589 additions & 38 deletions

‎docs/dr_egeria_manual.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,22 @@ Several "advanced" attributes available on every Create/Update command are baked
226226

227227
- **`Anchor ID` / `Anchor Scope ID`** — **Create-time only, by design.** Anchoring in Egeria is create-time-only plumbing; there is no supported way to change an element's anchor after creation. Setting these on an `Update` command has no effect.
228228

229+
### For Lineage: Promise and Memento elements
230+
231+
Egeria hides two kinds of element from ordinary requests and returns them only when a request sets `forLineage=true`:
232+
233+
- **Promise** (0010): a placeholder for a real-world resource that has not been delivered yet (see `Classify Promise` / `Declassify Promise` in the Curation family).
234+
- **Memento**: an element that has been logically deleted but is kept so lineage stays complete.
235+
236+
Dr.Egeria's defaults (added 2026-10-01):
237+
238+
- **Editing commands** (Create, Update, Link, Classify, ...) send every request with `forLineage=true`, so a promised element can be found, updated and linked without adding `For Lineage` to each command. This covers the existence check, reference lookups, fetches and the write itself.
239+
- **Report commands** (`View`, `List`, `Run`) send `forLineage=false`, so promised and deleted elements stay out of reports.
240+
- An explicit `For Lineage` attribute (Advanced templates) overrides either default. The one exception is `Declassify Promise`, which always uses `forLineage=true`, since its target is otherwise invisible.
241+
- A **Memento** element found by an editing command is treated as not found. A `Create` for a deleted element's name therefore still creates a new element, as it did before, instead of updating the deleted one.
242+
243+
In the SDK, `with pyegeria.lineage_visible():` applies the same `forLineage=true` default to every request a pyegeria client sends inside the block.
244+
229245
---
230246

231247
## Supported Command Families
@@ -242,6 +258,7 @@ Dr.Egeria organizes its commands into "families," each corresponding to a specif
242258
- **Solution Architect**: Manage solution blueprints, components, information supply chains, and design patterns (e.g., `Create Design Pattern`, `Link Nested Design Patterns`, `Link Specialized Design Patterns`, `Link Related Design Patterns`).
243259
- **Concept Models** (0571, added 2026-08-21): `Create Concept Bead`, `Create Concept Bead Attribute`, `Create Concept Bead Relationship`, and 8 relationship commands — `Link Concept Design`, `Link Concept Bead Relationship End`, `Link Typed By Concept Bead`, `Link Is A Concept Bead`, `Link Concept Bead Attribute Link`, `Link Concept Bead Extension`, `Link Solution Component Port`, `Link Solution Port Delegation` (`Detach`/`Unlink`/`Remove` variants auto-derived from each `Link` command). Routed through the existing generic `SolutionArchitectProcessor`/`SolutionLinkProcessor` (new `om_type` branches, no new processor classes needed) — auto-registered via `register_solution_architect_processors()`'s family-driven loop, same as every other Solution Architect command.
244260
- `Create Concept Model` (added 2026-08-21) creates the `ConceptModel` container `Link Concept Design` attaches elements to. No dedicated `/solution-architect/concept-models` REST endpoint exists yet, so this routes through the generic `Collection Manager` creation path instead — added `"Concept Model"` to `COLLECTION_SUBTYPES` (`md_processing_constants.py`), which per this repo's own convention is the entire wiring step (auto-routes to `CollectionManagerProcessor`'s existing generic-collection-subtype fallback, no bespoke pyegeria method needed). Live-verified end to end against a running 6.2-SNAPSHOT server: `Create Concept Model` → `Create Concept Bead` → `Link Concept Design`, with the `ConceptDesign` relationship confirmed present via direct fetch afterward.
261+
- `Create Solution Component` carries `Deployment Status` and `User Defined Deployment Status` (0730 `deploymentStatus`/`userDefinedDeploymentStatus`, added 2026-10-01).
245262
- `Link Implemented By` (0737, added 2026-09-13): attaches a design object (Information Supply Chain, Solution Component, Governance Definition, ...) to its implementation via the `ImplementedBy` relationship — a cross-OMVS call to `governance_officer`'s `linkDesignToImplementation`/`detachDesignFromImplementation` endpoints (`Detach`/`Unlink`/`Remove` variants auto-derived, same mechanism as the Concept Model relationship commands above). Along the way, fixed a real latent bug: `_get_supply_chain_rel_elements()` read a nonexistent `implementedByList` field instead of the real `implementedBy` (confirmed against `AttributedMetadataElement.java` and a live element fetch) — this had silently made the `Implemented By` sync's as-is diff always see zero existing relationships.
246263
- **Correction, 2026-09-16:** the paragraph above's `Create Information Supply Chain`/`Create Solution Component` sync was itself wrong — `In Information Supply Chain` (on `Create Solution Component`) and `Implemented By` (on `Create Information Supply Chain`) were both syncing via `ImplementedBy` (the mechanism `Link Implemented By` legitimately uses), when `InformationSupplyChain` is a Collection subtype and these two attributes are ordinary collection membership. Reported live: 71 components each carrying `In Information Supply Chain` fanned each chain out to 143 `ImplementedBy` links, alongside the 47 correct `CollectionMembership`s from explicit `Add Member` blocks. Both sync points (`SolutionComponentProcessor._sync_all_rels`'s "Supply Chains" block and `SupplyChainProcessor._sync_rels`'s "Implemented By" block, `solution_architect.py`) now call `_async_add_to_collection`/`_async_remove_from_collection` with `CollectionMembershipProperties`, matching every other ISC membership sync in this file. Pre-existing bad `ImplementedBy` links created before this fix are not auto-cleaned — the as-is fetch now reads `collectionMembers`, not `implementedBy`, so a re-sync no longer sees or touches them; removing them is a separate one-off cleanup against affected servers.
247264
- **Lineage Linker** (added 2026-09-16): Create/update/detach the seven Lineage Linker OMVS relationship types (0750/0755/0770 — DataFlow, ControlFlow, ProcessCall, LineageMapping, DataMapping, UltimateSource, UltimateDestination) between two elements, e.g. `Link Data Flow`, `Update Process Call`, `Link Data Mapping`. One dedicated `Link`/`Update` command pair per type (each with only its own type's attributes — Guard/Mandatory Guard for `Control Flow`; Query/Query ID/Query Type for `Data Mapping`; One Way/Integration Style/Protocol/Frequency/Data Exchanged, reused from Solution Architect's `SolutionLinkingWire` attributes, for the rest), plus one shared `Unlink Lineage Relationship` command since detaching only needs the relationship's own GUID. Split from an earlier single generic command triple that used a `Lineage Relationship Type` selector attribute offering every type's attributes regardless of which type was picked. The split also surfaced and fixed a real gap: the pyegeria SDK's `DataFlowProperties`/`ProcessCallProperties`/`LineageMappingProperties`/`UltimateSourceProperties`/`UltimateDestinationProperties` (`pyegeria/omvs/lineage_linker.py`) were missing `oneWay`/`integrationStyle`/`protocol`/`frequency`/`dataExchanged` (and `ProcessCallProperties` was missing `lineNumber`) entirely — real fields on the Egeria DTOs (`DataLineageRelationshipProperties`/`ProcessCallProperties.java`) that had no home on the pydantic model, so a caller passing them would validate silently and have them dropped before serialization (the `PyegeriaModel` `extra='ignore'` gotcha — see the SDK section below).

‎md_processing/data/compact_commands/commands_curation_compact.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2862,7 +2862,7 @@
28622862
"OTHER"
28632863
],
28642864
"existing_element": "",
2865-
"description": "Progress toward delivering the promised real-world digital resource/artifact - one of an enumerated set of values (DeploymentStatus).",
2865+
"description": "The deployment status of the element - one of an enumerated set of values (DeploymentStatus). On a Promise it tracks progress toward delivering the promised resource.",
28662866
"generated": false,
28672867
"style": "Valid Value",
28682868
"user_specified": true,
@@ -2871,7 +2871,7 @@
28712871
"min_cardinality": 0,
28722872
"max_cardinality": 1,
28732873
"level": "Basic",
2874-
"Journal Entry": "Added 2026-09-30 -- Promise classification (0010), Classification Explorer setElementAsPromise."
2874+
"Journal Entry": "2026-10-01: shared definition -- used by Curation (Classify Promise) and Solution Architect (Solution Component, Egeria 0730 deploymentStatus/userDefinedDeploymentStatus). Keep identical in both files (global attribute namespace)."
28752875
},
28762876
"User Defined Deployment Status": {
28772877
"variable_name": "user_defined_deployment_status",
@@ -2881,7 +2881,7 @@
28812881
"default_value": "",
28822882
"valid_values": [],
28832883
"existing_element": "",
2884-
"description": "Locally defined deployment status - used when Deployment Status is OTHER.",
2884+
"description": "A locally defined deployment status - only used when Deployment Status is OTHER.",
28852885
"generated": false,
28862886
"style": "Simple",
28872887
"user_specified": true,
@@ -2890,7 +2890,7 @@
28902890
"min_cardinality": 0,
28912891
"max_cardinality": 1,
28922892
"level": "Domain",
2893-
"Journal Entry": "Added 2026-09-30 -- Promise classification (0010), Classification Explorer setElementAsPromise."
2893+
"Journal Entry": "2026-10-01: shared definition -- used by Curation (Classify Promise) and Solution Architect (Solution Component, Egeria 0730 deploymentStatus/userDefinedDeploymentStatus). Keep identical in both files (global attribute namespace)."
28942894
},
28952895
"Start Time": {
28962896
"variable_name": "start_time",

‎md_processing/data/compact_commands/commands_solution_architect_compact.json‎

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3168,6 +3168,55 @@
31683168
"max_cardinality": 1,
31693169
"level": "Domain",
31703170
"Journal Entry": "Added 2026-09-13 -- ImplementedBy relationship (0737) support, requested by the user: Solution Architect had no command for governance_officer's linkDesignToImplementation/detachDesignFromImplementation, and Create Information Supply Chain had no way to record implementation elements. Confirmed live 2026-09-13 that 'Link Information Supply Chain Child' already correctly uses CollectionMembership (not ImplementedBy) -- no fix needed there. Detach/Unlink/Attach/Add/Remove variants are auto-derived by build_command_variants() from this one 'Link' definition, matching every other Solution Architect link command -- no separate Detach compact entry needed."
3171+
},
3172+
"Deployment Status": {
3173+
"variable_name": "deployment_status",
3174+
"inUpdate": true,
3175+
"attr_labels": "",
3176+
"examples": "",
3177+
"default_value": "",
3178+
"valid_values": [
3179+
"PROPOSED",
3180+
"UNDER_DEVELOPMENT",
3181+
"DEVELOPMENT_COMPLETE",
3182+
"APPROVED_FOR_DEPLOYMENT",
3183+
"REJECTED",
3184+
"STANDBY",
3185+
"ACTIVE",
3186+
"DISABLED",
3187+
"FAILED",
3188+
"OTHER"
3189+
],
3190+
"existing_element": "",
3191+
"description": "The deployment status of the element - one of an enumerated set of values (DeploymentStatus). On a Promise it tracks progress toward delivering the promised resource.",
3192+
"generated": false,
3193+
"style": "Valid Value",
3194+
"user_specified": true,
3195+
"unique": false,
3196+
"input_required": false,
3197+
"min_cardinality": 0,
3198+
"max_cardinality": 1,
3199+
"level": "Basic",
3200+
"Journal Entry": "2026-10-01: shared definition -- used by Curation (Classify Promise) and Solution Architect (Solution Component, Egeria 0730 deploymentStatus/userDefinedDeploymentStatus). Keep identical in both files (global attribute namespace)."
3201+
},
3202+
"User Defined Deployment Status": {
3203+
"variable_name": "user_defined_deployment_status",
3204+
"inUpdate": true,
3205+
"attr_labels": "",
3206+
"examples": "",
3207+
"default_value": "",
3208+
"valid_values": [],
3209+
"existing_element": "",
3210+
"description": "A locally defined deployment status - only used when Deployment Status is OTHER.",
3211+
"generated": false,
3212+
"style": "Simple",
3213+
"user_specified": true,
3214+
"unique": false,
3215+
"input_required": false,
3216+
"min_cardinality": 0,
3217+
"max_cardinality": 1,
3218+
"level": "Domain",
3219+
"Journal Entry": "2026-10-01: shared definition -- used by Curation (Classify Promise) and Solution Architect (Solution Component, Egeria 0730 deploymentStatus/userDefinedDeploymentStatus). Keep identical in both files (global attribute namespace)."
31713220
}
31723221
},
31733222
"bundles": {
@@ -3333,7 +3382,9 @@
33333382
"In Solution Components",
33343383
"Planned Deployed Implementation Type",
33353384
"Solution Component Type",
3336-
"Solution SubComponents"
3385+
"Solution SubComponents",
3386+
"Deployment Status",
3387+
"User Defined Deployment Status"
33373388
]
33383389
},
33393390
"Solution Role Base": {
@@ -3478,7 +3529,7 @@
34783529
"qn_prefix": "",
34793530
"alternate_names": [],
34803531
"family": "Solution Architect",
3481-
"description": "Links or unlinks two solution compoents.",
3532+
"description": "Links or unlinks two solution components.",
34823533
"verb": "Link",
34833534
"upsert": false,
34843535
"attach": false,
@@ -3677,7 +3728,7 @@
36773728
"qn_prefix": "",
36783729
"alternate_names": [],
36793730
"family": "Solution Architect",
3680-
"description": "Links a child compoent to a parent component.",
3731+
"description": "Links a child component to a parent component.",
36813732
"verb": "Link",
36823733
"upsert": false,
36833734
"attach": false,

0 commit comments

Comments
 (0)