Skip to main content

replaceTopology

A Workflow Engine function that replaces an existing topology with another topology. This process deletes the original topology. You can use the clone and replace Graph Topology methods to update a copy of an existing topology and then replace a topology with the updated version.

You can also use this method to rename a topology.

When a topology is replaced:

  • The original topology and its nodes and links are deleted.

  • Alerts that reference the original topology are updated to reference the replacement topology.

  • If the replacement topology is active, its processing state in the database is set to outdated. This triggers the graph analyser process to run as part of the Housekeeper Moolet to calculate Vertex Entropy for the topology nodes. See Topology Overview for more information.Topology overview

This function is available as a feature of the Add-ons v2.7 download and later.

This function is available for event, alert, and Situation workflows.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function replaceTopology takes the following arguments:

Name

Required

Type

Description

topologyA

yes

string

The active topology to replace.

topologyB

yes

string

The topology to replace A with.

Example

The following example demonstrates typical use of Workflow Engine function replaceTopology.

To clone, modify, and replace a topology "network" (for example, in an Alert Workflow where nodes and links are added) use the following actions:

  1. Clone the existing topology

    1. topologyName : network

    2. cloneName : network_copy

  2. addTopologyNode

    1. topologyName : network_copy

    2. nodeName : $(source)  [ uses substitution from the triggering alert ]

  3. replaceTopology

    1. topologyA : network

    2. topologyB : network_copy

Note

This workflow clones the existing topology, applies the required modifications to the cloned topology, and then replaces the original topology with the updated copy.