URL for package documentation does not refresh with new Build
by John Peterson
I was experimenting with Guvnor 5.1.1's new capability to produce
documentation. In my scenario, I did a Build Package and then clicked
on the "URL for package documentation" link. Everything looked fine.
Then I went back and added a description to one rule and "un-disabled"
another rule (in DSL) to see how it would look on the report. I
returned to the package screen, clicked Build Package, then click on the
"URL for package documentation" link, but nothing appeared to change
(neither my description nor my "un-disabled rule" are on the report).
I've tried to "Save and validate package" as well as logging out of
Guvnor and logging back in, but those did not work either. Has anyone
else seen this?
15 years, 6 months
Rule removal in BRMS 5.1/Drools Guvnor
by Benson Fung
Hi,
I created a rule(Technical rule) in the BRMS. But I would like to remove it
now. When I pull down the Action at the top right hand corner, the delete
is greyed. Please teach me how to remove the rule, otherwise, so many
garbage rule will be accumulated in the BRMS.
Thanks
Benson
15 years, 6 months
working with arraylist in drools application jboss
by wasim.khan318
public static class Item
{
private String CustomerId;
private String Item;
}
public static class Data
{
public ArrayList<Item> items = new ArrayList<Item>();
public ArrayList<Item> GetData()
{Item item1 = new Item();
// some code
from database
item1.CustomerId=rs.getString("CustomerId");
item1.Price=rs.getString("item");
items.add(item);
return item1
}
1.how to write rule how to find customer of a perticular Item
2. what i have written
$D:Data();
$I:Item();
$R:Item(item =="I1" )from $D.GetData() ;
then
System.out.println("hello");
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/working-with-arraylis...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 6 months
Drools vs Guvnor vs Jira versioning
by Michael Whidden
I'm a bit confused about the versioning of Drools and Guvnor.
I downloaded Drools 5.1.1 Guvnor Standalone, but the 'About'
window in the Guvnor Web UI says 5.0.0 SNAPSHOT 25673M, and the
Issues tracker (Jira) on the community pages doesn't even list
a 5.1.1 version when submitting a bug report.
Can anyone clarify for me the relationship between Drools (Expert)
and Drools Guvnor version numbers?
Thanks, and obviously not terribly urgent.
-Mike
15 years, 6 months
Integration Of Guvnor with CustomApp
by Harshit Bapna
Hello All,
I am able to successfully integrate Guvnor into my custom app. (based on
spring)
(
http://drools-java-rules-engine.46999.n3.nabble.com/How-to-integrate-Guvn...
)
I have written some code in the index.jsp which invokes the
ServiceImplementation of Guvnor.
I am observing that RuleRepository object is coming as null.
Note: Through the integrated app If I hit the Guvnor URL than it is working
as normal.
private ServiceImplementation getService() {
ServiceImplementation impl = new ServiceImplementation();
RulesRepository repository = impl.getRulesRepository();
return impl;
}
What is the suggested way of using the Guvnor services from the jsp/java ?
15 years, 6 months
Ordering rules execution: ruleflow-group or salience?
by AleBu
Hi all,
I have some complex rule execution scenario which consists of several steps
where different groups of rules must be executed. These steps are: 'Init
Data', 'Validate Integrity', 'Stop Execution if any integrity errors found'
and 'Validate Business Logic'. Originally I implemented it by assigning
specific salience to specify an order of rules, like 'Init Data' rules has
biggest salience, and 'Validate Business Logic' rules has the smallest.
I am wondering, is designing separate rule flow (very simple) is a valid
approach and wouldyoy recomend it? It should look like:
'Start' -> 'Init Data' -> 'Validate Integrity' -> 'Stop Execution if any
integrity errors found' -> 'Validate Business Logic' -> 'End'.
Also, I tried to do it by specifing 'ruleflow-group' for each rule and
creating rule-flow, but got an error 'Unknown process ID' while executing.
The code was very simple - 1st I added rule-flow file as resource to
KnowledgeBuilders DRF resource with:
Resource flowFileRes = ResourceFactory.newFileResource( flowFile );
knowledgeBuilder.add( flowFileRes, ResourceType.DRF );
knowledgeBuilder.hasErrors() is false at this point, so I assume that
process was added sucessfully.
Then I am executed:
session.startProcess( MAIN_FLOW_ID );
session.fireAllRules();
MAIN_FLOW_ID constist of package defined in rule-flow file and rule-flow-ID
from the same file (<package>.<flow-ID>).
But fireAllRules() claims that no such process can be found (Unknown process
ID).
Documentation is very weak and it is the only information I found about
executing processes, so perhaps I miss something, but mailing list seems
like the only place to find more info.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Ordering-rules-execut...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 6 months
Too many ACTIVATION "candidates"
by rouvas@di.uoa.gr
Hello List,
Issue: Too many ACTIVATION "candidates"
Sorry for the terminology, I'm sure it is not correct.
Background Information:
- Drools.5.0.1
- using StatefulKnowledgeSession
- logging through KnowledgeRuntimeLoggerFactory.newConsoleLogger()
- after each session creation, rules are inserted from a DRL file,
facts are inserted and ksession.fireAllRules() is executed
- str[contains] and str[bidicontains] are custom operators implemented by me
If I understand Drools modus operandi correctly, as each fact is inserted
the list of candidate "nodes" to fire are constructed. Upon
fireAllRules(), a selection mechanism selects a candidate "node" to fire
and things start
rolling.
In my case, the rule at the end results in too many candidate "nodes"
created during facts insertion mode. If the rule ever gets to fire, only
one will remain since the not codition in the LHS and the logicalInserts
in the RHS exclude two firings of the rule (I hope).
fact1 has about 90 entries.
fact2 has about 25 entries.
fact3 has about 350 entries.
fact4 has about 150 entries.
fact5 has about 250 entries.
So I'm guessing that 90*25*350*150*250=29.531.250.000, i.e. 29 billion
candidate "nodes" would be created. Of course, I'm having OME long before
that!
If my analysis is correct, is any way that I could either:
a) detect that kind of combinatorial explosion during runtime (maybe a
kind of dry-run) and act accordingly
or
b) set any kind of upper limit for candidate "nodes" creation and stop
further execution thus avoiding to bring down the server along the way...
rule "r21767.2"
dialect "mvel"
when
gnId : GoodNumbers()
v1 : fact1( c21658 == "R" )
v2 : fact2( c21727 == "R" )
v3 : fact3( c21723 == "R" )
v4 : fact4( c21616 == "R" )
v5 : fact5( c21731 == "R" )
v6 : GoodsItems( gnId.goodNo==goodNo ,
goodsDescr str[bidicontains] v5.c21733 ||
goodsDescr str[bidicontains] v5.c21732 ||
goodsDescr str[bidicontains] v4.c21617 ||
goodsDescr str[bidicontains] v4.c21619 ||
goodsDescr str[bidicontains] v3.c21724 ||
goodsDescr str[bidicontains] v2.c21726 ||
goodsDescr str[bidicontains] v1.c21656 ||
goodsDescr str[bidicontains] v1.c21657 ||
goodsUnDangCode str[contains] v1.c21659 ||
goodsUnDangCode str[contains] v2.c21728 ||
goodsUnDangCode str[contains] v4.c21618 ||
goodsUnDangCode str[contains] v5.c21735 ||
combinedNome str[bidicontains] v1.c21655 ||
combinedNome str[bidicontains] v2.c21729 ||
combinedNome str[bidicontains] v4.c21615 ||
combinedNome str[bidicontains] v5.c21734
)
not mm : Marker ( mm.entityId==v6.entityID, mm.markAs=="19")
then
modify ( v6 ) {
setMarkAs("1")
}
Marker m1 = new Marker();
m1.setEntityId(v6.entityID);
m1.setMarkAs("19");
insertLogical(m1);
end
Thank you very much for your time,
-Stathis
15 years, 6 months
Can we return values from rules to java ?
by Shobhit1 T
Hi,
I want to know which of the fired rules was matched. Is there a way to
find that out or return a value from drl to java file that can indicate
which rule was matched?
Thanks
Shobhit
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
15 years, 6 months