How to determine Drools runtime version?
by Ansgar Konermann
Hi,
I'd like to determine at runtime which version of Drools is in use/on
the classpath. I cannot use reflection on the Drools classes itself, as
this will not work in the intended runtime environment (Google App Engine).
The following code works in a normal Java VM, but not in GAE:
Package droolsCorePackage = KnowledgePackageImp.class.getPackage();
String implementationTitle = droolsCorePackage.getImplementationTitle();
String implementationVersion =
droolsCorePackage.getImplementationVersion();
In GAE, the getImplementation{Title|Version} methods both return null.
Is there another, maybe more "official" way of determining the Drools
version? I'd like to support Drools 5.x.y starting at x >= 3.
Best regards
Ansgar
11 years, 12 months
error when running guvnor
by kurrent93
Hi
I've just deployed Guvnor 5.5 final into Tomcat 7.
When I go to view guvnor I get this error:
400 Sorry, a technical error occurred. Please contact a system
administrator.
500 The call failed on the server; see server log for details
In the guvnor event log I get:
Service method 'public abstract boolean
org.drools.guvnor.client.rpc.RepositoryService.isDoNotInstallSample()' threw
an unexpected exception: org.jboss.weld.exceptions.WeldException:
WELD-000049 Unable to invoke [method] @PostConstruct public
org.drools.guvnor.server.repository.RepositoryStartupService.create() on
org.drools.guvnor.server.repository.ProductionRepositoryStartupService@2d00c385
WELD-000049 Unable to invoke [method] @PostConstruct public
org.drools.guvnor.server.repository.RepositoryStartupService.create() on
org.drools.guvnor.server.repository.ProductionRepositoryStartupService@2d00c385
I dont see anything relavant in the tomcat logs.
Any idea how to fix this?
Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/error-when-running-guvnor-tp4021224.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 12 months
Use of otherwise
by Manasi
Hi,
In my drools application I have following web-guided decision table:
Rule Col1 Col2 Col3
Fields
Rule1 false false abc
field1,field2
Rule2 false true (any value
field2
including "abc")
In Rule 2 above we have condition as:
*If Col1 is false and
If Col2 is true and
If Col3 is having any value including "abc" Then
*
return *field2* in action column.
We have created web-guided decision table in Guvnor and we have included
above 2 rules.
We have tried using <otherwise>, but as per <otherwise> functionality if we
use <otherwise> in Rule2 Col3 ,then it will take all values other than "abc"
and we need to consider "abc" value also.
Please suggest how to solve this scenario?
Thanks,
Manasi.
--
View this message in context: http://drools.46999.n3.nabble.com/Use-of-otherwise-tp4021306.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years
Complicated Issue
by abhinay_agarwal
hey,
M using guvnor 5.3.0 Final version and two instances of guvnor.
In my first guvnor application, i ve two packages containg all my rules
which i am accessing using drools core and knowledge api v5.2.0 Final .I use
type "DRL" to extract rules from my change set.
In my second guvnor application, i just have a package which contains my
JBPM process. Here, i am using drools 5.3.1 Final jars to connect and make
my kbase. i use type = "PKG" in my chnage set, which is contradictory to
JIRA <https://issues.jboss.org/browse/JBRULES-3388> is opened that a PKG
cannot be read, but was working fine for my application.
Now i dont want to deploy two different wars of guvnor and was expecting to
do it by deploying just 1 guvnor.
So instead of taking the headache of using different jars, i used a neutral
GUVNOR and drools 5.4.0 final version. I deployed the guvnor, imported the
old repository, built the packages and tried firing the rules using type =
"DRL" in my change set. Everything Worked fine.
As soon as i changed my type = "PKG" in my change set to access the rules, i
got an error :
java.lang.UnsupportedClassVersionError:
Institutional/CalculateDateDifference : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at
org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.fastFindClass(JavaDialectRuntimeData.java:615)
at
org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:254)
at
org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237)
at
org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.drools.rule.MVELDialectRuntimeData.getParserConfiguration(MVELDialectRuntimeData.java:270)
at
org.drools.base.mvel.MVELCompilationUnit.getCompiledExpression(MVELCompilationUnit.java:203)
at org.drools.base.mvel.MVELConsequence.compile(MVELConsequence.java:75)
at
org.drools.rule.MVELDialectRuntimeData.onBeforeExecute(MVELDialectRuntimeData.java:173)
at
org.drools.rule.DialectRuntimeRegistry.onBeforeExecute(DialectRuntimeRegistry.java:144)
at
org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:599)
at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:472)
at
org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:150)
at
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1085)
at
org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:824)
at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:673)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:203)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:182)
at
com.infy.fcs.drools.adapter.DroolsGuvnorTest.readKnowledgeBase(DroolsGuvnorTest.java:196)
at
com.infy.fcs.drools.adapter.DroolsGuvnorTest.main(DroolsGuvnorTest.java:107)
When i tried to access the process package(Which is a diff package and
contains only a process), i got the following error
java.lang.UnsupportedClassVersionError:
Fatca_Process/Process_Fatca_Process_Fatca_integration_queue_f06d3a378a5f49d5b7589aae2c0b686eReturnValueEvaluator7Invoker
: Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at
org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.fastFindClass(JavaDialectRuntimeData.java:615)
at
org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:254)
at
org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237)
at
org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.drools.rule.JavaDialectRuntimeData.wire(JavaDialectRuntimeData.java:435)
at
org.drools.rule.JavaDialectRuntimeData.wire(JavaDialectRuntimeData.java:430)
at
org.drools.rule.JavaDialectRuntimeData.onBeforeExecute(JavaDialectRuntimeData.java:256)
at
org.drools.rule.DialectRuntimeRegistry.onBeforeExecute(DialectRuntimeRegistry.java:138)
at
org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:599)
at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:472)
at
org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:150)
at
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1085)
at
org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:824)
at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:673)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:203)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:182)
at
com.infy.fcs.drools.adapter.DroolsGuvnorTest.readKnowledgeBase(DroolsGuvnorTest.java:196)
at
com.infy.fcs.drools.adapter.DroolsGuvnorTest.main(DroolsGuvnorTest.java:107)
here is the attached changeset that i am using
changeset_process.xml
<http://drools.46999.n3.nabble.com/file/n4020175/changeset_process.xml>
ChangeSet_rules.xml
<http://drools.46999.n3.nabble.com/file/n4020175/ChangeSet_rules.xml>
please lemme know, if wat i am trying to achieve is evne possible or not?
If yes, then where am i going wrong ?
--
View this message in context: http://drools.46999.n3.nabble.com/Complicated-Issue-tp4020175.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years
UserGroupCallbackManager getProperty doesn't return the given property
by eselis
Hi,
When I have a task with more than one group assigned and I want to get the
potencial owners by one groupId, instead to get the ones filtered by the
given groupId, I get all the tasks. I found a property to available that
filtering which is "disable.all.groups", but after setting it and continue
not working, I took a look inside the code, and I found in
UserGroupCallbackManager
/
public String getProperty(String name) {
if (this.callbackproperties != null) {
this.callbackproperties.getProperty(name);
}
return null;
}
/
It's always returning null, I'm using drools version 5.4.0.Final and jbpm
version 5.3.0.Final.
I can't find a better solution that you can change it in the code :S
Thanks in advance,
Erica
--
View this message in context: http://drools.46999.n3.nabble.com/UserGroupCallbackManager-getProperty-do...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years
Text Mining and Drools
by Daniel Souza
Hi Drools Team,
I'm interested in mix drools with text mining.
I have in mind the process to do it, e.g:
Step 1:
> Tokenization:
* divide text to separate in a vector of word tokens;
* eliminate signals and separete hyphens in two tokens.
Step 2:
> Filtering:
* With a list of most common words built, eliminate this common words in
the vector of word tokens;
* Assign a sub-vector of synonyms for each token, if possible.
Step 3:
> The interest knowledge for text mining. (It still a cloud in my mind).
*The problem:
What I want to do in this step is to match a TEXT A with TEXT B for protein
function annotation.*
--------------------------------------------------------------------------------------------
Suppose these four situations below:
sequence: >Contig737
hit1: Pre mRNA splicing factor cwf8
hit2: cell control protein cwf8
*Match: hit1: cwf8 <> hit2: cwf8*
It's important to note that the most uncommon word is most important to
consider as an entire match.
sequence: >Contig1170
hit1: splicing coactivator SRm300 like
hit2: pre mRNA splicing factor CWC21
*Match: hit1: splicing <> hit2: splicing*
In this case splicing could be relevant or not, it will depend of the
biologist knowledge.
sequence: >Contig1431
hit1: transcription factor HAP3
hit2: pre mRNA splicing factor ATP dependent RNA helicase PRP43
*Match: hit1: factor <> hit2: factor*
In this case factor is a common word and I should filter it too.
sequence: >Contig56
hit1: Phosphoribosylpyrophosphate synthetase
hit2: ribose phosphate pyrophosphokinase
*Match: hit1: Phosphoribosylpyrophosphate <> substring-hit2: phosphate*
In this case phosphate match as a substring of Phosphoribosylpyrophosphate.
This match is very relevant to consider as an entire match.
-------------------------------------------------------------
Now I'm thinking in how to evaluate tokens between hit1 and hit2.
What I did before is to match vector with less tokens inside a vector with
more tokens using no sensitive case. Each token was matched as an entire
string or sub-string.
I searched about text mining and biomedical field and there are confused
informations.
Something interesting that I found is the Soundex algorithm that have
another point to face similarities between two texts. Reading in somewhere
in the Drools docs Soundex can be used with drools by an external lib or
class.
I don't know if there is something implemented in Drools to handle text
inside rules.
What I think to do is to build a model that still in cloud to evaluate the
matching between hit1 and hit2. A model to score matches. The most relevant
word can have a high weight.
If someone has a suggestion it will be well appreciated.
Regards,
Daniel Souza
--
View this message in context: http://drools.46999.n3.nabble.com/Text-Mining-and-Drools-tp4021290.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years