I want to include Host Site and Host Location in the application catalogue
is there a snippet available which can access this element easily?
Application catalogue - datacenter (Host Site, Host location)
I can't find a snippet but the below gives you the upfront variables and it should be straightforward to write the query based on this (a variation on the third block, focused on the selected app, is what you need in the <xsl:template> you call for the app).
Remember you need the app > app deployment > instances deployed > nodes deployed on, which have a site and a location for the site and which will give you the app site(s)
John
Remember you need the app > app deployment > instances deployed > nodes deployed on, which have a site and a location for the site and which will give you the app site(s)
John
<xsl:variable name="allRegions" select="/node()/simple_instance[type='Geographic_Region'] union /node()/simple_instance[type='Geographic_Location']"/>
<xsl:variable name="allSites" select="/node()/simple_instance[type = 'Site']"/>
<xsl:variable name="countryTaxonomyTerm" select="/node()/simple_instance[(type='Taxonomy_Term' and own_slot_value[slot_reference='name']/value = 'Country')]"></xsl:variable>
<xsl:variable name="allCountries" select="$allRegions[own_slot_value[slot_reference='element_classified_by']/value = $countryTaxonomyTerm/name]"></xsl:variable>
<xsl:variable name="allTechnologyNodes" select="/node()/simple_instance[type = 'Technology_Node']"/>
<xsl:variable name="allAppInstances" select="/node()/simple_instance[type = 'Application_Software_Instance']"/>
<xsl:variable name="allAppDeployments" select="/node()/simple_instance[type = 'Application_Deployment']"/>
<xsl:variable name="allApps" select="/node()/simple_instance[(type = ('Composite_Application_Provider', 'Application_Provider'))]"/>
<xsl:variable name="selectedCountries" select="$allCountries"/>
<xsl:variable name="selectedSites" select="$allSites[own_slot_value[slot_reference = 'site_geographic_location']/value = $selectedCountries/name]"/>
<xsl:variable name="selectedTechnologyNodes" select="$allTechnologyNodes[own_slot_value[slot_reference = 'technology_deployment_located_at']/value = $selectedSites/name]"/>
<xsl:variable name="selectedAppInstances" select="$allAppInstances[own_slot_value[slot_reference = 'technology_instance_deployed_on_node']/value = $selectedTechnologyNodes/name]"/>
<xsl:variable name="selectedAppDeployments" select="$allAppDeployments[own_slot_value[slot_reference = 'application_deployment_technology_instance']/value = $selectedAppInstances/name]"/>
<xsl:variable name="selectedApps" select="$allApps[own_slot_value[slot_reference = 'deployments_of_application_provider']/value = $selectedAppDeployments/name]"/>
You mean a reverse fetching in 3rd block?