03 Feb 2022 10:55 AM - last edited on 25 Mar 2022 12:54 PM by MaciejNeumann
Hello,
I want to tag all services that belong to a specific Web Application so I can make a complete Management Zone based on the Web App.
So basically when I click on the services that belong to the web app, I can see the service flow and I want to tag all of those components.
Is this possible?
Thanks in advance!
Sten
Solved! Go to Solution.
03 Feb 2022 10:24 PM - edited 03 Feb 2022 10:31 PM
Hi @Sten ,
yes this is possible. It's not too straight forward though. You can use the relationships in entitySelectors to identify those services. See my Pro Tip post here. Number 7 in that list is doing it the other way around (tag applications up from services, but if you use a "toRelationship" from the Application entitytype you should be able to achieve this.
I think the entitySelector would be:
type(SERVICE),toRelationships.calls(type(APPLICATION),tag(tagOfApplication))
You can use this selector in an auto tagging rule which would then also assign the same tag (tagOfApplication) to the services. And then further on use this tag in you MZ assignment rule.
Only drawback: you cannot use placeholders or key:value tags for entitySelector rules...
kr,
Reinhard
04 Feb 2022 12:50 PM
Hi Reinhard,
Thanks for your awesome reply! This is really nice knowledge.
Unfortunately, I can't make it work on the environment. I made a tagging rule via the API as follows:
{
"name": "sampleAutoTag",
"description": "sampleDescription",
"entitySelectorBasedRules": [
{
"enabled": true,
"entitySelector": "type(SERVICE), toRelationships.calls(type(APPLICATION), tag(tagOfApplication))"
}
]
}
This was succesful, however the tags of the Application are (45 minutes later) still not visible on the Services. Do you know what I'm doing wrong?
04 Feb 2022 01:45 PM
Update from my side: it works!! I need to specify the tag within the call at the place "tagOfApplication" 😅
04 Feb 2022 07:45 PM
Good to know, glad it helped!
23 May 2022 09:14 AM
Hi @r_weber,
Get lost a bit on what are the allowed types for toRelationships.calls so my question is if there is a way to tag all services in service flow that are being called from a specific Key User Action?
Thanks in advance for your insight on this
All the best and stay safe
Yos