on ‎2018 May 26 6:59 AM
Hi all,
Currently on my project, we are on hybris 6.3 using drools engine for promotions, we have 700+ published promotions, and the engine is having troubles updating the cache when we archive promotions,
Is there a recommended usage / tuning / configuration for drools to be used as intensively as this?
Notice that we have only a two core server, and about 16 GB of ram
Request clarification before answering.
Hello, it's important to archive the promotions that is not being used. But, if you are unable to archive lots of promotion, you can upload an ImpEx deactivating the Drools Rules, that are compiled lots of times. I wrote an idea in the forum about it (https://experts.hybris.com/content/idea/99428/view.html). Summing up, you can take the PK of the drools rules that correspond to old promotions with the query:
SELECT {dr.pk} FROM {PromotionSourceRule AS pr JOIN DroolsRule AS dr ON {pr:code} = {dr:code}} WHERE {pr:enddate} < current_timestamp AND {dr.active} = '1' AND {dr.currentversion} = '1'
And make an ImpEx with the header
UPDATE DroolsRule;pk[unique=true];active;
Filling the pk field with the result of the query and setting 0 to the active field (that will deactivate them).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you!
This is a good workaround for a cronjob / groovy script / impex script to automate the amount of unnecessary promotions within drools
We ended up removing them using a similar approach over a groovy script, but it didn't decrease the risk of the caché not updating due to the heavy creation / update / deletion of promotions on the engine u.u
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 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.