[JBoss JIRA] Created: (JBRULES-617) DSL completion processor enhancements
by Michael Neale (JIRA)
DSL completion processor enhancements
-------------------------------------
Key: JBRULES-617
URL: http://jira.jboss.com/jira/browse/JBRULES-617
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: 3.0.5
Reporter: Michael Neale
Assigned To: Kris Verlaenen
Fix For: 3.1-m3
Peter lin has contributed some possible enhancements for DSL completion proposals.
It works by breaking down the DSL in to a tree of sentence fragments, which can be given to used to limit the selections in the content assistance.
This would work best for a dedicated DSL editor, where the content assistance can be active, always, when typing (not ctrl-space, but as soon as the cursor enters the LHS).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 2 months
[JBoss JIRA] Created: (JBRULES-805) Array of object not supported by contains
by ahmed yehdih (JIRA)
Array of object not supported by contains
------------------------------------------
Key: JBRULES-805
URL: http://jira.jboss.com/jira/browse/JBRULES-805
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Environment: linux, java1.4
Reporter: ahmed yehdih
Assigned To: Mark Proctor
when the array is an array of object like String we get
java.lang.ClassCastException
at org.drools.base.evaluators.ObjectFactory$ObjectContainsEvaluator.evaluate(ObjectFactory.java:386)
at org.drools.rule.LiteralRestriction.isAllowed(LiteralRestriction.java:61)
at org.drools.rule.LiteralConstraint.isAllowed(LiteralConstraint.java:82)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:140)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:317)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:183)
at org.drools.reteoo.Rete.assertObject(Rete.java:121)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:196)
at org.drools.reteoo.ReteooWorkingMemory.doAssertObject(ReteooWorkingMemory.java:70)
at org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:727)
at org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:551)
example: assume we have a class message
class Message{
String [] mess;
}
rule "test"
when
Message(mess contains "HELLO")
then
..
end
the reason is the test in the org.drools.base.ValueType class
else if ( clazz.isAssignableFrom( Object[].class ) ) {
return ValueType.ARRAY_TYPE; the test will be satisfied only for array of java.lang.Object and not for others object
a simple solution is to modify this test in
else if ( clazz.isArray() && clazz.getComponentType() instanceof Object) {
return ValueType.ARRAY_TYPE;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 2 months
[JBoss JIRA] Created: (JBRULES-703) Class cast inside function calls triggers org.drools.RuntimeDroolsException: unable to find the function
by Juergen none (JIRA)
Class cast inside function calls triggers org.drools.RuntimeDroolsException: unable to find the function
--------------------------------------------------------------------------------------------------------
Key: JBRULES-703
URL: http://jira.jboss.com/jira/browse/JBRULES-703
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: 3.1-m1
Reporter: Juergen none
Assigned To: Mark Proctor
Parsing an 3.0.5 drools file .drl yields, e.g.:
Caused by: org.drools.RuntimeDroolsException: unable to find the function ','
at org.drools.semantics.java.StaticMethodFunctionResolver.resolveFunction(StaticMethodFunctionResolver.java:79)
at org.drools.semantics.java.FunctionFixer.fix(FunctionFixer.java:130)
at org.drools.semantics.java.FunctionFixer.fix(FunctionFixer.java:66)
at org.drools.semantics.java.builder.EvalBuilder.build(EvalBuilder.java:78)
at org.drools.semantics.java.builder.GroupElementBuilder.build(GroupElementBuilder.java:63)
at org.drools.semantics.java.RuleBuilder.build(RuleBuilder.java:178)
at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:381)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:219)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:148)
at org.drools.jsr94.rules.admin.LocalRuleExecutionSetProviderImpl.createRuleExecutionSet(LocalRuleExecutionSetProviderImpl.java:120)
at org.drools.jsr94.rules.admin.LocalRuleExecutionSetProviderImpl.createRuleExecutionSet(LocalRuleExecutionSetProviderImpl.java:77)
for a class cast inside a function call (in condition or consequence block):
eval(
globalVar.f((java.util.Collection)a, (java.util.Collection)b) >= c.floatValue()
)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 2 months