Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLANNER-189 Provide rule metaData in ConstraintMatchTotal #28

Closed
wants to merge 1 commit into from

Conversation

fahman
Copy link
Contributor

@fahman fahman commented Sep 4, 2013

No description provided.

@ge0ffrey
Copy link
Contributor

Metadata is not activation-specific. It's Rule specific. So getting it in every activation again and again is suboptimal.

Instead do this code to translate a ConstraintMatchTotal into it's metadata:

String packageName = constraintMatchTotal.getConstraintPackage();
String ruleName = constraintMatchTotal.getConstraintName();
KieBase kieBase = ksession.getKieBase();
Rule rule = kieBase.getRule(packageName, ruleName);
return rule.getMetadata();

Given the better alternative way shown above (which doesn't require increasing the weight of a ConstraintMatchTotal), I am rejecting this issue.

@ge0ffrey ge0ffrey closed this Sep 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants