forked from adi0509/Python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_elements.ajs
More file actions
49 lines (41 loc) · 2.24 KB
/
create_elements.ajs
File metadata and controls
49 lines (41 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* Create Basic ArchiMate Elements
*
* This script demonstrates how to create various ArchiMate elements
* in the current model.
*/
console.log("Creating ArchiMate Elements...");
// Get the current model
var model = $("model").first();
if (!model) {
console.log("No model found. Please open a model first.");
} else {
// Create Business Layer elements
var businessActor = model.createObject("business-actor", "Customer");
var businessRole = model.createObject("business-role", "Sales Manager");
var businessProcess = model.createObject("business-process", "Order Processing");
var businessService = model.createObject("business-service", "Order Service");
// Create Application Layer elements
var appComponent = model.createObject("application-component", "CRM System");
var appService = model.createObject("application-service", "Customer Data Service");
var appInterface = model.createObject("application-interface", "REST API");
var dataObject = model.createObject("data-object", "Customer Record");
// Create Technology Layer elements
var node = model.createObject("node", "Application Server");
var device = model.createObject("device", "Web Server");
var systemSoftware = model.createObject("system-software", "Database Server");
var artifact = model.createObject("artifact", "Configuration File");
// Create Motivation elements
var stakeholder = model.createObject("stakeholder", "Board of Directors");
var driver = model.createObject("driver", "Increase Revenue");
var goal = model.createObject("goal", "Improve Customer Satisfaction");
var requirement = model.createObject("requirement", "System must be available 24/7");
// Create Implementation elements
var workPackage = model.createObject("work-package", "CRM Implementation");
var deliverable = model.createObject("deliverable", "User Documentation");
console.log("✓ Elements created successfully!");
console.log("Business Layer: " + businessActor.name + ", " + businessRole.name);
console.log("Application Layer: " + appComponent.name + ", " + appService.name);
console.log("Technology Layer: " + node.name + ", " + device.name);
console.log("Motivation: " + stakeholder.name + ", " + goal.name);
}