ServiceNow – Replicating CI Relationships in GRC with Flow Designer
hi everyone my name is jason nichols i am a senior technical trainer at servicenow and in this video i'm going to show you how you can replicate existing ci relationships in your cmdb to the respective entities in grc so what we've got here in the cmdb is a wireless networking business service it is connected to two ip routers here if we look at the dependency view we can see that relationship quite clearly so in a recent training that i had i was asked about a particular use case about how we could actually map these relationships that we see here to the entities in grc if we have a look at the grc application i've got the respective business service here mapped as an entity and it has two downstream entity relationships right here if we look at the configuration for the entity types you can see that they created automatically using the entity type filters so if we look at the one for business services as an example and you look at the entity filters it's basically just taking every record from that table in this case and creating entities out of them and similarly we do the same for ip routers as well so we've got these entities already created automatically for us we don't have to worry about that and if we look at the entity class rules uh we do something similar there where we map basically uh tables uh in the cmdb to the respective classes in grc but what if we wanted to create a separate relationship here to another configuration item if we did that we would not have automatically another record created here in this related list so we have to do that either manually or in this case here i've built a small flow to take care of this for us so if i just scroll back up the top here and then just close this this flow basically does two things it creates relationships in grc that exist in the cmdb and it does the reverse as well any relationships that are removed are removed also from the entities in grc so in this particular use case however i'm only dealing with the wireless networking business service here just to test this just to have a proof of concept that this can't actually work so what it does basically is just take that particular entity look at their respective relationships for that corresponding configuration item and creates relationships between the corresponding entities in grc and uh the key for us here is that it's actually creating records in this table here this many-to-many table and the entity hierarchy table so this table here is exactly what you see here in this related list right there okay so if i open up one of these records you can see it's simply just a mapping between a downstream and an upstream entity right there and similarly uh the reverse is also true if i scroll down a little bit we can see here that any relationships that we have in grc that are not in the cmdb we're going to remove those okay so let's go ahead now and if i go back to my business service here i'm just going to create a new relationship right here to another ip router we've actually got five of them in the cmdb and we've got five of them in grc as entities so i'm going to uh just create a simple connex 2 i think it's a connects to yeah relationship here to the third ip router um and click on plus and save that yes and once that's saved i'm just going to refresh this dependency view so we can see this here quite clearly that we've already got relationships between routers 5 and 4 with the wireless networking businesses and now this is the new one here okay so we basically want this relationship here mapped in grc i'm not going to worry about these ones here we can take care of those another time if at all necessary so uh the only thing i need to do is actually just run this flow it's not active at the moment i had a trigger here to run it every night you know you can configure the trigger as you wish i'm just going to test this now and run it manually and once that flow finishes we will see that in our entity for the wireless networking service we will have an extra connection an extra downstream entity to that third ip router so that's finished now so let's come back here let me refresh the list here and there we have it okay that ip router entity was already there again that's taken care of already by the entity types filter so the only thing we needed to do is establish a relationship between two already existing entities and similarly if we were to remove that relationship here okay so let me just right click there delete relationship let's try that again delete relationship yes come back to flow design and we're back to where we started now and run that flow again again it's the second half of the flow that basically does the opposite so let me test it again and if we go back to our entity we shall see once this flow processes three two one finished uh refresh the list and that ip3 router click is no longer there okay so just a very simple use case of how you can employ flow designer to take care of you know small little automation steps like the one that we've just seen or even you know you can expand this flow i will include the update set that contains this flow in the description below so you can take it modify it do as you wish but as i said that was just an example of a use case that was given to me by a customer recently so i hope you found this video helpful and we'll see you next time
https://www.youtube.com/watch?v=y31uhFX8Tm8