Modifying in built rule in new formatt
by wasim.khan318
It is a Test Code , and i am very new to java and drools
i have a inbuilt
rule "bundle A - included units"
dialect "mvel"
when
$order : OrderDTO( )
$line : OrderLineDTO( itemId == 16, $quantity : quantity ) from
$order.lines
SubscriptionResult( userId == $order.userId, itemId == 12, subscribed ==
true )
$pricing : PricingResult(userId == $order.userId, itemId == 13)
then
$order.getLines().remove($line);
OrderLineBL.addItem($order, 13, new Integer($quantity.intValue()),
$pricing.getPrice());update($order);
end
i want to modify this rule like
rule "bundle A - included units"
dialect "mvel"
when
$order : OrderDTO( )
$line : OrderLineDTO( itemId == param1, $quantity : quantity ) from
$order.lines
SubscriptionResult( userId == $order.userId, itemId == param2, subscribed
== true )
$pricing : PricingResult(userId == $order.userId, itemId == param3)
then
$order.getLines().remove($line);
OrderLineBL.addItem($order, param3, new Integer($quantity.intValue()),
$pricing.getPrice());update($order);
end
1.i want to replace hardcoded value to params as ItemId16 to param1
,Itemid12 to param2 so when any one see my rule can not guess about
hardcoded value. and i want that the values of param1,param2 some how come
from database
2.Till now what i did from my reading and exploring is
i have created java functions in jboss which returns value like
GetParam1(some var),GetParam2(some var),GetParam3()
i tested them in jboss drools application they are working fine
3. then i build package and upload in guvnor
4.while writing technical ander Fact field i am getting only GetParam3() not
GetParam1(some var) and
GetParam2(some var)
5. I dont know why . when i remove parameter value say make GetParam1() ,
without parameter it comes under class field.
6. please tell me is it right approach and if right then how i handle
GetParam1(some var) ,because they return param1 value which passed in
modified rule
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Modifying-in-built-ru...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 11 months
Re: [rules-users] URGENT : Drools - Guvnor Integration doubt
by Esteban Aliverti
Hi,
My first suggestion is: never use the word URGENT in the subject! 90% of the
people that write to this list (me included) have "urgent" problems ;)
Now, regarding to your question. In order to use a model in guvnor, you must
upload it as a jar file. Once you have your jar uploaded, you can start
authoring your rules in guvnor.
Your applications can then get those rules (its sources or as a compiled
package) to use them. Usually, applications don't modify the model classes:
they don't create new classes nor add new attributes, etc.
When you need to modify a class, then you need to upload the new version of
you jar again. There are ways to do this programatically if you need to.
Best regards,
El dic 28, 2010 6:35 a.m., "sunkara007" <srinivas.sunkara(a)altisource.com>
escribió:
Hi Team,
I am evaluating Drools - Guvnor to use it in BPM suits.
can you explain how the domain...
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/URGENT-Drools-Guvnor-...
Sent from the Drools - User mailing list archive at Nabble.com.
____________________________________...
13 years, 11 months
Testing rules created using fluent API
by Dan Nathanson
Hi,
I've written code that converts our company's internal model of a process
flow to a Drools flow, using the fluent API. I can see in my debugger that
I've created the correct structure (I think), but I'd like to write test
cases that prove it. Is there a way to check the structure of the generated
process without executing it? I'm not trying to test a specific flow, I'm
trying to test the code that converts from our model to Drools.
Regards,
Dan Nathanson
13 years, 11 months
Re: [rules-users] URL for package documentation does not refresh
by John Peterson
We're running on a Linux server using JBoss 4.2.3.GA, so the
documentation isn't on our workstations (we tried clearing the cache on
IE and it didn't resolve the issue).
Is it sitting out on the server someplace?
>Message: 3
>Date: Thu, 30 Dec 2010 07:31:14 -0700
>From: "John Peterson" <john.peterson.gv3k(a)statefarm.com>
>Subject: [rules-users] URL for package documentation does not refresh
> with new Build
>To: <rules-users(a)lists.jboss.org>
>Message-ID:
>
<D3A6E68928C9104BB815C83F43A36BDF0F1164FD(a)WPSCV6NH.OPR.STATEFARM.ORG>
>Content-Type: text/plain; charset="us-ascii"
>
>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?
>
13 years, 11 months
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?
13 years, 11 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
13 years, 11 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.
13 years, 11 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
13 years, 11 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 ?
13 years, 11 months