Unable to submit a live event in Marketing Automation


Description

Registering live events might throw a System.InvalidOperationException exception because the automation plan is not triggered until the session ends when the goal of the initial state contains the selected IsLiveEvent check box. The following messages can be found in the log records:

[Warning] Exception calling GetService() - Service Type: "MarketingAutomationLiveEventController"
System.InvalidOperationException: Unable to resolve service for type 'Sitecore.XConnect.Web.Infrastructure.XdbEdmModel' while attempting to activate 'Sitecore.Xdb.MarketingAutomation.Web.MarketingAutomationLiveEventController'.
   at Microsoft.Extensions.Internal.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
   at Microsoft.Extensions.Configuration.ConfigurationServiceType.<>c__DisplayClass24_0.<op_Implicit>b__0(IServiceProvider sp)
   at lambda_method(Closure , ServiceProvider )
   at Sitecore.XConnect.DependencyInjection.Web.WebApiServiceDependencyResolver.GetService(Type serviceType)

 

[Error] XConnect Exception Logger LogAsync()
System.InvalidOperationException: An error occurred when trying to create a controller of type 'MarketingAutomationLiveEventController'. Make sure that the controller has a parameterless public constructor. ---> System.ArgumentException: Type 'Sitecore.Xdb.MarketingAutomation.Web.MarketingAutomationLiveEventController' does not have a default constructor
   at System.Linq.Expressions.Expression.New(Type type)
   at System.Web.Http.Internal.TypeActivator.Create[TBase](Type instanceType)
   at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.GetInstanceOrActivator(HttpRequestMessage request, Type controllerType, Func`1& activator)
   at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)
   --- End of inner exception stack trace ---
   at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)
   at Sitecore.XConnect.Web.DependencyInjection.WebApiServiceControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)
   at System.Web.Http.Controllers.HttpControllerDescriptor.CreateController(HttpRequestMessage request)
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()

 

Solution

To resolve this issue, download and install the relevant patch available on this page: https://github.com/SitecoreSupport/Sitecore.Support.226201/releases.