Following up on my previous post breaking down the 4-Layer Architecture Diagram, here is the executable JavaScript logic that brings that exact data traversal path to life.
To keep things grounded in a real-world enterprise scenario, I used an Order-to-Cash (O2C) workflow (Receive Order → Check Credit → Ship Goods → Issue Invoice).
The primary goal is to Manually opening dozen of process diagrams to verify whether every object meets baseline governance standards is time-consuming and prone to human oversight.
The objective here is simple replace manual reviews with an automated, single-click compliance audit. Before an O2C model gets published or signed off, this script scans every visual symbol on the canvas, inspects its master record in the database, and immediately flags any missing mandatory metadata—specifically the Description attribute (AT_DESC).
Execution Logic Referring to the architectural diagram from my previous post,below is how data is traversed under the hood during the O2C audit:
- In the hierarchy Layer the script starts by grabbing whichever O2C process diagrams the user currently has selected in ARIS (ArisData.getSelectedModels()). It also dynamically detects the user's active session language (Context.getSelectedLanguage()) so report labels match their locale.
- In metamodel Layer It walks through the active diagram canvas to extract every visual shape currently drawn on the screen using activeModel.ObjOccList().
- In database Layer the script uses .ObjDef() to jump from the visual icon on the canvas (ObjOcc) back to its central master record in the repository (ObjDef). Once on the master object, it targets the description property via .Attribute(Constants.AT_DESC, currentLang).
- In the scripting Layer It runs a quick evaluation: targetAttribute.IsMaintained().
If true: It records a PASS entry confirming compliance.
If false: It flags a red warning highlighting missing documentation and finally, it flushes the output buffer and compiles the final document using report.WriteReport().
This implementation demonstrates how ARIS handles data traversal under the hood based on our architectural framework. While set up here for an O2C audit, this code attached below serves as a reusable template for any process model you can simply customize the attribute checks, traversal rules, and output formatting to fetch whatever governance metrics your organization needs.