on 2018 Sep 02 8:34 PM
Hello,
I am getting the below error for promotions..
ERROR [hybrisHTTP22] [DefaultPromotionEngineService] Promotion rule evaluation failed java.lang.IllegalStateException: Cannot determine unique rule engine context for rule evaluation: More than one Rules Modules (promotions-module, promotions-preview-module) found for type PROMOTION
If I go and see in the back office marketing tab --> promotion module has promotions-module and promotions-preview-module without catalog version. When I click on the module I see the catalog version field is not editable.
How do I make the above modules one staged (promotions-preview-module) and other one (promotions-module) is online so that the promotions will work.
Is there an impex that I need to run for the modules so that one will be staged and another one will be online?
I see OOTB we have those 2 modules and one of them has online catalog version and another one is staged catalog version.
Any help would be appreciated what impex need to run to resolve the above error.
While setting up the store front most of the impex's related to promotions are deleted. Now I need some direction to figure out what are all the impex's need to run for the promotions to work again.
Where can I find all the impex's related promotions and which one need to run again to work the promotions.
Request clarification before answering.
Only this line worked for me for the same issue. Thanks
INSERT_UPDATE CatalogVersionToRuleEngineContextMapping;context(name)[unique=true];catalogVersion(catalog(id),version)[unique=true] ;promotions-context;electronicProductCatalog:Online ;promotions-preview-context;electronicProductCatalog:Staged
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, does the solutions worked for anyone?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Run below Impex
#Creates a secondary promotion module named eg: promotions-preview-module with initial version number INSERT_UPDATE DroolsKIEModule;name[unique=true];mvnGroupId;mvnArtifactId;mvnVersion;ruleType(code);active;version; ;promotions-preview-module;hybris-rules;promotions-preview;1.0.0;PROMOTION;true;-1; #Create KIE Base associated with newly created KIE Module INSERT_UPDATE DroolsKIEBase;name[unique=true];kieModule(name)[unique=true];equalityBehavior(code);eventProcessingMode(code) ;promotions-preview-base;promotions-preview-module;EQUALITY;STREAM #Create KIE Session and associated with newly created KIE Base INSERT_UPDATE DroolsKIESession;name[unique=true];kieBase(name)[unique=true];sessionType(code) ;promotions-preview-session;promotions-preview-base;STATELESS #Combine KIE Module with Default KIE Base UPDATE DroolsKIEModule;name[unique=true];defaultKIEBase(name) ;promotions-preview-module;promotions-preview-base #Combine KIE Base with Default KIE Session UPDATE DroolsKIEBase;name[unique=true];defaultKIESession(name) ;promotions-preview-base;promotions-preview-session #Associate KIE Session With Rule Engine Context INSERT_UPDATE DroolsRuleEngineContext;name[unique=true];kieSession(name);ruleFiringLimit ;promotions-preview-context;promotions-preview-session;200; INSERT_UPDATE CatalogVersionToRuleEngineContextMapping;context(name)[unique=true];catalogVersion(catalog(id),version)[unique=true] ;promotions-context;electronicProductCatalog:Online ;promotions-preview-context;electronicProductCatalog:Staged
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Run following Impex
NSERT_UPDATE DroolsKIEModule;name[unique=true];mvnGroupId;mvnArtifactId;mvnVersion;ruleType(code);active;version; ;promotions-preview-module;hybris-rules;promotions-preview;1.0.0;PROMOTION;true;-1;
NSERT_UPDATE DroolsKIEBase;name[unique=true];kieModule(name)[unique=true];equalityBehavior(code);eventProcessingMode(code) ;promotions-preview-base;promotions-preview-module;EQUALITY;STREAM
NSERT_UPDATE DroolsKIESession;name[unique=true];kieBase(name)[unique=true];sessionType(code) ;promotions-preview-session;promotions-preview-base;STATELESS
PDATE DroolsKIEModule;name[unique=true];defaultKIEBase(name) ;promotions-preview-module;promotions-preview-base
PDATE DroolsKIEBase;name[unique=true];defaultKIESession(name) ;promotions-preview-base;promotions-preview-session
NSERT_UPDATE DroolsRuleEngineContext;name[unique=true];kieSession(name);ruleFiringLimit ;promotions-preview-context;promotions-preview-session;200;
INSERT_UPDATE CatalogVersionToRuleEngineContextMapping;context(name)[unique=true];catalogVersion(catalog(id),version)[unique=true] ;promotions-context;electronicProductCatalog:Online ;promotions-preview-context;electronicProductCatalog:Staged
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply. I know there is an issue with the impex. Your answer didn't help me in any direction to analyze the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Problem that you describe is peek of an bigger issue.
Two versions mechanism (staged and online) and synchronisation might be core of all mess. When synchronisation occurs, all online data is overwritten by staged data. Thus it is advisable to commit every change in staged version. It might be root of losing most of the impex's related to promotions during storefront set up.
Module promotions-preview-module is meant to be staged. Module promotions-module is meant to be online.
Error occurred probably because ImpEx query was lacking destination (module).
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.