I have create a custom predicate according to the documentation: https://doc.sitecore.net/developers/xp/segmentation/create-a-custom-predicate.html
The rule has been defined in /sitecore/system/Settings/Rules/Definitions/Elements/My Rules/Custom Rule
. The compiled DLL has been copied to XConnectFolder\App_data\jobs\continuous\AutomationEngine
and an XML file has been generated and copied to XConnectFolder\App_data\jobs\continuous\AutomationEngine\App_Data\Config\sitecore\Segmentation\MyPredicates.xml
.
After this, the Sitecore Marketing Automation Engine
Windows service has been restartet.
I create a new autmation campaign, create a "Custom listener" which uses my predicate rule, and save the campaign. Then, I'm adding a contact to an automation campaign, but when I do this the following appears in the automation engine log file:
2018-11-26 16:33:54.460 +01:00 [Error] An error occurred during activity invocation for activity '890dc014-8e70-b4b4-d15a-6cc837f7c11a' in plan '2667589a-34b9-4f98-aad3-6d3f3075c8d6' DescriptorId : 9f3a44f4-179a-4d19-8583-14a8874e5bba Sitecore.XConnect.Segmentation.ExpressionBuilder.PredicateDescriptorException: No predicate descriptor was registered with Id '9f3a44f4-179a-4d19-8583-14a8874e5bba'.
Why does this error appear when the predicate has been registered in Sitecore and added to an Automation Engine XML file?
Sitecore 9.0.2
Edit:
This is the (obfuscated) XML used in the Segmentation
folder.
<Settings>
<Sitecore>
<XConnect>
<Services>
<DescriptorLocator>
<Options>
<PredicateDescriptors>
<MyRuleClassName>
<id>{9F3A44F4-179A-4D19-8583-14A8874E5BBA}</id>
<type>MyRuleNamespace.MyRuleClassName, MyAssembly</type>
</MyRuleClassName>
</PredicateDescriptors>
</Options>
</DescriptorLocator>
</Services>
</XConnect>
</Sitecore>
</Settings>