unable to resolve method using strict-mode
by larryc
Hello. We are attempting to migrate old 5.0.0 Guvnor rules to BRMS version
5.3. We keep running into variations of the following error:
[Error: unable to resolve method using strict-mode:
org.drools.spi.KnowledgeHelper.request()]
[Near : {... .addFieldToDocument(request, "ALL", "COVG_SR22_FEE ....}]
^ [Line: 5, Column: 37]
I've seen similar postings concerning "unable to resolve method..." but we
still haven't been able to figure out what's wrong. Here is the actual rule
from 5.0.0.
rule "VA SR22 Amount"
no-loop
ruleflow-group "default"
dialect "mvel"
when
request : FormRequest(
payload.policy.drivers != ""
&& != ( null ),
driver :
payload.policy.drivers.driver != "" && != ( null ),
payload.policy.ratingState
== "VA" )
drivers : ArrayList()
from collect( Driver( key != "",requiresSR22=="true") from driver)
then
int size = drivers.size();
for(int i =0; i < size; i++){
Driver dvr = drivers.get(i);
int drvNbr =
Integer.parseInt(dvr.getKey().substring(6));
DocumentHelper.addFieldToDocument(request, "ALL",
"COVG_SR22_FEE_AMT","$0.00");
}
End
Any help would be appreciated.
Thanks! --Larry
--
View this message in context: http://drools.46999.n3.nabble.com/unable-to-resolve-method-using-strict-m...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 11 months
Extracting data from strings(regular expression)
by abing19881226
Hi:
I am trying to match a string to my regular expression and then capture
certain groups from the string.
I know previously there is no such feature , but I am just wondering if
there is one now?
Basically , what am trying to do is, insert strings into the session, and
carry out the reasoning to see if matches a certain regular expression.
In JAVA I did it as this:
public double parsingZ4_Ph_Reach(String line){
String regx="3240, Z4 Ph. Reach, .*, (.*), ohm, .*, .*,
.*";
Pattern
p=Pattern.compile(regx,Pattern.CASE_INSENSITIVE);
Matcher m =p.matcher(line);
if(m.matches()){
return Double.parseDouble(m.group(1));
}
return 0;
}
The purpose is to extract the data in the strings using drools.
Could you please give me some idea I I could do that in Drools?
Many thx.
--
View this message in context: http://drools.46999.n3.nabble.com/Extracting-data-from-strings-regular-ex...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 11 months
Problem importing processes from one system to another
by David Shields OpenCDS
I have created a repository on my own computer (localhost:8080) which
contains a large number of rules and several processes, and exported it to a
file.
I then imported the file into a new remote server (edmopencdsdev:8081) that
is running on a different port: 8081 instead of 8080.
Guvnor seems to work correctly on the new server, except for one thing: It
bombs when I try to open a process that was created on my local machine. It
seems that there are references to the host on the original server stored
within the imported repository somewhere.
Am I doing something wrong, or is this a known issue? If so, is there a
work-around short of separately saving the BPMN2 files and importing each
one of them individually? I have attached a sample of one of the processes
that causes this issue, although all of the processes I have tried fail with
the same error message (shown below) in the logs.
05:57:04,945 INFO [org.apache.jackrabbit.core.TransientRepository]
(http--0.0.0.0-8081-3) Session opened
05:57:22,290 INFO [org.jbpm.designer.server.EditorHandler]
(http--0.0.0.0-8081-2) The diagram editor is running in production mode.
Javascript will be served compressed
05:57:33,587 INFO [org.jbpm.designer.server.EditorHandler]
(http--0.0.0.0-8081-2) Performing diagram information pre-processing steps.
05:57:33,618 ERROR
[org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit]
(http--0.0.0.0-8081-2) http://localhost:8080/drools-guvnor/rest/packages/
05:57:33,618 INFO [stdout] (http--0.0.0.0-8081-2) Setting up default
workitem configuration
05:57:33,618 INFO [stdout] (http--0.0.0.0-8081-2) End setting up default
workitem configuration
05:57:34,493 ERROR [org.jbpm.designer.web.server.ServletUtil]
(http--0.0.0.0-8081-2) http://localhost:8080/drools-guvnor/rest/packages/
05:57:34,493 INFO
[org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit]
(http--0.0.0.0-8081-2) Successfully deleted file
:C:\JBoss\jboss-as-7.1.1.Final\standalone\tmp\vfs\temp8d0d9283eb376a77\desig
ner.war-a884420b84204c5f\stencilsets/bpmn2.0jbpm/bpmn2.0jbpm.json
05:57:34,602 INFO
[org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit]
(http--0.0.0.0-8081-2) Created
file:C:\JBoss\jboss-as-7.1.1.Final\standalone\tmp\vfs\temp8d0d9283eb376a77\d
esigner.war-a884420b84204c5f\stencilsets/bpmn2.0jbpm/bpmn2.0jbpm.json
05:57:38,040 ERROR
[org.jbpm.designer.web.repository.impl.UUIDBasedJbpmRepository]
(http--0.0.0.0-8081-1) Unable to connect to Gunvor. Is it running?
[http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/oryxeditor?uui
d=77827ae5-ce58-43d7-84f7-fe5785e5400f&usr=admin&pwd=admin]
05:57:38,587 ERROR [org.jbpm.designer.web.server.ServletUtil]
(http--0.0.0.0-8081-2) http://localhost:8080/drools-guvnor/rest/packages/
05:57:38,743 INFO [org.jbpm.designer.web.server.DictionaryServlet]
(http--0.0.0.0-8081-2) check connection response code: 404
Thanks for any help you can give.
-- des
13 years, 12 months
Marshalling/Unmarshalling KnowledgeBase/StatefulSession
by Paulo Reis
Hi guys,
Im having some issues with the time drools takes to build a knowledge base.
I have couple of pkgs that are compiled (something about 3mb) and drools takes almost 5s to give me the knowledge.
So I would like to know whether I could serialize the knowledge base on the database or even the stateful session that was built using the related knowledge. Is there any example that I could follow?
If you guys know other ways to improve the performance, please let me know.
Thanks in advance.
Paulo Reis
casmeiron(a)gmail.com
13 years, 12 months
Accessing FactField Metadata
by pcourtney
I have been able to access the FactType annotations by using
factType.getFactClass().getAnnotations(). However I cannot find any way to
access FactField annotations. Using a debugger I can see that the declared
type's field AnnotationDefinition is stored in the FieldDefinition but it is
not accessable via the FactField interface. Is there any way to access the
field annotations for DRL declared types? Will the 5.1.1 release fix the
problem (re JBRULES-2792)?
Thanks, Phil
--
View this message in context: http://drools.46999.n3.nabble.com/Accessing-FactField-Metadata-tp4019366....
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 12 months
How to define keywords that represent objects(in facts) to be able to use in rules
by san_drools
Hello,
I need to know how to proceed to define keywords that represent
objects of facts in Drools.
In detail, i am using Guvnor editor to write Business and
technical rules required on a package basis for an application. So, here
writing rules by using Objects and it's attributes synactically is a tedious
job for client.
So, the idea is "to provide some keywords to the client where each
keyword represents an object/attribute. By using keywords simply, the client
will write a rule. These keywords shall be processed (may be at compile
time) and the respective object/attribute shall be used/considered in rule
when the rules are fired"
To achieve this,
1. worked with DSL configurations but it fulfilled our idea
partially as every #condition and #action needs to be defined in DSL
configurations to be able to use them in a rule.
2. Tried working on guvnor sources for it, but couldn't be able
to do (as i am new to drools; i am a learner)
Can any one please suggest the way we can proceed to achieve this
requirement. Is 'working on guvnor sources' only the possible way for this?
Or is there any option/feature we can proceed with? Please let me know.
Thanks in advance.
Regards
San_Drools
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-define-keywords-that-represent-o...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 12 months