on 2018 Sep 09 10:20 PM
I would like to publish or undeploy promotions which is built on the new promotion engine (rule base) via a cronjob according to dates that determine in the backoffice as a seperate model that has promotion code, start date and end date.
I could not find the promotion api in help hybris to perform publish and undeploy operations like in the backoffice. And also I could not find related promotion services in the project.
Any help would be appreciated.
You can use the OOTB api,
To publish, you can use
final RuleCompilerPublisherResult ruleCompilerPublisherResult = ruleMaintenanceService.compileAndPublishRulesWithBlocking(promotions, moduleName,false);
To unpublish you can use this :
java.util.Optional<de.hybris.platform.ruleengineservices.maintenance.RuleCompilerPublisherResult> result = ruleMaintenanceService.undeployRules(allPromotions, moduleName);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
31 | |
2 | |
1 | |
1 | |
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.