Following up on PR #467 (ObjectScript language support) — @DeusData asked in review to split the Ensemble routing pass into a separate PR. This issue tracks that work.
What it does
pass_ensemble_routing is a pipeline pass that statically extracts InterSystems Ensemble/IRIS Interoperability production topology from ObjectScript .cls files at index time — no live IRIS instance required.
Pass A — EnsembleItem nodes: reads each EnsembleProduction class's ProductionDefinition XData block (XML), parses <Item Name="..." ClassName="..."> entries, and creates EnsembleItem nodes in the graph for each production component (business services, processes, operations).
Pass B — ROUTES_TO edges: for each EnsembleItem, reads the source .cls file and extracts routing rules that reference other components by class name, emitting ROUTES_TO edges. Uses segment-anchored matching (qn_ends_with_segment) to avoid false positives.
WorkMgr dispatch: detects .Queue("##class(X).method", ...) calls and emits CALLS edges to the target method — the same pattern as task queues in Celery/Airflow.
Why it's useful beyond IRIS
The pattern — statically extracting a runtime workflow topology from configuration XML embedded in source classes — is the same shape as:
- Celery task routing (
@app.task, task.apply_async(queue=...))
- Airflow DAG dependencies
- Spring Integration channel adapters
The EnsembleItem label and ROUTES_TO edge are the IRIS-specific names, but the pass structure is general enough to serve as a template for other workflow frameworks.
Changes from the version reviewed in #467
Per review feedback:
- Pass is now gated: early-exits if the project contains no ObjectScript files (no unconditional O(all-method-files) scan for non-IRIS projects)
- Truncation logging added:
cbm_log_warn fires when MAX_ITEMS or MAX_SETTINGS caps are hit so silent truncation is visible
Ready to file PR on your signal
Following up on PR #467 (ObjectScript language support) — @DeusData asked in review to split the Ensemble routing pass into a separate PR. This issue tracks that work.
What it does
pass_ensemble_routingis a pipeline pass that statically extracts InterSystems Ensemble/IRIS Interoperability production topology from ObjectScript.clsfiles at index time — no live IRIS instance required.Pass A — EnsembleItem nodes: reads each
EnsembleProductionclass'sProductionDefinitionXData block (XML), parses<Item Name="..." ClassName="...">entries, and createsEnsembleItemnodes in the graph for each production component (business services, processes, operations).Pass B — ROUTES_TO edges: for each
EnsembleItem, reads the source.clsfile and extracts routing rules that reference other components by class name, emittingROUTES_TOedges. Uses segment-anchored matching (qn_ends_with_segment) to avoid false positives.WorkMgr dispatch: detects
.Queue("##class(X).method", ...)calls and emitsCALLSedges to the target method — the same pattern as task queues in Celery/Airflow.Why it's useful beyond IRIS
The pattern — statically extracting a runtime workflow topology from configuration XML embedded in source classes — is the same shape as:
@app.task,task.apply_async(queue=...))The
EnsembleItemlabel andROUTES_TOedge are the IRIS-specific names, but the pass structure is general enough to serve as a template for other workflow frameworks.Changes from the version reviewed in #467
Per review feedback:
cbm_log_warnfires whenMAX_ITEMSorMAX_SETTINGScaps are hit so silent truncation is visibleReady to file PR on your signal