ARIS Governance Audit: O2C Process Model (With the help of this script, we can verify that all object occurrences on selected process canvases have maintained mandatory descriptions (AT_DESC) in the central repository. function main() { // 1. Capture selected process diagrams & guard against empty selections var selectedModels = ArisData.getSelectedModels(); if (!selectedModels || selectedModels.length === 0) { Dialogs.MsgBox("Please select at least one process model before running this report."); return; } // 2. Initialize output document engine var report = Context.createOutputObject(); // Resolve active UI session language (with fallback to English US) var activeLanguage = Context.getSelectedLanguage() || 1033; // Define formatting styles report.DefineFmt("ReportTitle", "Arial", 12, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_BOLD, 0, 0, 0, 0, 0, 0); report.DefineFmt("AuditPass", "Arial", 10, Constants.C_GREEN, Constants.C_TRANSPARENT, Constants.FMT_REGULAR, 0, 0, 0, 0, 0, 0); report.DefineFmt("AuditFail", "Arial", 10, Constants.C_RED, Constants.C_TRANSPARENT, Constants.FMT_REGULAR, 0, 0, 0, 0, 0, 0); report.OutputTxt("O2C Process Governance Audit Report\n\n", "ReportTitle"); // 3. Iterate over each selected diagram canvas for (var m = 0; m < selectedModels.length; m++) { var currentModel = selectedModels[m]; var modelName = currentModel.Name(activeLanguage); report.OutputTxt("Evaluating Diagram: " + modelName + "\n", "ReportTitle"); // Collect all visual symbols currently drawn on the canvas var canvasSymbols = currentModel.ObjOccList(); for (var s = 0; s < canvasSymbols.length; s++) { var symbolOcc = canvasSymbols[s]; // Resolve canvas symbol (Occurrence) to central repository record (Definition) var masterDef = symbolOcc.ObjDef(); var objectName = masterDef.Name(activeLanguage); // Fetch target attribute definition (Description) var descriptionAttr = masterDef.Attribute(Constants.AT_DESC, activeLanguage); // 4. Assert attribute maintenance and log compliance results if (descriptionAttr.IsMaintained()) { report.OutputTxt(" [PASS] " + objectName + ": Description is maintained.\n", "AuditPass"); } else { report.OutputTxt(" [FLAGGED] " + objectName + ": Missing Description (AT_DESC).\n", "AuditFail"); } } } // 5. Generate and export the audit report report.WriteReport(); } main();