diff --git a/docs/output-formats-and-report-specs.md b/docs/output-formats-and-report-specs.md index 7546946f..62010f65 100644 --- a/docs/output-formats-and-report-specs.md +++ b/docs/output-formats-and-report-specs.md @@ -432,9 +432,28 @@ Column(name='Zone Profile All', key='zoneProfileAllMermaidPieChart'), Column(name='Zone Profiles', key='zone_profile_mermaid_pie_chart'), ``` -The `name` field has no effect on detection for pie chart or custom graph columns — only the `key` matters. For the generic flowchart case (`key='mermaidGraph'`, `name='Mermaid Graph'`) both routes happen to match, which is why it appears to work with either case. +Detection goes by the `key` first. A `name` also counts when its title ends in "Mermaid Graph", "Mermaid Mind Map", "Mermaid Pie Chart" or "Lineage Graph" (or is "Mermaid Graph" or "Mermaid"). For the generic flowchart case (`key='mermaidGraph'`, `name='Mermaid Graph'`) both routes match, which is why it appears to work with either case. -#### Recognised camelCase mermaid keys (`MERMAID_ATTRIBUTE_KEYS`) +#### Any graph key Egeria returns is recognised (6.2.29) + +`is_mermaid_graph_key()` in `pyegeria/view/output_formatter.py` treats a key as a Mermaid graph when it ends in `MermaidGraph`, `MermaidMindMap`, `MermaidPieChart` or `LineageGraph` (the ending's case is ignored). The last covers `fieldLevelLineageGraph` and `localLineageGraph`, which carry no "Mermaid". So a new kind of graph from Egeria renders as Mermaid in a REPORT, HTML or MERMAID output with no code change; the table below lists the keys known so far. Vega-Lite keys (`...BarGraph`, `...PieGraph` and so on) are not matched and are checked first. + +#### The action and activity graphs follow the context graph (6.2.29) + +From Egeria 6.2.29 the context graph, `mermaidGraph`, leaves out relationships whose purpose is Action or Activity; `actionMermaidGraph` and `activityMermaidGraph` show them. So wherever a report offers the context graph (a column keyed `mermaidGraph`, or the `mermaid` column filled from it), pyegeria shows each of these two right after it, when the element carries it: + +| Output | What is added | +| :--- | :--- | +| MERMAID | A Mermaid block per companion graph, after the context graph | +| REPORT, and HTML (rendered from the REPORT) | `### Action Mermaid Graph` and `### Activity Mermaid Graph` sections, after the context graph | +| DICT | `Action Mermaid Graph` and `Activity Mermaid Graph` entries, after the context graph's entry | +| TABLE, LIST, MD, FORM | Nothing: every row of a table has the same columns, and MD/FORM show no graphs | + +A companion the spec already selects (for example `Asset-Graph`'s own `Action Graph` column) is not repeated, and an element that carries neither key gives exactly the output it gave before. Egeria already returns `actionMermaidGraph` (for Assets, for example), so this changes output today: `Asset-Graph`'s MERMAID shows the context graph, then the action graph. + +**Key on every row.** In a DICT result of several rows, when any row carries a companion, every row gets that key right after its context graph, with `""` where the element has none, so a table renderer sees one row shape. A single row, or rows none of which carries a companion, are left as they are. + +#### Mermaid keys named so far (`MERMAID_ATTRIBUTE_KEYS`) | Key | Typical content | | :--- | :--- | @@ -442,7 +461,8 @@ The `name` field has no effect on detection for pie chart or custom graph column | `anchorMermaidGraph` | Anchor graph | | `informationSupplyChainMermaidGraph` | Information supply chain | | `fieldLevelLineageGraph` | Field-level lineage | -| `actionMermaidGraph` | Governance action graph | +| `actionMermaidGraph` | Relationships whose purpose is Action (left out of `mermaidGraph` from Egeria 6.2.29) | +| `activityMermaidGraph` | Relationships whose purpose is Activity (left out of `mermaidGraph` from Egeria 6.2.29) | | `localLineageGraph` | Local lineage | | `edgeMermaidGraph` | Edge graph | | `iscImplementationMermaidGraph` | ISC implementation graph (context, solution-component design, implementation status). Servers before Egeria 6.3 sent `iscimplementationMermaidGraph`; it is matched case-insensitively | @@ -458,8 +478,13 @@ The `name` field has no effect on detection for pie chart or custom graph column | `zoneProfileMermaidPieChart` | Zone membership profile | | `zoneProfileAnchoredMermaidPieChart` | Zone anchored-elements profile | | `zoneProfileAllMermaidPieChart` | Zone all-elements profile | +| `userAccountTypeProfileMermaidPieChart` | Secrets collection: user accounts by type | +| `userAccountStatusProfileMermaidPieChart` | Secrets collection: user accounts by status | +| `organizationTreeMermaidGraph` | Organization tree | +| `rootHierarchyMermaidGraph` | Root hierarchy | +| `fullLineageMermaidGraph` | Full lineage | -If you add a new mermaid attribute not in this table, add its camelCase key to `MERMAID_ATTRIBUTE_KEYS` in `pyegeria/view/output_formatter.py`. +A key with one of the endings above needs no entry here. Add a key to `MERMAID_ATTRIBUTE_KEYS` only if Egeria ever names a graph without one of those endings. ### Syntax Compatibility Egeria often produces Mermaid output using newer syntax features (like `@ { shape: ... }`) or YAML frontmatter that some Markdown renderers (e.g., Obsidian, PyCharm) do not yet support. diff --git a/docs/release-notes/6.2.29.md b/docs/release-notes/6.2.29.md index 82b2dc7a..3f340aa4 100644 --- a/docs/release-notes/6.2.29.md +++ b/docs/release-notes/6.2.29.md @@ -60,3 +60,29 @@ it still scans every `SemanticAssignment` relationship. Its viewer term count (13.5 s live) now runs on its own thread while the scan pages: 22.6 s became 16.8 s live, with the same answer (984 orphans of 1,061 terms). +- **A report that offers the context graph (`mermaidGraph`) now also shows the action and activity graphs + when Egeria returns them.** This changes output today: Egeria already returns `actionMermaidGraph`, for example + for Assets. + - From Egeria 6.2.29 `mermaidGraph` leaves out relationships whose purpose is Action or Activity. Two graphs + show them instead: `actionMermaidGraph` (already returned, for Assets and others) and `activityMermaidGraph` + (new). + - "Offers the context graph" means a `mermaidGraph` column, or the `mermaid` column filled from it. Each of the + two graphs follows the context graph, when the element carries it: + - as a Mermaid block in MERMAID; + - as a section in REPORT and HTML; + - as an entry in DICT. + - **For example, `Asset-Graph`'s MERMAID output now has two blocks for an asset with an action graph: the context + graph, then the action graph.** + - A graph the spec already selects is not repeated (`Asset-Graph`'s REPORT shows its own `Action Graph` once). + TABLE, LIST, MD and FORM are unchanged. + - **Key on every row.** In a DICT result of several rows, if any row carries `Action Mermaid Graph` or `Activity + Mermaid Graph`, every row gets that key, after its context graph, empty (`""`) where the element has none. So + the rows keep one shape for table renderers. A single row, or rows none of which carries one, are unchanged. + - An element that carries neither graph gives the output it gave in 6.2.28. Checked by rendering every spec in + every declared format (674 renders) before and after; the seed is unchanged. +- **Any graph Egeria returns renders as Mermaid.** `is_mermaid_graph_key()` recognises a key ending in + `MermaidGraph`, `MermaidMindMap`, `MermaidPieChart` or `LineageGraph`, so a new kind of graph needs no code change. + - That covers the keys pyegeria did not name before: `activityMermaidGraph`, the `userAccountTypeProfile` and + `userAccountStatusProfile` pie charts, and others. + - Vega-Lite keys (`...BarGraph`, `...PieGraph`) are not matched. + - A column title ending in "Mermaid Graph", "Mermaid Mind Map", "Mermaid Pie Chart" or "Lineage Graph" also counts. diff --git a/pyegeria/view/output_formatter.py b/pyegeria/view/output_formatter.py index 5025971b..0eb823bc 100644 --- a/pyegeria/view/output_formatter.py +++ b/pyegeria/view/output_formatter.py @@ -112,16 +112,65 @@ def _resolve_normalize_mermaid_flag(default: bool = True) -> bool: "zoneProfileAllMermaidPieChart", "userAccountTypeProfileMermaidPieChart", "userAccountStatusProfileMermaidPieChart", + "activityMermaidGraph", } +#: Egeria names every graph it returns with one of these endings (6.2.29). Two lineage keys, +#: fieldLevelLineageGraph and localLineageGraph, carry no "Mermaid", hence "LineageGraph". +#: A key with one of these endings is a Mermaid graph, so a new kind of graph from Egeria is +#: recognised without a code change. MERMAID_ATTRIBUTE_KEYS stays for the keys named so far. +MERMAID_KEY_SUFFIXES = ("MermaidGraph", "MermaidMindMap", "MermaidPieChart", "LineageGraph") +_MERMAID_KEY_SUFFIXES_LOWER = tuple(s.lower() for s in MERMAID_KEY_SUFFIXES) +_MERMAID_TITLE_SUFFIXES = ("Mermaid Graph", "Mermaid Mind Map", "Mermaid Pie Chart", "Lineage Graph") + +#: From Egeria 6.2.29 the context graph (mermaidGraph) leaves out relationships whose purpose is +#: Action or Activity; these two graphs show them. Wherever a report offers mermaidGraph, these +#: follow it when the element carries them, so those relationships do not vanish from the report. +MERMAID_COMPANION_GRAPHS = ( + ("actionMermaidGraph", "Action Mermaid Graph"), + ("activityMermaidGraph", "Activity Mermaid Graph"), +) +#: Column keys that carry the context graph: the response key itself, and the 'mermaid' column +#: that populate_common_columns fills from mermaidGraph. +_CONTEXT_GRAPH_KEYS = ("mermaidGraph", "mermaid") + + +def is_mermaid_graph_key(key: str | None) -> bool: + """True when `key` names a Mermaid graph in an Egeria response (case of the ending ignored).""" + if not isinstance(key, str) or not key: + return False + return key in MERMAID_ATTRIBUTE_KEYS or key.lower().endswith(_MERMAID_KEY_SUFFIXES_LOWER) + def _is_mermaid_attribute(attribute_name: str | None = None, attribute_key: str | None = None) -> bool: """Return True when a selected report attribute should be rendered as Mermaid.""" - if attribute_key in MERMAID_ATTRIBUTE_KEYS: + if is_mermaid_graph_key(attribute_key): return True attribute_title = camel_to_title_case(attribute_name or "") - return attribute_title in MERMAID_GRAPH_TITLES + ["Mermaid Graph", "Mermaid"] + return (attribute_title in MERMAID_GRAPH_TITLES + ["Mermaid Graph", "Mermaid"] + or attribute_title.endswith(_MERMAID_TITLE_SUFFIXES)) + + +def _companion_mermaid_columns(element: Any, column_keys) -> list[dict]: + """The action/activity graphs to show after the context graph, as columns. + + Only when the report offers the context graph (a column keyed mermaidGraph or 'mermaid'), + only for a companion the report does not already select, and only when the element carries + it with a value. An element with neither key gets nothing, so its output is unchanged. + """ + keys = set(k for k in column_keys if k) + if not isinstance(element, dict) or not keys.intersection(_CONTEXT_GRAPH_KEYS): + return [] + lower = {k.lower() for k in keys if isinstance(k, str)} + result = [] + for key, name in MERMAID_COMPANION_GRAPHS: + if key.lower() in lower: + continue + value = _get_mermaid_graph_value(element, key) + if value not in (None, ""): + result.append({"name": name, "key": key, "value": value}) + return result _VEGA_KEY_SUFFIXES = ("BarGraph", "PieGraph", "VegaGraph", "LineGraph", "AreaGraph", "ScatterGraph", "FunnelGraph") @@ -254,6 +303,9 @@ def _extract_selected_mermaid_fields(element: dict, columns_struct: Optional[dic # Legacy compatibility: if no explicit Mermaid fields were selected, use mermaidGraph. if not selected_fields: selected_fields = [{"name": "Mermaid Graph", "key": "mermaidGraph"}] + # The action and activity graphs follow the context graph when the element carries them. + selected_fields = selected_fields + _companion_mermaid_columns( + element, [attribute.get("key") for attribute in selected_fields]) result = [] for attribute in selected_fields: @@ -1184,6 +1236,9 @@ def generate_entity_md(elements: List[Dict], # Add attributes based on column spec if available, otherwise, add all (legacy) if returned_struct is not None: cols = returned_struct.get('formats', {}).get('attributes', []) + # The action and activity graphs follow the context graph in a REPORT (and so in HTML). + companions = (_companion_mermaid_columns(element, [c.get('key') for c in cols if isinstance(c, dict)]) + if output_format == 'REPORT' else []) for column in cols: name = column.get('name') key = column.get('key') @@ -1196,6 +1251,11 @@ def generate_entity_md(elements: List[Dict], value = format_for_markdown_table(value, guid) elements_md += make_md_attribute(name, value, output_format, attribute_key=key) + if companions and key in _CONTEXT_GRAPH_KEYS: + for companion in companions: + elements_md += make_md_attribute(companion["name"], companion["value"], output_format, + attribute_key=companion["key"]) + companions = [] # Master-Detail support for REPORT, MD, and FORM formats if detail_spec and value and output_format in ['REPORT', 'MD', 'FORM']: @@ -1224,6 +1284,8 @@ def generate_entity_md(elements: List[Dict], elements_md += ", ".join(wk) elif base_columns: # If we have columns but extractor didn't return struct, use legacy props lookup + companions = (_companion_mermaid_columns(element, [c.get('key') for c in base_columns]) + if output_format == 'REPORT' else []) for column in base_columns: key = column['key'] name = column['name'] @@ -1235,6 +1297,11 @@ def generate_entity_md(elements: List[Dict], if column.get('format'): value = format_for_markdown_table(value, guid or props.get('GUID')) elements_md += make_md_attribute(name, value, output_format, attribute_key=key) + if companions and key in _CONTEXT_GRAPH_KEYS: + for companion in companions: + elements_md += make_md_attribute(companion["name"], companion["value"], output_format, + attribute_key=companion["key"]) + companions = [] if output_format in ('REPORT', 'MD', 'FORM') and (wk := columns_struct.get("annotations", {}).get("wikilinks", None)): elements_md += ", ".join(wk) else: @@ -1456,6 +1523,33 @@ def generate_entity_md_table(elements: List[Dict], return elements_md +def _uniform_companion_keys(rows: List[Dict], row_context_keys: List[Optional[str]]) -> None: + """Key on every row (owner, 2026-11-09): when any DICT row carries a companion graph, every row + gets that key, empty ("") where its element has none, right after the row's context graph, so + table renderers see one row shape. A single row, or rows with no companion, are left as they are. + """ + names = [name for _, name in MERMAID_COMPANION_GRAPHS if any(name in row for row in rows)] + if not names or len(rows) < 2: + return + for row, context_key in zip(rows, row_context_keys): + if all(name in row for name in names): + continue + values = {name: row.get(name, "") for name in names} + if context_key not in row: + for name in names: + row.setdefault(name, "") + continue + rebuilt = {} + for key, value in row.items(): + if key in values: + continue + rebuilt[key] = value + if key == context_key: + rebuilt.update(values) + row.clear() + row.update(rebuilt) + + def generate_entity_dict(elements: List[Dict], extract_properties_func: Callable, get_additional_props_func: Optional[Callable] = None, @@ -1479,6 +1573,7 @@ def generate_entity_dict(elements: List[Dict], list: List of entity dictionaries """ result = [] + row_context_keys = [] ##### # Add attributes based on column spec if available, otherwise, add all @@ -1515,8 +1610,15 @@ def generate_entity_dict(elements: List[Dict], # Create entity dictionary entity_dict = {} + context_dict_key = None # the DICT key of the context graph's column, if the row has one cols = local_columns_struct['formats'].get('attributes', None) if local_columns_struct else None + # The action and activity graphs follow the context graph in a DICT (not in a TABLE, whose + # rows must all have the same columns). + companion_source = (returned_struct.get('formats', {}).get('attributes', []) if returned_struct is not None + else cols or []) + companions = (_companion_mermaid_columns(element, [c.get('key') for c in companion_source if isinstance(c, dict)]) + if output_format == 'DICT' else []) if returned_struct is not None: for column in returned_struct.get('formats', {}).get('attributes', []): key = column.get('key') @@ -1558,6 +1660,12 @@ def generate_entity_dict(elements: List[Dict], tmp_key = f"{dict_key}_{suffix_idx}" dict_key = tmp_key entity_dict[dict_key] = value + if key in _CONTEXT_GRAPH_KEYS and context_dict_key is None: + context_dict_key = dict_key + if companions and key in _CONTEXT_GRAPH_KEYS: + for companion in companions: + entity_dict.setdefault(companion["name"], companion["value"]) + companions = [] elif cols: for column in cols: key = column['key'] @@ -1580,6 +1688,12 @@ def generate_entity_dict(elements: List[Dict], tmp_key = f"{dict_key}_{suffix_idx}" dict_key = tmp_key entity_dict[dict_key] = value + if key in _CONTEXT_GRAPH_KEYS and context_dict_key is None: + context_dict_key = dict_key + if companions and key in _CONTEXT_GRAPH_KEYS: + for companion in companions: + entity_dict.setdefault(companion["name"], companion["value"]) + companions = [] else: props = extract_properties_func(element, local_columns_struct) # Add properties based on include/exclude lists @@ -1595,6 +1709,10 @@ def generate_entity_dict(elements: List[Dict], entity_dict[key] = value result.append(entity_dict) + row_context_keys.append(context_dict_key) + + if output_format == 'DICT': + _uniform_companion_keys(result, row_context_keys) ##### # for element in elements: # if element is None: @@ -1848,6 +1966,13 @@ def populate_common_columns( if key in MERMAID_GRAPHS and mermaid_dest_key not in MERMAID_GRAPHS: column['value'] = _get_mermaid_graph_value(element, key) or '' continue + # Any other graph key (the generic endings): fill it only when the element carries it, + # so a column the element lacks keeps the value it had before. + if is_mermaid_graph_key(key) and mermaid_dest_key not in MERMAID_GRAPHS: + graph_value = _get_mermaid_graph_value(element, key) + if graph_value is not None: + column['value'] = graph_value + continue # --- Auto-generate Vega graphs for categorical counts if requested by the columns_struct --- # Only do the heavy recursive scan if the report spec actually asks for a BarGraph or PieGraph diff --git a/tests/micro-tests/data/graph_keys_responses.json b/tests/micro-tests/data/graph_keys_responses.json new file mode 100644 index 00000000..309db3e6 --- /dev/null +++ b/tests/micro-tests/data/graph_keys_responses.json @@ -0,0 +1,853 @@ +{ + "_recorded": "qs-view-server, read only, 2026-11-09 (pyegeria 6.2.29 work). 'zone' is one element of GovernanceOfficer.find_governance_definitions(metadata_element_subtypes=['GovernanceZone']); 'lineage' is AssetCatalog.get_asset_lineage_graph_by_guid for one asset. The platform did not yet return activityMermaidGraph, collectionMermaidMindMap, zoneProfileAnchoredMermaidPieChart, the userAccount*Profile pie charts, fieldLevelLineageGraph or localLineageGraph; the tests add those to copies of these elements.", + "zone": { + "class": "OpenMetadataRootElement", + "elementHeader": { + "class": "ElementHeader", + "headerVersion": 0, + "status": "ACTIVE", + "type": { + "typeId": "290a192b-42a7-449a-935a-269ca62cfdac", + "typeName": "GovernanceZone", + "superTypeNames": [ + "SecurityAccessControl", + "GovernanceControl", + "GovernanceDefinition", + "AuthoredReferenceable", + "Referenceable", + "OpenMetadataRoot" + ], + "typeVersion": 1, + "typeDescription": "Defines a collection of elements that are suitable for a particular usage or are governed by a particular process.", + "typeCategory": "ENTITY_DEF" + }, + "origin": { + "sourceServer": "qs-metadata-store", + "originCategory": "LOCAL_COHORT", + "homeMetadataCollectionId": "9905c3cb-94c5-4494-9229-0d6f69c0b842", + "homeMetadataCollectionName": "qs-metadata-store" + }, + "versions": { + "createdBy": "secretsstorecatnpa", + "updatedBy": "secretsstorecatnpa", + "maintainedBy": [ + "secretsstorecatnpa" + ], + "createTime": "2026-11-07T15:10:24.790+00:00", + "updateTime": "2026-11-07T15:10:24.790+00:00", + "version": 1, + "lastRequestId": "1f6914b1-4b30-4645-bda8-c65ebd055112" + }, + "guid": "5f33bf8e-d6eb-421b-9a97-b58d56223999", + "anchor": { + "class": "ElementClassification", + "headerVersion": 0, + "status": "ACTIVE", + "type": { + "typeId": "aa44f302-2e43-4669-a1e7-edaae414fc6e", + "typeName": "Anchors", + "typeVersion": 1, + "typeDescription": "Identifies the anchor entity for an element that is part of a large composite object such as an asset.", + "typeCategory": "CLASSIFICATION_DEF" + }, + "origin": { + "sourceServer": "qs-metadata-store", + "originCategory": "LOCAL_COHORT", + "homeMetadataCollectionId": "9905c3cb-94c5-4494-9229-0d6f69c0b842", + "homeMetadataCollectionName": "qs-metadata-store" + }, + "versions": { + "createdBy": "secretsstorecatnpa", + "updatedBy": "secretsstorecatnpa", + "maintainedBy": [ + "secretsstorecatnpa" + ], + "createTime": "2026-11-07T15:10:24.786+00:00", + "updateTime": "2026-11-07T15:10:24.786+00:00", + "version": 1, + "lastRequestId": "1f6914b1-4b30-4645-bda8-c65ebd055112" + }, + "classificationOrigin": "ASSIGNED", + "classificationName": "Anchors", + "classificationProperties": { + "class": "AnchorsProperties", + "typeName": "Anchors", + "anchorGUID": "68894392-8508-4252-bde6-ed378e2e3e69", + "anchorTypeName": "SecretsCollection", + "anchorDomainName": "Asset" + } + }, + "zoneMembershipProfile": { + "class": "ElementClassification", + "headerVersion": 0, + "status": "ACTIVE", + "type": { + "typeId": "b01d574f-5987-4849-a6b3-1f27b79e8ed5", + "typeName": "ZoneMembershipProfile", + "typeVersion": 2, + "typeDescription": "Statistics covering the membership of the governance zone.", + "typeCategory": "CLASSIFICATION_DEF" + }, + "origin": { + "sourceServer": "qs-metadata-store", + "originCategory": "LOCAL_COHORT", + "homeMetadataCollectionId": "9905c3cb-94c5-4494-9229-0d6f69c0b842", + "homeMetadataCollectionName": "qs-metadata-store" + }, + "versions": { + "createdBy": "egeriagovernanceengine", + "updatedBy": "egeriagovernanceengine", + "maintainedBy": [ + "egeriagovernanceengine" + ], + "createTime": "2026-11-07T15:10:41.997+00:00", + "updateTime": "2026-11-09T17:44:15.691+00:00", + "version": 94, + "lastRequestId": "dc170caa-c370-4be1-b867-25a089ed4cc3" + }, + "classificationOrigin": "ASSIGNED", + "classificationName": "ZoneMembershipProfile", + "classificationProperties": { + "class": "ZoneMembershipProfileProperties", + "typeName": "ZoneMembershipProfile", + "totalMembership": 9, + "typeMembership": { + "SoftwareServer": 9 + }, + "anchoredTotalMembership": 0, + "allTotalMembership": 9, + "allTypeMembership": { + "SoftwareServer": 9 + }, + "analysisTime": "2026-11-09T17:44:15.573+00:00" + } + } + }, + "definedInSecretsCollection": [ + { + "class": "RelatedMetadataElementSummary", + "relationshipHeader": { + "class": "ElementHeader", + "headerVersion": 0, + "status": "ACTIVE", + "type": { + "typeId": "f7416148-c8ca-42e4-bbf0-2e536b7ecd21", + "typeName": "ResourcePermissions", + "typeVersion": 1, + "typeDescription": "Links a secrets collection to a security access control.", + "typeCategory": "RELATIONSHIP_DEF" + }, + "origin": { + "sourceServer": "qs-metadata-store", + "originCategory": "LOCAL_COHORT", + "homeMetadataCollectionId": "9905c3cb-94c5-4494-9229-0d6f69c0b842", + "homeMetadataCollectionName": "qs-metadata-store" + }, + "versions": { + "createdBy": "secretsstorecatnpa", + "updatedBy": "secretsstorecatnpa", + "maintainedBy": [ + "secretsstorecatnpa" + ], + "createTime": "2026-11-07T15:10:24.846+00:00", + "updateTime": "2026-11-07T15:10:24.846+00:00", + "version": 1, + "lastRequestId": "1f6914b1-4b30-4645-bda8-c65ebd055112" + }, + "guid": "399d8694-4adc-4ef1-86c4-8cf955d98567" + }, + "relatedElement": { + "elementHeader": { + "class": "ElementHeader", + "headerVersion": 0, + "status": "ACTIVE", + "type": { + "typeId": "979d97dd-6782-4648-8e2a-8982994533e6", + "typeName": "SecretsCollection", + "superTypeNames": [ + "DataSet", + "DataAsset", + "Asset", + "Referenceable", + "OpenMetadataRoot" + ], + "typeVersion": 1, + "typeDescription": "A data set containing authentication and related security information.", + "typeCategory": "ENTITY_DEF" + }, + "origin": { + "sourceServer": "qs-metadata-store", + "originCategory": "LOCAL_COHORT", + "homeMetadataCollectionId": "9905c3cb-94c5-4494-9229-0d6f69c0b842", + "homeMetadataCollectionName": "qs-metadata-store" + }, + "versions": { + "createdBy": "secretsstorecatnpa", + "updatedBy": "secretsstorecatnpa", + "maintainedBy": [ + "secretsstorecatnpa" + ], + "createTime": "2026-11-07T15:09:41.796+00:00", + "updateTime": "2026-11-07T15:09:41.796+00:00", + "version": 1, + "lastRequestId": "1f6914b1-4b30-4645-bda8-c65ebd055112" + }, + "guid": "68894392-8508-4252-bde6-ed378e2e3e69", + "anchor": { + "class": "ElementClassification", + "headerVersion": 0, + "status": "ACTIVE", + "type": { + "typeId": "aa44f302-2e43-4669-a1e7-edaae414fc6e", + "typeName": "Anchors", + "typeVersion": 1, + "typeDescription": "Identifies the anchor entity for an element that is part of a large composite object such as an asset.", + "typeCategory": "CLASSIFICATION_DEF" + }, + "origin": { + "sourceServer": "qs-metadata-store", + "originCategory": "LOCAL_COHORT", + "homeMetadataCollectionId": "9905c3cb-94c5-4494-9229-0d6f69c0b842", + "homeMetadataCollectionName": "qs-metadata-store" + }, + "versions": { + "createdBy": "secretsstorecatnpa", + "updatedBy": "secretsstorecatnpa", + "maintainedBy": [ + "secretsstorecatnpa" + ], + "createTime": "2026-11-07T15:09:41.789+00:00", + "updateTime": "2026-11-07T15:09:41.789+00:00", + "version": 1, + "lastRequestId": "1f6914b1-4b30-4645-bda8-c65ebd055112" + }, + "classificationOrigin": "ASSIGNED", + "classificationName": "Anchors", + "classificationProperties": { + "class": "AnchorsProperties", + "typeName": "Anchors", + "anchorTypeName": "SecretsCollection", + "anchorDomainName": "Asset" + } + }, + "usageActivity": { + "class": "ElementClassification", + "headerVersion": 0, + "status": "ACTIVE", + "type": { + "typeId": "cfae23a1-8020-431f-a603-1f1bb0e01cb3", + "typeName": "UsageActivity", + "typeVersion": 1, + "typeDescription": "Describes the usage activity around an anchor element and its anchored elements: how often it is explicitly retrieved, found through searches, has its properties updated, and has its attachments and feedback updated or deleted.", + "typeCategory": "CLASSIFICATION_DEF" + }, + "origin": { + "sourceServer": "qs-metadata-store", + "originCategory": "LOCAL_COHORT", + "homeMetadataCollectionId": "9905c3cb-94c5-4494-9229-0d6f69c0b842", + "homeMetadataCollectionName": "qs-metadata-store" + }, + "versions": { + "createdBy": "pepysnpa", + "updatedBy": "pepysnpa", + "maintainedBy": [ + "pepysnpa" + ], + "createTime": "2026-11-07T16:17:45.461+00:00", + "updateTime": "2026-11-09T16:06:14.907+00:00", + "version": 10, + "lastRequestId": "9cb9e734-9c44-49fb-9f9f-7810807c2fa5" + }, + "classificationOrigin": "ASSIGNED", + "classificationName": "UsageActivity", + "classificationProperties": { + "class": "UsageActivityProperties", + "typeName": "UsageActivity", + "explicitGetCount": 0, + "findCount": 29, + "updatePropertyCount": 0, + "updateAttachmentCount": 0, + "updateFeedbackCount": 0, + "deleteAttachmentCount": 0, + "deleteFeedbackCount": 0 + } + }, + "userAccountProfile": { + "class": "ElementClassification", + "headerVersion": 0, + "status": "ACTIVE", + "type": { + "typeId": "131d849f-f3c4-4ec8-b130-47a5e32affa8", + "typeName": "UserAccountProfile", + "typeVersion": 1, + "typeDescription": "A description of the types of user accounts and their status found in the attached secrets collection.", + "typeCategory": "CLASSIFICATION_DEF" + }, + "origin": { + "sourceServer": "qs-metadata-store", + "originCategory": "LOCAL_COHORT", + "homeMetadataCollectionId": "9905c3cb-94c5-4494-9229-0d6f69c0b842", + "homeMetadataCollectionName": "qs-metadata-store" + }, + "versions": { + "createdBy": "secretsstorecatnpa", + "updatedBy": "secretsstorecatnpa", + "maintainedBy": [ + "secretsstorecatnpa" + ], + "createTime": "2026-11-07T15:09:41.993+00:00", + "updateTime": "2026-11-07T15:09:41.993+00:00", + "version": 1, + "lastRequestId": "1f6914b1-4b30-4645-bda8-c65ebd055112" + }, + "classificationOrigin": "ASSIGNED", + "classificationName": "UserAccountProfile", + "classificationProperties": { + "class": "UserAccountProfileProperties", + "typeName": "UserAccountProfile", + "userAccountCount": 329, + "employeeAccountCount": 243, + "contractorAccountCount": 2, + "externalAccountCount": 5, + "digitalAccountCount": 79, + "activeAccountCount": 329, + "expiredAccountCount": 0, + "lockedAccountCount": 0, + "disabledAccountCount": 0, + "userAccountTypes": { + "Employee": 243, + "Contractor": 2, + "External": 5, + "Digital": 79 + }, + "userAccountStatuses": { + "Locked": 0, + "Prepared": 0, + "Available": 329, + "Disabled": 0 + } + } + } + }, + "properties": { + "class": "SecretsCollectionProperties", + "typeName": "SecretsCollection", + "qualifiedName": "SecretsCollection::2cf9aa3c-6537-4983-8282-162e2dee2961::cocoUserDirectory", + "displayName": "cocoUserDirectory", + "additionalProperties": { + "refreshTimeInterval": "10" + }, + "resourceName": "cocoUserDirectory" + } + }, + "relatedElementAtEnd1": true + } + ], + "properties": { + "class": "GovernanceZoneProperties", + "typeName": "GovernanceZone", + "qualifiedName": "GovernanceZone::68894392-8508-4252-bde6-ed378e2e3e69::sustainability", + "identifier": "sustainability", + "displayName": "Sustainability Zone", + "description": "Resources used to build reports that illustrate the status of Coco Pharmaceuticals' greenhouse gas emissions and sustainability initiatives.", + "domainIdentifier": 9, + "criteria": "Activity data that relates to sustainability." + }, + "mermaidGraph": "---\ntitle: GovernanceZone - Sustainability Zone [5f33bf8e-d6eb-421b-9a97-b58d56223999]\n---\nflowchart TD\n%%{init: {\"flowchart\": {\"htmlLabels\": false}} }%%\n\n1@{ shape: rounded, label: \"*Governance Zone*\n**Sustainability Zone**\"}\n2@{ shape: cyl, label: \"*Secrets Collection*\n**cocoUserDirectory**\"}\n2==>|\"Resource Permissions\"|1\nstyle 1 color:#000000, fill:#e0ab18, stroke:#004563\nstyle 2 color:#000000, fill:#BDB76B, stroke:#004563\n", + "zoneProfileMermaidPieChart": "pie\ntitle Membership of Sustainability Zone\n\"SoftwareServer (9)\" : 9\n", + "zoneProfileAllMermaidPieChart": "pie\ntitle All Elements of Sustainability Zone\n\"SoftwareServer (9)\" : 9\n" + }, + "lineage": { + "class": "AssetLineageGraph", + "elementHeader": { + "class": "ElementHeader", + "headerVersion": 0, + "status": "ACTIVE", + "type": { + "typeId": "206a6e44-ffe7-408b-8e59-79842d362776", + "typeName": "GovernanceActionProcessInstance", + "superTypeNames": [ + "TransientEmbeddedProcess", + "EmbeddedProcess", + "Action", + "Process", + "Asset", + "Referenceable", + "OpenMetadataRoot" + ], + "typeVersion": 1, + "typeDescription": "Represents a single run of a governance action process. It is linked to the parent governance action process using the GovernedBy relationship.", + "typeCategory": "ENTITY_DEF" + }, + "origin": { + "sourceServer": "qs-metadata-store", + "originCategory": "LOCAL_COHORT", + "homeMetadataCollectionId": "9905c3cb-94c5-4494-9229-0d6f69c0b842", + "homeMetadataCollectionName": "qs-metadata-store" + }, + "versions": { + "createdBy": "baudotnpa", + "updatedBy": "egeriagovernanceengine", + "maintainedBy": [ + "baudotnpa", + "egeriagovernanceengine" + ], + "createTime": "2026-11-09T17:57:09.491+00:00", + "updateTime": "2026-11-09T17:57:14.984+00:00", + "version": 4, + "lastRequestId": "b8cedf83-7396-4801-adcc-697621dfde12" + }, + "guid": "6605ec5b-7b10-4bef-96b0-75015518f450", + "anchor": { + "class": "ElementClassification", + "headerVersion": 0, + "status": "ACTIVE", + "type": { + "typeId": "aa44f302-2e43-4669-a1e7-edaae414fc6e", + "typeName": "Anchors", + "typeVersion": 1, + "typeDescription": "Identifies the anchor entity for an element that is part of a large composite object such as an asset.", + "typeCategory": "CLASSIFICATION_DEF" + }, + "origin": { + "sourceServer": "qs-metadata-store", + "originCategory": "LOCAL_COHORT", + "homeMetadataCollectionId": "9905c3cb-94c5-4494-9229-0d6f69c0b842", + "homeMetadataCollectionName": "qs-metadata-store" + }, + "versions": { + "createdBy": "baudotnpa", + "updatedBy": "baudotnpa", + "maintainedBy": [ + "baudotnpa" + ], + "createTime": "2026-11-09T17:57:09.483+00:00", + "updateTime": "2026-11-09T17:57:09.483+00:00", + "version": 1, + "lastRequestId": "5f961c08-c252-4b84-95c7-3c2c64697747" + }, + "classificationOrigin": "ASSIGNED", + "classificationName": "Anchors", + "classificationProperties": { + "class": "AnchorsProperties", + "typeName": "Anchors", + "anchorGUID": "16421df9-c1e5-4887-b033-788fb3ce7d7c", + "anchorTypeName": "ProvisioningActionProcess", + "anchorDomainName": "AuthoredReferenceable" + } + } + }, + "requestedActions": [ + { + "class": "RelatedMetadataElementSummary", + "relationshipHeader": { + "class": "ElementHeader", + "headerVersion": 0, + "status": "ACTIVE", + "type": { + "typeId": "a0b7ba50-4c97-4b76-9a7d-c6a00e1be646", + "typeName": "ActionRequester", + "superTypeNames": [ + "LineageRelationship", + "LabeledRelationship" + ], + "typeVersion": 2, + "typeDescription": "The source of the action, such as a person, meeting or a governance action.", + "typeCategory": "RELATIONSHIP_DEF" + }, + "origin": { + "sourceServer": "qs-metadata-store", + "originCategory": "LOCAL_COHORT", + "homeMetadataCollectionId": "9905c3cb-94c5-4494-9229-0d6f69c0b842", + "homeMetadataCollectionName": "qs-metadata-store" + }, + "versions": { + "createdBy": "baudotnpa", + "updatedBy": "baudotnpa", + "maintainedBy": [ + "baudotnpa" + ], + "createTime": "2026-11-09T17:57:12.323+00:00", + "updateTime": "2026-11-09T17:57:12.323+00:00", + "version": 1, + "lastRequestId": "5f961c08-c252-4b84-95c7-3c2c64697747" + }, + "guid": "30cff080-d2c1-4175-af9c-60e28ab10cfe" + }, + "relatedElement": { + "elementHeader": { + "class": "ElementHeader", + "headerVersion": 0, + "status": "ACTIVE", + "type": { + "typeId": "c976d88a-2b11-4b40-b972-c38d41bfc6be", + "typeName": "EngineAction", + "superTypeNames": [ + "Action", + "Process", + "Asset", + "Referenceable", + "OpenMetadataRoot" + ], + "typeVersion": 2, + "typeDescription": "An engine action that has been created to support the active governance of the open metadata ecosystem and/or digital landscape.", + "typeCategory": "ENTITY_DEF" + }, + "origin": { + "sourceServer": "qs-metadata-store", + "originCategory": "LOCAL_COHORT", + "homeMetadataCollectionId": "9905c3cb-94c5-4494-9229-0d6f69c0b842", + "homeMetadataCollectionName": "qs-metadata-store" + }, + "versions": { + "createdBy": "baudotnpa", + "updatedBy": "egeriagovernanceengine", + "maintainedBy": [ + "baudotnpa", + "egeriagovernanceengine" + ], + "createTime": "2026-11-09T17:57:10.043+00:00", + "updateTime": "2026-11-09T17:57:14.712+00:00", + "version": 4, + "lastRequestId": "b8cedf83-7396-4801-adcc-697621dfde12" + }, + "guid": "d4f23ebb-36ae-47e8-b1f3-0f711eb060ad", + "anchor": { + "class": "ElementClassification", + "headerVersion": 0, + "status": "ACTIVE", + "type": { + "typeId": "aa44f302-2e43-4669-a1e7-edaae414fc6e", + "typeName": "Anchors", + "typeVersion": 1, + "typeDescription": "Identifies the anchor entity for an element that is part of a large composite object such as an asset.", + "typeCategory": "CLASSIFICATION_DEF" + }, + "origin": { + "sourceServer": "qs-metadata-store", + "originCategory": "LOCAL_COHORT", + "homeMetadataCollectionId": "9905c3cb-94c5-4494-9229-0d6f69c0b842", + "homeMetadataCollectionName": "qs-metadata-store" + }, + "versions": { + "createdBy": "baudotnpa", + "updatedBy": "baudotnpa", + "maintainedBy": [ + "baudotnpa" + ], + "createTime": "2026-11-09T17:57:10.035+00:00", + "updateTime": "2026-11-09T17:57:10.035+00:00", + "version": 1, + "lastRequestId": "5f961c08-c252-4b84-95c7-3c2c64697747" + }, + "classificationOrigin": "ASSIGNED", + "classificationName": "Anchors", + "classificationProperties": { + "class": "AnchorsProperties", + "typeName": "Anchors", + "anchorGUID": "6605ec5b-7b10-4bef-96b0-75015518f450", + "anchorTypeName": "GovernanceActionProcessInstance", + "anchorDomainName": "Asset" + } + } + }, + "properties": { + "class": "EngineActionProperties", + "typeName": "EngineAction", + "qualifiedName": "ProvisioningActionProcess::provisioningGovernanceActionType::b23ba8f1-dd5a-40d5-a154-ad00475b996b:processStep1::7269bb32-1650-4102-9c6c-53a3e5a0c771", + "displayName": "provision-subscription (EgeriaGovernance)", + "description": "Governance Action Service that provisions the data identified in a digital subscription to the requested destination.", + "requestedStartTime": "2026-11-09T17:57:09.737+00:00", + "startTime": "2026-11-09T17:57:14.616+00:00", + "activityStatus": "IN_PROGRESS", + "domainIdentifier": 8, + "executorEngineGUID": "81d0292d-f074-41e3-93ec-dbecc45cc0c1", + "executorEngineName": "EgeriaGovernance", + "processName": "ProvisioningActionProcess::provisioningGovernanceActionType::b23ba8f1-dd5a-40d5-a154-ad00475b996b@1794247029462::6224fcbf-72e9-41cf-ad78-8518f15d0676", + "processStepGUID": "f261b73a-8683-4013-8a3d-8efa184cc8da", + "processStepName": "ProvisioningActionProcess::provisioningGovernanceActionType::b23ba8f1-dd5a-40d5-a154-ad00475b996b:processStep1", + "requesterUserId": "baudotnpa", + "requestType": "provision-subscription", + "requestParameters": { + "topLevelProcessLineageOnly": "true" + }, + "processingEngineUserId": "egeriagovernanceengine" + } + }, + "relatedElementAtEnd1": false + } + ], + "properties": { + "class": "GovernanceActionProcessInstanceProperties", + "typeName": "GovernanceActionProcessInstance", + "qualifiedName": "ProvisioningActionProcess::provisioningGovernanceActionType::b23ba8f1-dd5a-40d5-a154-ad00475b996b@1794247029462::6224fcbf-72e9-41cf-ad78-8518f15d0676", + "displayName": "provisioningGovernanceActionType@Mon Nov 09 17:57:09 GMT 2026", + "requestedTime": "2026-11-09T17:57:09.462+00:00", + "requestedStartTime": "2026-11-09T17:57:09.737+00:00", + "startTime": "2026-11-09T17:57:14.616+00:00", + "activityStatus": "IN_PROGRESS" + }, + "mermaidGraph": "---\ntitle: GovernanceActionProcessInstance - provisioningGovernanceActionType@Mon Nov 09 17:57:09 GMT 2026 [6605ec5b-7b10-4bef-96b0-75015518f450]\n---\nflowchart TD\n%%{init: {\"flowchart\": {\"htmlLabels\": false}} }%%\n\n1@{ shape: rounded, label: \"*Governance Action Process Instance*\n**provisioningGovernanceActionType@Mon Nov 09 17:57:09 GMT 2026**\"}\n2@{ shape: trap-t, label: \"*Engine Action*\n**provision-subscription (EgeriaGovernance)**\"}\n1==>|\"Action Requester\"|2\nstyle 1 color:#000000, fill:#e0ab18, stroke:#004563\nstyle 2 color:#000000, fill:#7fffd4, stroke:#000000\n", + "upstreamRelationships": [], + "downstreamRelationships": [ + { + "class": "RelatedMetadataNodeSummary", + "relationshipHeader": { + "class": "ElementHeader", + "headerVersion": 0, + "status": "ACTIVE", + "type": { + "typeId": "a0b7ba50-4c97-4b76-9a7d-c6a00e1be646", + "typeName": "ActionRequester", + "superTypeNames": [ + "LineageRelationship", + "LabeledRelationship" + ], + "typeVersion": 2, + "typeDescription": "The source of the action, such as a person, meeting or a governance action.", + "typeCategory": "RELATIONSHIP_DEF" + }, + "origin": { + "sourceServer": "qs-metadata-store", + "originCategory": "LOCAL_COHORT", + "homeMetadataCollectionId": "9905c3cb-94c5-4494-9229-0d6f69c0b842", + "homeMetadataCollectionName": "qs-metadata-store" + }, + "versions": { + "createdBy": "baudotnpa", + "updatedBy": "baudotnpa", + "maintainedBy": [ + "baudotnpa" + ], + "createTime": "2026-11-09T17:57:12.323+00:00", + "updateTime": "2026-11-09T17:57:12.323+00:00", + "version": 1, + "lastRequestId": "5f961c08-c252-4b84-95c7-3c2c64697747" + }, + "guid": "30cff080-d2c1-4175-af9c-60e28ab10cfe" + }, + "relatedElement": { + "elementHeader": { + "class": "ElementHeader", + "headerVersion": 0, + "status": "ACTIVE", + "type": { + "typeId": "c976d88a-2b11-4b40-b972-c38d41bfc6be", + "typeName": "EngineAction", + "superTypeNames": [ + "Action", + "Process", + "Asset", + "Referenceable", + "OpenMetadataRoot" + ], + "typeVersion": 2, + "typeDescription": "An engine action that has been created to support the active governance of the open metadata ecosystem and/or digital landscape.", + "typeCategory": "ENTITY_DEF" + }, + "origin": { + "sourceServer": "qs-metadata-store", + "originCategory": "LOCAL_COHORT", + "homeMetadataCollectionId": "9905c3cb-94c5-4494-9229-0d6f69c0b842", + "homeMetadataCollectionName": "qs-metadata-store" + }, + "versions": { + "createdBy": "baudotnpa", + "updatedBy": "egeriagovernanceengine", + "maintainedBy": [ + "baudotnpa", + "egeriagovernanceengine" + ], + "createTime": "2026-11-09T17:57:10.043+00:00", + "updateTime": "2026-11-09T17:57:14.712+00:00", + "version": 4, + "lastRequestId": "b8cedf83-7396-4801-adcc-697621dfde12" + }, + "guid": "d4f23ebb-36ae-47e8-b1f3-0f711eb060ad", + "anchor": { + "class": "ElementClassification", + "headerVersion": 0, + "status": "ACTIVE", + "type": { + "typeId": "aa44f302-2e43-4669-a1e7-edaae414fc6e", + "typeName": "Anchors", + "typeVersion": 1, + "typeDescription": "Identifies the anchor entity for an element that is part of a large composite object such as an asset.", + "typeCategory": "CLASSIFICATION_DEF" + }, + "origin": { + "sourceServer": "qs-metadata-store", + "originCategory": "LOCAL_COHORT", + "homeMetadataCollectionId": "9905c3cb-94c5-4494-9229-0d6f69c0b842", + "homeMetadataCollectionName": "qs-metadata-store" + }, + "versions": { + "createdBy": "baudotnpa", + "updatedBy": "baudotnpa", + "maintainedBy": [ + "baudotnpa" + ], + "createTime": "2026-11-09T17:57:10.035+00:00", + "updateTime": "2026-11-09T17:57:10.035+00:00", + "version": 1, + "lastRequestId": "5f961c08-c252-4b84-95c7-3c2c64697747" + }, + "classificationOrigin": "ASSIGNED", + "classificationName": "Anchors", + "classificationProperties": { + "class": "AnchorsProperties", + "typeName": "Anchors", + "anchorGUID": "6605ec5b-7b10-4bef-96b0-75015518f450", + "anchorTypeName": "GovernanceActionProcessInstance", + "anchorDomainName": "Asset" + } + } + }, + "properties": { + "class": "EngineActionProperties", + "typeName": "EngineAction", + "qualifiedName": "ProvisioningActionProcess::provisioningGovernanceActionType::b23ba8f1-dd5a-40d5-a154-ad00475b996b:processStep1::7269bb32-1650-4102-9c6c-53a3e5a0c771", + "displayName": "provision-subscription (EgeriaGovernance)", + "description": "Governance Action Service that provisions the data identified in a digital subscription to the requested destination.", + "requestedStartTime": "2026-11-09T17:57:09.737+00:00", + "startTime": "2026-11-09T17:57:14.616+00:00", + "activityStatus": "IN_PROGRESS", + "domainIdentifier": 8, + "executorEngineGUID": "81d0292d-f074-41e3-93ec-dbecc45cc0c1", + "executorEngineName": "EgeriaGovernance", + "processName": "ProvisioningActionProcess::provisioningGovernanceActionType::b23ba8f1-dd5a-40d5-a154-ad00475b996b@1794247029462::6224fcbf-72e9-41cf-ad78-8518f15d0676", + "processStepGUID": "f261b73a-8683-4013-8a3d-8efa184cc8da", + "processStepName": "ProvisioningActionProcess::provisioningGovernanceActionType::b23ba8f1-dd5a-40d5-a154-ad00475b996b:processStep1", + "requesterUserId": "baudotnpa", + "requestType": "provision-subscription", + "requestParameters": { + "topLevelProcessLineageOnly": "true" + }, + "processingEngineUserId": "egeriagovernanceengine" + } + }, + "relatedElementAtEnd1": false, + "startingElementGUID": "6605ec5b-7b10-4bef-96b0-75015518f450" + } + ], + "internalRelationships": [], + "hopsFromStart": 0, + "hopLimitReached": false, + "linkedAssets": [ + { + "class": "AssetLineageGraphNode", + "elementHeader": { + "class": "ElementHeader", + "headerVersion": 0, + "status": "ACTIVE", + "type": { + "typeId": "c976d88a-2b11-4b40-b972-c38d41bfc6be", + "typeName": "EngineAction", + "superTypeNames": [ + "Action", + "Process", + "Asset", + "Referenceable", + "OpenMetadataRoot" + ], + "typeVersion": 2, + "typeDescription": "An engine action that has been created to support the active governance of the open metadata ecosystem and/or digital landscape.", + "typeCategory": "ENTITY_DEF" + }, + "origin": { + "sourceServer": "qs-metadata-store", + "originCategory": "LOCAL_COHORT", + "homeMetadataCollectionId": "9905c3cb-94c5-4494-9229-0d6f69c0b842", + "homeMetadataCollectionName": "qs-metadata-store" + }, + "versions": { + "createdBy": "baudotnpa", + "updatedBy": "egeriagovernanceengine", + "maintainedBy": [ + "baudotnpa", + "egeriagovernanceengine" + ], + "createTime": "2026-11-09T17:57:10.043+00:00", + "updateTime": "2026-11-09T17:57:14.712+00:00", + "version": 4, + "lastRequestId": "b8cedf83-7396-4801-adcc-697621dfde12" + }, + "guid": "d4f23ebb-36ae-47e8-b1f3-0f711eb060ad", + "anchor": { + "class": "ElementClassification", + "headerVersion": 0, + "status": "ACTIVE", + "type": { + "typeId": "aa44f302-2e43-4669-a1e7-edaae414fc6e", + "typeName": "Anchors", + "typeVersion": 1, + "typeDescription": "Identifies the anchor entity for an element that is part of a large composite object such as an asset.", + "typeCategory": "CLASSIFICATION_DEF" + }, + "origin": { + "sourceServer": "qs-metadata-store", + "originCategory": "LOCAL_COHORT", + "homeMetadataCollectionId": "9905c3cb-94c5-4494-9229-0d6f69c0b842", + "homeMetadataCollectionName": "qs-metadata-store" + }, + "versions": { + "createdBy": "baudotnpa", + "updatedBy": "baudotnpa", + "maintainedBy": [ + "baudotnpa" + ], + "createTime": "2026-11-09T17:57:10.035+00:00", + "updateTime": "2026-11-09T17:57:10.035+00:00", + "version": 1, + "lastRequestId": "5f961c08-c252-4b84-95c7-3c2c64697747" + }, + "classificationOrigin": "ASSIGNED", + "classificationName": "Anchors", + "classificationProperties": { + "class": "AnchorsProperties", + "typeName": "Anchors", + "anchorGUID": "6605ec5b-7b10-4bef-96b0-75015518f450", + "anchorTypeName": "GovernanceActionProcessInstance", + "anchorDomainName": "Asset" + } + } + }, + "properties": { + "class": "EngineActionProperties", + "typeName": "EngineAction", + "qualifiedName": "ProvisioningActionProcess::provisioningGovernanceActionType::b23ba8f1-dd5a-40d5-a154-ad00475b996b:processStep1::7269bb32-1650-4102-9c6c-53a3e5a0c771", + "displayName": "provision-subscription (EgeriaGovernance)", + "description": "Governance Action Service that provisions the data identified in a digital subscription to the requested destination.", + "requestedStartTime": "2026-11-09T17:57:09.737+00:00", + "startTime": "2026-11-09T17:57:14.616+00:00", + "activityStatus": "IN_PROGRESS", + "domainIdentifier": 8, + "executorEngineGUID": "81d0292d-f074-41e3-93ec-dbecc45cc0c1", + "executorEngineName": "EgeriaGovernance", + "processName": "ProvisioningActionProcess::provisioningGovernanceActionType::b23ba8f1-dd5a-40d5-a154-ad00475b996b@1794247029462::6224fcbf-72e9-41cf-ad78-8518f15d0676", + "processStepGUID": "f261b73a-8683-4013-8a3d-8efa184cc8da", + "processStepName": "ProvisioningActionProcess::provisioningGovernanceActionType::b23ba8f1-dd5a-40d5-a154-ad00475b996b:processStep1", + "requesterUserId": "baudotnpa", + "requestType": "provision-subscription", + "requestParameters": { + "topLevelProcessLineageOnly": "true" + }, + "processingEngineUserId": "egeriagovernanceengine" + }, + "hopsFromStart": 1, + "hopLimitReached": false + } + ], + "lineageRelationships": [ + { + "relationshipTypes": [ + "ActionRequester" + ], + "end1AssetGUID": "6605ec5b-7b10-4bef-96b0-75015518f450", + "end2AssetGUID": "d4f23ebb-36ae-47e8-b1f3-0f711eb060ad" + } + ], + "fullLineageMermaidGraph": "---\ntitle: Lineage Analysis Graph for Asset - provisioningGovernanceActionType@Mon Nov 09 17:57:09 GMT 2026 [6605ec5b-7b10-4bef-96b0-75015518f450]\n---\nflowchart TD\n%%{init: {\"flowchart\": {\"htmlLabels\": false}} }%%\n\n1@{ shape: hex, label: \"*Governance Action Process Instance*\n**provisioningGovernanceActionType@Mon Nov 09 17:57:09 GMT 2026**\"}\n2@{ shape: trap-t, label: \"*Engine Action*\n**provision-subscription (EgeriaGovernance)**\"}\n1==>|\"ActionRequester\"|2\nstyle 1 color:#000000, fill:#e0ab18, stroke:#004563\nstyle 2 color:#000000, fill:#7fffd4, stroke:#000000\n", + "edgeMermaidGraph": "---\ntitle: Lineage Edge Analysis Graph for Asset - provisioningGovernanceActionType@Mon Nov 09 17:57:09 GMT 2026 [6605ec5b-7b10-4bef-96b0-75015518f450]\n---\nflowchart LR\n%%{init: {\"flowchart\": {\"htmlLabels\": false}} }%%\n\n1@{ shape: subproc, label: \"*Governance Action Process Instance*\n**provisioningGovernanceActionType@Mon Nov 09 17:57:09 GMT 2026**\"}\n2@{ shape: trap-t, label: \"*Engine Action*\n**provision-subscription (EgeriaGovernance)**\"}\n1==>|\"UltimateDestination\"|2\nstyle 1 color:#000000, fill:#BDB76B, stroke:#004563\nstyle 2 color:#000000, fill:#7fffd4, stroke:#000000\n" + } +} diff --git a/tests/micro-tests/test_asset_graph_spec.py b/tests/micro-tests/test_asset_graph_spec.py index b0b7086c..d3fccceb 100644 --- a/tests/micro-tests/test_asset_graph_spec.py +++ b/tests/micro-tests/test_asset_graph_spec.py @@ -1,6 +1,7 @@ """The Asset-Graph report spec (6.2.28): DICT and JSON for code, REPORT, HTML and MERMAID for people. DICT is the asset itself with its graph fields, JSON the full graph response, REPORT/HTML the -asset's fields with its graphs rendered, MERMAID the graph. Any other format is refused with words. +asset's fields with its graphs rendered, MERMAID the graph (and, from 6.2.29, the action and +activity graphs the element carries). Any other format is refused with words. The edge helper (pyegeria/view/asset_graph.py), kept for the Wave 3 edge-table spec, is tested directly at the end, not through the spec. @@ -144,15 +145,20 @@ def test_html_carries_the_graphs(offline_asset_catalog): assert "search string" not in content -def test_mermaid_is_the_asset_graph(offline_asset_catalog): +def test_mermaid_is_the_asset_graph_then_its_action_graph(offline_asset_catalog): + # 6.2.29: the action (and activity) graph follows the context graph when the element carries + # it, because Egeria's mermaidGraph leaves out Action and Activity relationships. result = _run("MERMAID") assert result["kind"] == "text" content = result["content"] - assert content.count("```mermaid") == 1 + assert "activityMermaidGraph" not in RECORDED # recorded before Egeria shipped it + assert content.count("```mermaid") == 2 from pyegeria.view.output_formatter import _format_mermaid_value - assert _format_mermaid_value(RECORDED["mermaidGraph"]) in content - for other in ("anchorMermaidGraph", "actionMermaidGraph"): - assert _format_mermaid_value(RECORDED[other]) not in content + context = _format_mermaid_value(RECORDED["mermaidGraph"]) + action = _format_mermaid_value(RECORDED["actionMermaidGraph"]) + assert context in content and action in content + assert content.index(context) < content.index(action) + assert _format_mermaid_value(RECORDED["anchorMermaidGraph"]) not in content @pytest.mark.parametrize("fmt", ["TABLE", "LIST", "MD", "FORM", "ALL"]) diff --git a/tests/micro-tests/test_mermaid_graph_keys.py b/tests/micro-tests/test_mermaid_graph_keys.py new file mode 100644 index 00000000..7c19c8c2 --- /dev/null +++ b/tests/micro-tests/test_mermaid_graph_keys.py @@ -0,0 +1,241 @@ +"""Egeria graph keys (6.2.29): a generic rule recognises every graph Egeria returns, and the action +and activity graphs follow the context graph wherever a report offers it. + +From Egeria 6.2.29 the context graph (mermaidGraph) leaves out relationships whose purpose is +Action or Activity; actionMermaidGraph and activityMermaidGraph show them. + +Recorded input (read only, qs-view-server): +- `data/graph_keys_responses.json`: a GovernanceZone carrying zoneProfileMermaidPieChart and + zoneProfileAllMermaidPieChart, and an asset lineage graph carrying fullLineageMermaidGraph and + edgeMermaidGraph; +- `data/asset_graph_by_guid_response.json`: an asset graph carrying anchorMermaidGraph and + actionMermaidGraph. +The platform did not yet return activityMermaidGraph, collectionMermaidMindMap, the anchored-zone +and user-account pie charts, fieldLevelLineageGraph or localLineageGraph; the tests add those to +copies of the recorded elements. +""" +from __future__ import annotations + +import copy +import json +from pathlib import Path + +import pytest + +from pyegeria.view import output_formatter as of +from pyegeria.view.base_report_formats import select_report_spec + +pytestmark = pytest.mark.unit + +DATA = Path(__file__).parent / "data" +RESPONSES = json.loads((DATA / "graph_keys_responses.json").read_text()) +ZONE = RESPONSES["zone"] +LINEAGE = RESPONSES["lineage"] +ASSET_GRAPH = json.loads((DATA / "asset_graph_by_guid_response.json").read_text())["response"] + +#: The 25 graph keys Egeria returns (owner's list, 2026-11-09). +EGERIA_GRAPH_KEYS = [ + "mermaidGraph", "anchorMermaidGraph", "actionMermaidGraph", "activityMermaidGraph", "edgeMermaidGraph", + "specificationMermaidGraph", "solutionBlueprintMermaidGraph", "solutionSubcomponentMermaidGraph", + "informationSupplyChainMermaidGraph", "iscImplementationMermaidGraph", "iscSystemFabricMermaidGraph", + "iscDataMeshMermaidGraph", "iscDataMappingMermaidGraph", "iscDataFabricMermaidGraph", + "organizationTreeMermaidGraph", "rootHierarchyMermaidGraph", "fullLineageMermaidGraph", + "collectionMermaidMindMap", + "zoneProfileMermaidPieChart", "zoneProfileAnchoredMermaidPieChart", "zoneProfileAllMermaidPieChart", + "userAccountTypeProfileMermaidPieChart", "userAccountStatusProfileMermaidPieChart", + "fieldLevelLineageGraph", "localLineageGraph", +] + +ACTION = "flowchart LR\n A[Engine] -->|ActionTarget| B[Stock]" +ACTIVITY = "flowchart LR\n P[Process] -->|ProcessCall| S[Step]" + + +def _with(element, **graphs): + el = copy.deepcopy(element) + el.update(graphs) + return el + + +# ── the generic rule ── + +def test_every_egeria_graph_key_is_recognised(): + assert len(EGERIA_GRAPH_KEYS) == 25 + for key in EGERIA_GRAPH_KEYS: + assert of.is_mermaid_graph_key(key), key + assert of._is_mermaid_attribute("Whatever", key), key + + +def test_a_new_kind_of_graph_is_recognised_without_a_code_change(): + for key in ("somethingNewMermaidGraph", "glossaryMermaidMindMap", "zoneAgeMermaidPieChart", + "columnLineageGraph", "iscimplementationMermaidGraph"): + assert of.is_mermaid_graph_key(key), key + for title in ("Something New Mermaid Graph", "Glossary Mermaid Mind Map", "Zone Age Mermaid Pie Chart", + "Column Lineage Graph"): + assert of._is_mermaid_attribute(title, None), title + + +def test_vega_and_ordinary_keys_are_not_mermaid(): + for key in ("typeMembershipPieGraph", "typeMembershipBarGraph", "userAccountTypeProfileBarGraph", + "displayName", "graph", "mermaid_like", None, ""): + assert not of.is_mermaid_graph_key(key), key + + +def test_every_key_in_the_recorded_responses_renders_as_mermaid(): + seen = set() + for element in (ZONE, LINEAGE, ASSET_GRAPH): + for key, value in element.items(): + if not of.is_mermaid_graph_key(key) or not value: + continue + seen.add(key) + out = of.make_md_attribute(key, value, "REPORT", attribute_key=key) + assert out.count("```mermaid") == 1, key + assert {"mermaidGraph", "anchorMermaidGraph", "actionMermaidGraph", "edgeMermaidGraph", + "fullLineageMermaidGraph", "zoneProfileMermaidPieChart", "zoneProfileAllMermaidPieChart"} <= seen + + +@pytest.mark.parametrize("key, value", [ + ("collectionMermaidMindMap", "mindmap\n root((Collection))\n Member"), + ("zoneProfileAnchoredMermaidPieChart", 'pie\ntitle Anchored\n"Asset (3)" : 3'), + ("userAccountTypeProfileMermaidPieChart", 'pie\ntitle Types\n"EMPLOYEE (4)" : 4'), + ("userAccountStatusProfileMermaidPieChart", 'pie\ntitle Status\n"AVAILABLE (4)" : 4'), + ("fieldLevelLineageGraph", "flowchart LR\n a.col --> b.col"), + ("localLineageGraph", "flowchart LR\n x --> y"), + ("activityMermaidGraph", ACTIVITY), +]) +def test_keys_the_platform_does_not_return_yet_render_when_selected(key, value): + element = _with(ZONE, **{key: value}) + columns = {"formats": {"attributes": [{"name": "Graph", "key": key}]}} + out = of.extract_mermaid_only([element], columns) + assert out.count("```mermaid") == 1 + assert value.splitlines()[0] in out + + +def test_populate_common_columns_fills_a_generic_graph_key_only_when_present(): + columns = {"formats": {"attributes": [{"name": "Mind Map", "key": "collectionMermaidMindMap", "value": None}]}} + filled = of.populate_common_columns(_with(ZONE, collectionMermaidMindMap="mindmap\n root((C))"), + copy.deepcopy(columns)) + assert filled["formats"]["attributes"][0]["value"] == "mindmap\n root((C))" + absent = of.populate_common_columns(copy.deepcopy(ZONE), copy.deepcopy(columns)) + assert absent["formats"]["attributes"][0]["value"] is None + + +# ── the action and activity graphs follow the context graph ── + +COLLECTIONS = "Collections" # declares mermaidGraph in REPORT and MERMAID, not the companions + + +def _render(element, fmt, spec=COLLECTIONS): + return of.generate_output([copy.deepcopy(element)], "x", "Thing", fmt, of.populate_columns_from_properties, + None, copy.deepcopy(select_report_spec(spec, fmt))) + + +def test_mermaid_shows_context_then_action_then_activity(): + element = _with(ZONE, actionMermaidGraph=ACTION, activityMermaidGraph=ACTIVITY) + out = _render(element, "MERMAID") + blocks = [of._format_mermaid_value(element[k]) for k in ("mermaidGraph", "actionMermaidGraph", + "activityMermaidGraph")] + assert out.count("```mermaid") == 3 + positions = [out.index(b) for b in blocks] + assert positions == sorted(positions) + + +def test_report_and_html_show_the_companions_after_the_context_graph(): + element = _with(ZONE, actionMermaidGraph=ACTION, activityMermaidGraph=ACTIVITY) + report = _render(element, "REPORT") + assert report.index("### Mermaid\n") < report.index("### Action Mermaid Graph") \ + < report.index("### Activity Mermaid Graph") + assert report.count("```mermaid") == 3 + html = of.generate_output([copy.deepcopy(element)], "x", "Thing", "HTML", of.populate_columns_from_properties, + None, copy.deepcopy(select_report_spec(COLLECTIONS, "REPORT"))) + assert "Action Mermaid Graph" in html and "Activity Mermaid Graph" in html + + +def test_dict_carries_the_companions_and_table_does_not(): + element = _with(ZONE, actionMermaidGraph=ACTION, activityMermaidGraph=ACTIVITY) + spec = select_report_spec("Governance-Zone-Overview-Charts", "DICT") + assert any(c["key"] in ("mermaidGraph", "mermaid") for c in spec["formats"]["attributes"]) + row = of.generate_output([copy.deepcopy(element)], "x", "Thing", "DICT", of.populate_columns_from_properties, + None, copy.deepcopy(spec))[0] + assert row["Action Mermaid Graph"] == ACTION and row["Activity Mermaid Graph"] == ACTIVITY + names = list(row) + context = next(c["name"] for c in spec["formats"]["attributes"] if c["key"] in ("mermaidGraph", "mermaid")) + assert names.index(context) < names.index("Action Mermaid Graph") < names.index("Activity Mermaid Graph") + table = of.generate_entity_dict([copy.deepcopy(element)], of.populate_columns_from_properties, + columns_struct=copy.deepcopy(spec), output_format="TABLE")[0] + assert "Action Mermaid Graph" not in table and "Activity Mermaid Graph" not in table + + +def test_only_the_companions_the_element_carries_are_added(): + report = _render(_with(ZONE, activityMermaidGraph=ACTIVITY), "REPORT") + assert "### Activity Mermaid Graph" in report and "Action Mermaid Graph" not in report + + +def test_no_companion_keys_means_no_change(): + for fmt in ("MERMAID", "REPORT"): + out = _render(ZONE, fmt) + assert "Action Mermaid Graph" not in out and "Activity Mermaid Graph" not in out + assert of.extract_mermaid_only([copy.deepcopy(ZONE)], None) == of._format_mermaid_value(ZONE["mermaidGraph"]) + + +def test_a_report_without_the_context_graph_gets_no_companions(): + columns = {"formats": {"attributes": [{"name": "Pie", "key": "zoneProfileMermaidPieChart"}]}} + out = of.extract_mermaid_only([_with(ZONE, actionMermaidGraph=ACTION)], columns) + assert out.count("```mermaid") == 1 and "Engine" not in out + + +def test_a_companion_the_spec_already_selects_is_not_repeated(): + # Asset-Graph's REPORT declares Mermaid Graph, Anchor Graph and Action Graph itself. + element = _with(ASSET_GRAPH, activityMermaidGraph=ACTIVITY) + report = _render(element, "REPORT", spec="Asset-Graph") + action = of._format_mermaid_value(ASSET_GRAPH["actionMermaidGraph"]) + assert report.count(action) == 1 + assert "### Action Mermaid Graph" not in report # shown under the spec's own "Action Graph" + assert report.count("### Activity Mermaid Graph") == 1 + + +# ── key on every row (owner, 2026-11-09): DICT rows keep one shape ── + +DICT_SPEC = "Governance-Zone-Overview-Charts" # its DICT declares the context graph +COMPANION_NAMES = ["Action Mermaid Graph", "Activity Mermaid Graph"] + + +def _dict_rows(elements): + return of.generate_output([copy.deepcopy(e) for e in elements], "x", "Thing", "DICT", + of.populate_columns_from_properties, None, + copy.deepcopy(select_report_spec(DICT_SPEC, "DICT"))) + + +def test_mixed_rows_all_get_the_companion_keys_in_the_same_order(): + rows = _dict_rows([_with(ZONE, actionMermaidGraph=ACTION), copy.deepcopy(ZONE), + _with(ZONE, activityMermaidGraph=ACTIVITY)]) + assert len({tuple(row) for row in rows}) == 1 # one shape, one key order + for name in COMPANION_NAMES: + assert all(name in row for row in rows) + assert rows[0]["Action Mermaid Graph"] == ACTION and rows[0]["Activity Mermaid Graph"] == "" + assert rows[1]["Action Mermaid Graph"] == "" and rows[1]["Activity Mermaid Graph"] == "" + assert rows[2]["Action Mermaid Graph"] == "" and rows[2]["Activity Mermaid Graph"] == ACTIVITY + keys = list(rows[0]) + context = next(c["name"] for c in select_report_spec(DICT_SPEC, "DICT")["formats"]["attributes"] + if c["key"] in ("mermaidGraph", "mermaid")) + assert keys.index(context) + 1 == keys.index("Action Mermaid Graph") + assert keys.index("Action Mermaid Graph") + 1 == keys.index("Activity Mermaid Graph") + + +def test_only_the_companions_some_row_carries_are_added_to_every_row(): + rows = _dict_rows([_with(ZONE, actionMermaidGraph=ACTION), copy.deepcopy(ZONE)]) + assert all("Action Mermaid Graph" in row for row in rows) + assert not any("Activity Mermaid Graph" in row for row in rows) + assert list(rows[0]) == list(rows[1]) + + +def test_no_companion_in_any_row_adds_no_key(): + rows = _dict_rows([copy.deepcopy(ZONE), copy.deepcopy(ZONE)]) + spec_names = [c["name"] for c in select_report_spec(DICT_SPEC, "DICT")["formats"]["attributes"]] + for row in rows: + assert list(row) == spec_names + assert not set(COMPANION_NAMES) & set(row) + + +def test_a_single_row_is_unchanged_by_the_uniform_rule(): + (row,) = _dict_rows([_with(ZONE, actionMermaidGraph=ACTION)]) + assert row["Action Mermaid Graph"] == ACTION and "Activity Mermaid Graph" not in row