I have used the Modeling Gateway for automating the modeling of information in Spectrum. So, now I would like to update Global Collection membership via the Modeling Gateway; however, I've been having problems getting this to work. Does anyone have any example of modeling gateway import files where they have been able to add devices to a static global collection?
We do the exact same thing, and here's our template for adding a single model to a static global collection.
<?xml version="1.0" standalone="no"?>
<!DOCTYPE Import SYSTEM ".modelinggateway.dtd">
<!-- **************************** -->
<!-- Template for adding a device to a global collection -->
<!-- %(batch_id)s for locking/unlocking purposes -->
<GlobalCollection name="%(GlobalCollection)s" Security_String="ADMIN" >
I know you specifically asked about Modelling gateway, but this is also possible using REST.
It's a bit more complex, but each server has it's own model for a specific Global Collection, so you have to process these for each primary landscape server in the domain:
1. Find the model handles of the Global Collections (all models with name '<Name of Global Collection>' and Model Type Handle of '0x10474'). You can do this with 1 RESTful query.
2. If they don't exist create them. (Create a model with mth='0x10474' and name '<Name of Global Collection>')
3. Create a relationship between the device you want added and the Global collection (dynamicGlobalCollects) and the Global collection itself.
Note, You might have some landscapes that don't have a global collection defined on it. If none of the devices on that landscape belong to that GC, this would be why!