Overview

World According to (WAT) scripts enable you to auto-generate diagrams and are provided as part of the standard ABACUS installation. Each script works alongside a template diagram to query the model and create diagrams from existing content.

 

By default, the scripts work with the Avolution Framework, however you can customize them to work with your own Avolution framework implementation, or other frameworks.

 

The most recent version is available for download here, and in the folder C:\Program Files (x86)\Avolution\ABACUS\Scripts. The script is included under Manage Scripts in the Avolution Framework, but may be outdated. You should reload the script to ensure that you are using the latest version.

 

To learn how to modify the scripts and their corresponding template diagrams, check out the following guidance.

 

 

ABACUS Version Compatibility


Metamodel Compatibility


*This script can also be used with older versions of ABACUS


Getting Started

ABACUS studio provides three World According to scripts:  

 

  • World According To (Application)
  • World According To (Department)
  • World According To (Information)

 

The scripts create a diagram for each component of the main component type unless restrictions apply. 

 

EXAMPLE

The World According To (Application) script creates a diagram for each component of the type “Application.” An example of one of the generated diagrams is below. In this example, the “CRM” application is the main component.

test

Figure 1.0 Shows a completed WAT diagram on CRM using the Word According to (Application) Script

Modifying the World According to Scripts

 

Modifying a World According to script comprises the following key steps:

 

  1. Modify or assemble the template diagram.
  2. Update the KEY Constants (the script constants for architecture, main component type, etc.)
  3. Update the ID Property for Created Diagrams
  4. Identify and Order the Component Types
  5. Identify the Connection Types
  6. (optional) Filter the Content

 

STEP 1: Modify or Assemble the Diagram Template

 

Each World According to script uses a diagram template with parent components to determine how the components are placed on the diagram.  You can assemble the diagram template as required. However, for a modified script to work, you must fulfill the following requirements:  

 

  • Include an eventual parent for every component to be included in the diagrams
  • Ensure the script configuration aligns with the required content and diagram template

    Figure 1.0 Shows the default diagram template for the World According to (Application) script.


The selected template must contain an “eventual parent component” (i.e., either parents, grandparent, great-grandparent, great-great-grandparents etc.) for every component type instance that can appear on the diagram(s) the script creates.


EXAMPLE:

You might want to show server components in the World According to (Application) diagrams. However, in this scenario, servers have different path hierarchies as shown in Figure 3 

 

  • Server AU – H01 has the hierarchy path “Infrastructure | Asia-Pacific | Australia | Sydney
  • Server ES – BSVR001 has the hierarchy path “Infrastructure | Europe | Spain | Barcelona

 

As the cities, countries and regions vary by server, the diagram template cannot use these components. However, as all servers have and share the component “Infrastructure” as part of their path hierarchy, you can select the Grouping component “Infrastructure” and add it to the diagram template, as shown in Figure 3.

Figure 1.1 Shows the Explorer tree and template diagram comparison

TIPWhen altering or assembling a diagram template the recommended best practice is to find the appropriate components in the tree and drag them onto the diagram, as shown in Figure 1.2.


Figure 1.2 Explorer tree view showing how to drag a selected component onto the diagram

STEP 2: Update the Key Constants

 

Having assembled or modified the diagram template to your requirements, the next step is to modify the key constants for the selected script(s).

 

The constants to modify are:

 

  • ARC_NAME – Architecture Name
  • MAIN_COMP_TYPE – Main Component Type
  • TEMPLATE_DIAGRAM NAME – Name of the template diagram

 

To modify the required constants, work through the following steps:

 

  1. Open the script in the script editor.
  2. Navigate to #Region and the Constant declarations.
  3. Modify the constants to your requirement using the following guidance:

 

  • Const ARCH_NAME As String "Production (As-Is)"

Inside the string “” enter the name of the architecture to run the script.

E.g., “Production (As-is)”, “Target State”, etc.

  • Const MAIN_COMP_TYPE As String "Application"

Inside the string “” enter the main component type. The script runs through every component belonging to the main component type and creates a diagram for each component.

E.g., “Application”, “Server”, “Capability” etc.

NOTE: Each diagram query’s starting point is the main component.

 

  • Const TEMPLATE_DIAGRAM_NAME As String "Solution Diagram Template"

Inside the string “” enter the template diagram name for the script to reference to generate the diagrams.

E.g., “Solution Diagram Template”, “World According to Capability”

 

 

Figure 2.0 shows the script constant declarations. Amend the constants listed above to customize.

 

                        

STEP 3: Update the ID property for Created Diagrams

 

Having defined the Key Constants, the next step is to update the property name, type, and value. These constants are used to add an ID property to created diagrams, to identify that the script was auto-generated. The scripts use the ID properties to locate the diagram to edit when the script is re-run.

NOTE: When using the default scripts as the starting point for more Diagram types, make sure each diagram type has a distinct Property ID.

The constant to modify is:

  • AUTO_GENERATED_PROP_VALUE – distinct value for each World According to Script (Application, Department etc.)

To modify the required constants, work through the following steps:

 

  1. Open the script in the script editor.
  2. Navigate to Public Constants declarations section
  3. Modify the constants to your requirement using the following guidance:

 

  • Public Const AUTO_GENERATED_PROP_TYPE As String = "Information"
  • Public Const AUTO_GENERATED_PROP_NAME As String = "Auto Generated"
  • Public AUTO_GENERATED_PROP_VALUE As String = "AutoGenerateApplicationWorldAccordingToDiagrams" 

 

 

