QueryBase Model Queries introduce advanced data mining to visual software architecture through Chained Model Traversal. By linking sequential queries into a progressive pipeline, you can trace complex relationships across connected diagram elements, perform deep impact analysis, and extract high-value graph subsets into structured JSON data.
What is Chained Model Traversal?
In visual modeling, critical domain logic is rarely contained within a single standalone shape. Value exists in how elements connect—how an Actor connects to a Use Case via an Association, or how a Database Entity links to a Service Class through a Dependency. Standard search engines can only find isolated elements based on direct attribute filters. Chained Model Traversal acts as a progressive graph query builder. It uses the output of one search step as the seed input for the next, traversing along relationship lines to extract precise networks of connected model data.
How Progressive Query Pipeline Works
Chained queries operate like a multi-stage data funnel. Each link in the chain narrows down or expands the dataset based on relationship paths:Stage 1: Base Element Filtering (Seed Selection)
Define initial criteria to locate seed elements (e.g., locate all Actors containing the name string"Customer").
Stage 2: Relationship Traversal (Path Following)
Follow connected connector paths originating from or pointing to the Stage 1 seed elements (e.g., fetch allAssociation relationships connected to those Customer Actors).
Stage 3: Target Model Retrieval (Destination Extraction)
Extract the target model elements attached to the far end of those Stage 2 relationships (e.g., retrieve allUse Cases linked to those Associations).
Practical Traversal Scenario
Consider an enterprise Use Case Diagram containing dozens of system actors and hundreds of use cases. You need an exact export of all functionality available specifically to the Customer role.[Query 1: Actor "Customer"] → (Traverse Association Links) → [Query 2: Connected Associations] → (Traverse to Connected Shapes) → [Query 3: Target Use Cases]
Comparison: Hierarchical Queries vs. Chained Model Queries
| Capability | Hierarchical Queries | Chained Model Queries |
|---|---|---|
| Primary Purpose | Extract static tree models based on structural hierarchy | Mine dynamic graph relationships across connected paths |
| Data Pattern | Project > Diagram > Element > Property |
Seed Element → Relationship → Target Element → ... |
| Query Style | Single-level scope filtering | Multi-stage sequential pipeline chaining |
| Best For | Documentation exports, class specs, property dumps | Dependency analysis, requirement tracing, impact assessment |
Why Architectural Mining Matters
- Automated Impact Analysis: Instantly discover which software components or business processes will be impacted if an actor or core service is modified.
- Elimination of Orphan Elements: Trace unlinked or disconnected shapes across massive enterprise repositories to clean up system models.
- Complex Graph Extraction: Export multi-hop relationship chains directly into automated code generators or graph analytics engines.
