Issue in sending Multiple request to Drools Guvnor package
by bbarani
Hi,
We have a java code which connects to guvnor and fires all the rules in a
package and gets back the final decision from Guvnor.
The code works fine for single request, if I send multiple request the code
takes more time to return the results. I am just wondering if we are doing
anything wrong which affects the response time for multiple request.
This is what we are doing now for multiple request,
Get multiple request in an request array object
Iterate through each request object and fire all the rules with the
parameters present in that request object and display the final decision for
each request.
For each request object we are invoking the function which creates a
ruleagent (based on guvnor.properties file) and fires all the rules with
corresponding request parameter and sends back the decision.
I am thinking this might be the issue, due to the fact that we are creating
new connection / rule agent everytime when we invoke the function and that
in turn cause more time for returning the results back.
I Just want to know if there is a way to just create a single session with
Guvnor using rule agent and invoke all the rules multiple times based on the
number of request and finally get all the decisions.
Thanks,
BB
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Issue-in-sending-Mult...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 2 months
Guvnor 5.1: Pencil icon not clickable in BRL editor
by Scott Mayne
Hi all,
I'm reading Paul
Browne's "JBoss Drools Business Rules" and in Ch. 5 we make a BRL in the guided
editor. We're using a simple fact model with a single class (Sales) which has
(among others) a field "sales", type long. The book uses an earlier version of
Guvnor so things look a little different but everything's worked so far, until I
use the editor to make a rule that looks like this in "view source":
rule
"SalesDiscount"
dialect "mvel"
when
mySales : Sales( salesValue
: sales >= "100" )
then
mySales.setSales( salesValue-10 );
update( mySales );
end
When I try it out, I get this line in the THEN
section
"1. Modify value of Sales [mySales] sales [pencil icon] [remove icon]
but neither "sales" nor the pencil icon is clickable, so I can't enter what it should change to. When click view source using what I could do I
get:
rule "SalesDiscount"
dialect "mvel"
when
mySales :
Sales( salesValue : sales >= "100" )
then
mySales.setSales(
);
mySales.setWait( );
update( mySales );
end
[I added
the "wait" because the modify field dropdown has this as an option but it's not
in the Java class and I'm not sure where it came from.]
Can anyone shed light on this behavior? I'm using the latest version of Firefox, compiling
with GWT/building my own EAR (though I haven't done any code changes) using RAD
7.5.5.1 (based on Eclipse 3.4), and am running Guvnor on
WebSphere.
14 years, 2 months
How does drools loads a modified rule ?
by Harshit Bapna
Hi All,
I am new to Rule Engine concept. I am investigating the Drools 5.0 to check
if it meets our requirements.
Questions:
1. I am not able to find a resource to learn the syntax of drool rules.
I have gone through the shopping example in Drools 5.1 examples but not
able to get the basics right.
$c : Customer() -- what does this mean ? Is it that all
objects of type Customer in the working memory are matched are taken one by
ones and assigned to c ?
$d : Discount( customer == $c ) -- Each discount
objects which have the matching customer are assigned to d. How can I debug
this process in eclipse ?
Please provide a resource where I can learn the drl syntax.
Also what are differences in drl when dialect is java and not mvel.
2. How would a rule engine behave when rules are running on the facts and
simultaneously the rules are updated in the knowledge base?
14 years, 2 months
Using ForEach variables in split constraints
by sam.squire@paretopartners.com
Hello there,
I wanted to refer to a variable in a split constraint in a ForEach node.
What is the correct way to nest a split node in a ForEach node and refer
to the variable of the collection?
I have tried the following:
a) Start process and insert process into session, providing the map
containing the collectionExpression. Using:
<import name="org.drools.runtime.process.WorkflowProcessInstance"/>
processIntance: WorkflowProcessInstance()
$item: MyObject: (this == (processInstance.getVariable("item")))
this doesn't seem to grab the variable like I expected it to.
How can I assign processInstance.getVariable("item") itself to a variable?
(I imagine this would work if this did)
b) Set the variable on the global process from the current context
kcontext.getProcessInstance().setVariable("item",
kcontext.getVariable("item")
I know this is not the right answer.
c) Insert the item in an action at the beginning of the loop. Retract it
at the end. I then match against the item of type MyObject at the
beginning.
// in action:
insert(item)
// in constraint
$item: MyObject()
// after action
retract(item)
This requires looping in Java to start the processes individually and
setting the variable explicitly each time.
This seems a bit of a roundabout way of doing it, what is *the* correct
method?
Thanks,
This message may contain confidential and privileged information and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorised. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator and then immediately delete this message. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses.
Please refer to http://www.bnymellon.com/disclaimer/piml.html for certain disclosures.
14 years, 2 months
Re: [rules-users] ForEach element cannot see CollectionExpression
by sam.squire@paretopartners.com
I have solved the problem. The list and variable must be declared in the
header, using an import and variable element. I can now refer to the
variable in an action. This is the posting that helped me find the answer:
http://drools-java-rules-engine.46999.n3.nabble.com/How-to-use-Ruleflow-F...
Thanks.
This message may contain confidential and privileged information and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorised. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator and then immediately delete this message. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses.
Please refer to http://www.bnymellon.com/disclaimer/piml.html for certain disclosures.
14 years, 2 months
Calling specific Rule Group
by Swapnil Sawant
Hi,
I have created two rule groups "Group 1" and "Group 2".
Now, I have read that to execute these groups I need to write something like following code :
Rule "pick group X"
when
Fact( attribute = "condition1" )
then
drools.setFocus("Group 1")
end
Rule "pick group Y"
when
Fact( attribute = "condition2" )
then
drools.setFocus("Group 2")
end
I wanted to know is it always necessary to write separate rules for calling/execution of these rule groups (rules "pick group X" and "pick group Y")?
Or is there any other api function similar to ksession.fireAllRules() for calling specific rule group ?
Thanks & Regards,
Swapnil Sawant
________________________________
This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
______________________________________________________________________
14 years, 2 months
Bug in 5.1 : function w/o parameter type is a no-no
by Wolfgang Laun
The RTE is caused by following DRL.g in writing a function; it says you can
omit the type for a parameter. A function like this causes the crash:
function inf sqr( a ){ return a*a; }
Untyped parameters may be used in queries. I suppose it will be necessary to
use different NTs for parameters and param_definition.
Exception in thread "main" java.lang.RuntimeException:
org.drools.compiler.DroolsParserException: Unknown error while parsing. This
is a bug. Please contact the Development team.
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:545)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
at rss.drools.setup.Application.setup(Application.java:40)
at rss.drools.setup.Application.execute(Application.java:60)
at appl.transport.Transport.main(Transport.java:64)
Caused by: org.drools.compiler.DroolsParserException: Unknown error while
parsing. This is a bug. Please contact the Development team.
at org.drools.compiler.DrlParser.compile(DrlParser.java:250)
at org.drools.compiler.DrlParser.parse(DrlParser.java:142)
at org.drools.compiler.DrlParser.parse(DrlParser.java:147)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:264)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:459)
14 years, 2 months
SAML 2.0 support ?
by Lavabit
Hi,
I try to find out how good SAML support in Jboss is.
I would like to know if any of you as ever succesfully tested JBoss against a
certified SAML 2.0 Identity Provider ?
Thank you very much.
Pierre
14 years, 2 months
Ruleflow and events
by pieter
Hi,
I have a foreach node with a composite node nested inside it. In the
composite node I have an exception handler defined and a fault node. The
exception handler calls
context.getProcessEngine().signalEvent("MyFaultType",
context.getVariable("MyFaultVariable"));
However if the MyFaultType event node is nested in either the foreach or
composite node then the process engine can not find it. It only finds it
if the event node is outside both the foreach and composite node.
Caused by: java.lang.IllegalArgumentException: Unknown node id: 57
at org.drools.workflow.core.impl.NodeContainerImpl.getNode(NodeContainerImpl.java:46)
at org.drools.workflow.core.node.CompositeNode.getNode(CompositeNode.java:33)
at org.drools.workflow.core.node.ForEachNode.internalGetNode(ForEachNode.java:102)
at org.drools.workflow.instance.impl.NodeInstanceImpl.getNode(NodeInstanceImpl.java:91)
at org.drools.workflow.instance.node.EventNodeInstance.getEventNode(EventNodeInstance.java:66)
at org.drools.workflow.instance.node.EventNodeInstance.signalEvent(EventNodeInstance.java:36)
at org.drools.workflow.instance.node.CompositeNodeInstance.signalEvent(CompositeNodeInstance.java:219)
at org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:278)
Is this expected behavior?
I am trying to have the foreach loop continue after the fault is raised.
Thanks
Pieter
14 years, 2 months
Perfomance issue when accessing Guvnor using a Web service
by bbarani
Hi,
We have written a webservice which will inturn invoke the Rules present in
Guvnor and returns the response from Guvnor to the invoking client app.
We have written the Webservice using Axis 2 WS.
Guvnor is using SQL server 2005 as its backend.
It takes around 15 to 20 seconds for Guvor to send a response back to WS. I
am very much interested in getting to know various performance factors that
affects Guvnor.
I am currently running the webservice from one server and Guvnor is running
in another server (This server doesnt have any app other than Guvnor).
Whenever a call is made to Guvnor from the WS, I could see the heap size of
Tomcat container (where Guvnor is deployed) growing interms of MB but it
doesnt decrease at all. After some time I get out of memory errors.
I just want to check if someone has a better configuration parameters for
Guvnor which can help me to increase performance and also to deal with
memory related issues.
Thanks,
Barani
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Perfomance-issue-when...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 2 months