ID extraction
This page describes StackState version 4.1.
The StackState 4.1 version range is End of Life (EOL) and no longer supported. We encourage customers still running the 4.1 version range to upgrade to a more recent release.
Id extraction is used in the synchronization process to turn external data into External Topology. It extracts the unique identity and identifiers for components. With the external data being send, the Id Extractor can produce the following information:
  • a type - for the component/relation for differentiation in later steps
  • an externalId - is the identifier with which the element is easily identifiable in the external source
  • identifiers (multiple) - a set of identifiers that identify the object internally in StackState.
Id extractor
Below you can find an Id Extractor function:
1
map = struct.asReadonlyMap()
2
3
externalId = map["externalId"]
4
type = map["typeName"].toLowerCase()
5
identifiers = map["data"].get("identifiers", [])
6
7
return Sts.createId(externalId, new HashSet([externalId] + identifiers), type)
Copied!
Last modified 5mo ago
Copy link