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.
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 |
|---|---|---|---|
| yes | string | The active topology to replace. |
| 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:
Clone the existing topology
topologyName : network
cloneName : network_copy
addTopologyNode
topologyName : network_copy
nodeName : $(source) [ uses substitution from the triggering alert ]
replaceTopology
topologyA : network
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.