• Not Answered

Creating a custom listener/decision point for Marketing Automation Plan

I'm attempting to understand how to create a custom feature for Marketing Automation, so I started by creating a simple "Hello, World" style condition that just returns true, so I can see it run through the plan...


I created the simple class, inheriting from ICondition:

namespace CSDemo9.Libraries.Predicates.Rules
	public class SampleRule : ICondition
		public bool Evaluate(IRuleExecutionContext context)
			var stuff = context;
			Log.Info(context?.ToString() ?? "NULL", this.GetType().FullName);

			return true;

And added the config file to automation settings, registering the rule:

                        <type>CSDemo9.Libraries.Predicates.Rules.SampleRule, CSDemo9.Libraries.Predicates</type>

However, after registering the rule, the automation stops working and I get this exception in the log for the marketing automation:

Failed to create activity instance from type 'Sitecore.Marketing.Automation.Activity.CustomListener, Sitecore.Marketing.Automation.Activity, Version=, Culture=neutral, PublicKeyToken=null'
System.ArgumentException: Problems processing configuration-based DescriptorLocators.  1 error(s) encoutered : 
Unable to resolve type for Predicate Descriptor with Id - 'fa926d5f-793b-48bb-ac6b-2dbf39ae21e1'

I did deploy the dll for my class to both the site root bin and the marketing automation folder. I tried deploying it to the parent xconnect folder too to see if that would help but it didn't. It seems like I'm missing something but I'm not sure where else I should deploy this or if that is even the problem.

I also registered the condition in the content tree, pointing to the same library, and the ID of that item is the same as the config above...

How can I troubleshoot this, so that I can resolve this issue and my plan can see my type?

2 Replies