The Configuration Web Service has two operations to create precedence rules.
The precedence rules take effect as soon as they are loaded into the Dgraph. The precedence rule is stored by the Dgraph process as a record in its data files, so that the precedence rules are automatically reloaded each time the Dgraph process is re-started.
<mdex:precedenceRule key="ruleName" triggerAttributeKey="triggerAttrName" triggerAttributeValue="mval|sval" targetAttributeKey="targetAttrName" isLeafTrigger="true|false"/>
precedenceRule attribute | Meaning |
---|---|
key | Specifies a unique identifier for the precedence rule (that is, it is the name of the rule). The identifier is a string, which does not have to follow the NCName format. |
triggerAttributeKey | Specifies the name of the Endeca standard attribute or managed attribute that will trigger the precedence rule. That is, the specified attribute must be selected before the user can see the target attribute. |
triggerAttributeValue | Optional. If used, specifies the attribute value (either managed value spec or standard attribute value) that must be selected before the user can see the target attribute. If not used, then any value in the trigger attribute will trigger the rule. Use of triggerAttributeValue in effect further refines the trigger to a specific standard or managed value. |
targetAttributeKey | Specifies the name of the Endeca standard or managed attribute that appears after the trigger attribute value is selected. |
isLeafTrigger | If the trigger is a managed attribute,
isLeafTrigger specifies a Boolean value that
denotes the type of the trigger attribute value:
Note that isLeafTrigger does not apply to Endeca standard attributes. You must specify it when you create a precedence rule, but whichever value you use is ignored by the Dgraph when the precedence rule is run. |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.endeca.com/MDEX/config/services/types/3/0" xmlns:ns1="http://www.endeca.com/MDEX/config/XQuery/2009/09"> <soapenv:Header/> <soapenv:Body> <ns:configTransaction> <ns:putPrecedenceRules> <ns1:precedenceRule key="CityRule" triggerAttributeKey="DimGeography_StateProvinceName" triggerAttributeValue="Victoria" targetAttributeKey="DimGeography_City" isLeafTrigger="true"/> </ns:putPrecedenceRules> </ns:configTransaction> </soapenv:Body> </soapenv:Envelope>