Figure 3.0 Shows the public constants to set the property name, type, and value 

 

(optional) Deleting diagrams if the main component no longer exists

 

To do this, set the following Boolean constant as TRUE

  • Const DELETEDIAGRAM_IFMAINCOMPDELETED As Boolean True

 

NOTE:

You can also modify the script to ask for confirmation before deleting the diagram. To do this, set the following Boolean constant as TRUE.  This is not recommended if the script will be scheduled to run.

  • Const ASKFORDELDIAG_IFMAINCOMPDELETED As Boolean = True

IMPORTANT: The prompts above are not recommended if the script will be scheduled to run. 


STEP 4: Identify and Order the Component Types

 

The next step is to identify the Component types and their placement in the diagram set. 

Components are listed and ordered by diagram layer as illustrated in the following diagrams. 

 

NOTE: the colored brackets show how script lines correspond to each layer in the template diagram.

 

4.0 Shows a list of Parent Components and related sub-components to be shown on the template diagram.

 

4.1 Shows the displayed the components, as listed in the scrip, on the template diagram.

 

To identify and order the required component types, work through the following steps:

 

  1. From within your template diagram, identify each parent component and in ascending order, create a corresponding line of code in the script, indicating the component type to be shown, and the assigned index.

 

NOTE: Component type indexes must start at 0 and increase incrementally e.g., 0, 3, 5, etc.

 

IMPORTANT: Configured component type names will not always match the names of the  eventual parent components displayed on the diagram.

 

 

EXAMPLE:

 

  • compConfigs.Add(New ComponentTypeConfig() {New ComponentTypeConfig(0, "YOUR COMPONENT TYPE GOES HERE")

 

NOTE: Component types assigned to the same layer must be separated by commas rather than adding a new .Add function as shown below:

 

  • compConfigs.Add(New ComponentTypeConfig() {New ComponentTypeConfig(0, "YOUR COMPONENT TYPE HERE"),

                             New ComponentTypeConfig(1, "YOUR COMPONENT TYPE HERE"),

                             New ComponentTypeConfig(2," YOUR COMPONENT TYPE HERE ")})

.

NOTE: Component types appearing on a separate layer must be added to the script using a new .Add method, as shown below:

 

  • compConfigs.Add(New ComponentTypeConfig() {New ComponentTypeConfig(3, " YOUR COMPONENT TYPE HERE ")})
  • compConfigs.Add(New ComponentTypeConfig() {New ComponentTypeConfig(4, " YOUR COMPONENT TYPE HERE ")})

 

 

STEP 5: Identify the Connection Types

 

The last step is to add a line of code for each connection you want the diagram to traverse.

To do this, work through the following steps:

 

  1. Open the script and declare each connection to be shown, as demonstrated in figure 5.0

 

NOTE: Each line identifies a connection type and the Source and Sink to traverse. You identify the Source and Sink using the numbers declared for each component type (as shown in STEP 4).

 

  1. List the connections where the main component type is the Source or Sink
  2. Then list the connections between other Source or Sink types declared in your component types section.

 

IMPORTANT: Connections are traversed in the declared order. If a connection is dependent on another, then it should follow it in order.

 

EXAMPLE: connConfigs.Add(New ConnectionTypeConfig(Source Index Number, "Connection Type", Sink Index Number, True))


TIP: To only show connections connected to the main component set the last parameter to TRUE. Any connections where the source or sink type is the main component type must be set to TRUE.

If set to FALSE it adds connections and corresponding components even when both elements are queried components and not attached to the main component. Note that this option will be available in the script version provided with ABACUS 8.0.2 and above.

 

 

 

Figure 5.0 shows the Connection Type Configuration

 

NOTE: In the example shown in figure 5.0, line 126 discovers the processes related to Applications (the main component type is this instance) which enables you to add line 128 to determine the relationships between processes and other components in the diagram.

STEP 6: (Optional) Filter Content

 

To filter generated diagrams by property type, name and value, work through the following steps:

  1. Open the script in your script editor and navigate to the FILTER_PROPERTY constants declarations:
  • Const FILTER_PROPERTY_TYPE As String “”
  • Const FILTER_PROPERTY_NAME As String “”
  • Const FILTER_PROPERTY_VALUE As String “”

 

  1. Enter the property (within the string quotation marks) to filter on.

EXAMPLE:  

Const FILTER_PROPERTY_TYPE =” Information

Const FILTER_PROPERTY_NAME = “Environment

 

This informs the script to filter on the property Information | Environment

 

Const FILTER_PROPERTY_VALUE As String = "Production"

 

Adding the property “Production” in this example tells the script to auto-generate a diagram only for applications with the property value “Production.

 

NOTE: If the value string property is blank “” then no filter is applied.

 

TIP: To only create diagrams above a given component threshold amend the following constant, replace 0 with the required threshold. 

 

Const COMP_COUNT_LOWER_LIMIT As Integer = 0

 

TIP: To prompt users to select which components of the main component type to create diagrams for, amend the following constant to TRUE. 

       Const PROMPT_FOR_COMPONENTS As Boolean = False


Run and Schedule

Once the template diagram is set up and the script has been updated, Run the Script. You can also Schedule it to run in the Analytics Engine.