Trusted Contributor.
Trusted Contributor.

Running an enrichment in a script?

We pull data from an external source and save CITs via a discovery adapter.  From it, we use an enrichment to build relationships.  (If there is a server with the name of the server attribute and there is a switch in the switch attribute, create a relationship from the server to the switch.)


If the server is connected to a new switch, or the server gets removed from the source, we no longer want the "old" relationship.


I don't want to simply remove all relationships before running my script, because of the possibility I can't connect to the source.  What I'd like to do is delete all of these relationships once I retrieve all of the data and I have over 'x' number of rows.


So I'd like to do one of two things:

- Have the script fire off the delete enrichment.  Once the relationships are deleted, the "create" enrichment will create new relationships based on the rows I've just retrieved.

- Have the delete enrichment only run based on a condition.


Any ideas how to do either of these?


The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.