Rule Compilation error : The Field ... is not visible
by Ashish Soni
Hi All ,
I am sure there must be a silly mistake but i am not able to find out ,
please help me as what is wrong in below rule
package Test
import com.abc.api.document.Document
import com.abc.api.line.LineItem
rule "split line item"
when
$item : LineItem( grossAmount > 1000 )
then
modify( $item ) { grossAmount=500 };
end
11:35:23,318 ERROR [] Rule Compilation error : [Rule name='split line item']
Test/Rule_split_line_item_0.java (7:565) : *The field
LineItem.grossAmount is not visible*
Thanks,
Ashish
15 years, 8 months
Guvnor, database and rule language
by Anu@work
I am trying to use drools to evaluate the following rule:
Given a telephone number, if the telephone number already exists in database
and has a balance > 0, set isAllowed = false. I cannot figure out how to
write the rule.
This is my object
public class Customer implements Serializable {
private static final long serialVersionUID = 1L;
private String tn;
private Double balance;
private Boolean isAllowed;
// getters/ setters
}
Can anyone help me with the rule below? The TN is set in the input fact. Is
the query below correct? It looks incorrect.
global org.hibernate.Session hibernateSession;
when
cust1:Customer()
cust2:Customer() from hibernateSession.createQuery("Select * from
Customers Where TN = :tn and balance >
0).setProperties({"tn":cust1.getTn()})list()
then
cust1.setIsAllowed(false);
--
View this message in context: http://www.nabble.com/Guvnor%2C-database-and-rule-language-tp22810206p228...
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 8 months
stack overflow in work items
by Garrett Conaty
My scenario is a rule that is firing over a collection. For each item
in that collection a ruleflow starts to handle it. Right now the
ruleflow just uses the log workitem to log the steps. When there are
~600 items in the collection I'm getting stack overflows. Granted the
processes could be optimized (I'd really like to take each thing in
the collection that matched and start a process for the set of them).
Still is there a limit to the number of active processes with work
items?
java.lang.StackOverflowError
at java.lang.Long.valueOf(Long.java:547)
at
org
.drools
.workflow.core.impl.NodeContainerImpl.getNode(NodeContainerImpl.java:44)
at
org
.drools
.workflow
.core.impl.WorkflowProcessImpl.getNode(WorkflowProcessImpl.java:47)
at
org
.drools
.workflow
.core
.impl.WorkflowProcessImpl.internalGetNode(WorkflowProcessImpl.java:51)
at
org
.drools
.workflow.instance.impl.NodeInstanceImpl.getNode(NodeInstanceImpl.java:
90)
at
org
.drools
.workflow
.instance
.impl
.ExtendedNodeInstanceImpl
.getExtendedNode(ExtendedNodeInstanceImpl.java:24)
at
org
.drools
.workflow
.instance
.impl
.ExtendedNodeInstanceImpl.triggerEvent(ExtendedNodeInstanceImpl.java:41)
at
org
.drools
.workflow
.instance
.impl
.ExtendedNodeInstanceImpl
.internalTrigger(ExtendedNodeInstanceImpl.java:28)
at
org
.drools
.workflow
.instance
.node
.EventBasedNodeInstance.internalTrigger(EventBasedNodeInstance.java:30)
at
org
.drools
.workflow
.instance
.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:80)
at
org
.drools
.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:
111)
at
org
.drools
.workflow
.instance
.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:141)
at
org
.drools
.workflow
.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:
128)
at
org
.drools
.workflow
.instance
.impl
.ExtendedNodeInstanceImpl
.triggerCompleted(ExtendedNodeInstanceImpl.java:37)
at
org
.drools
.workflow
.instance
.node
.EventBasedNodeInstance.triggerCompleted(EventBasedNodeInstance.java:96)
at
org
.drools
.workflow
.instance
.node
.EventBasedNodeInstance.triggerCompleted(EventBasedNodeInstance.java:77)
at
org
.drools
.workflow
.instance
.node.WorkItemNodeInstance.triggerCompleted(WorkItemNodeInstance.java:
192)
at
org
.drools
.workflow
.instance
.node.WorkItemNodeInstance.workItemCompleted(WorkItemNodeInstance.java:
244)
at
org
.drools
.workflow
.instance
.node.WorkItemNodeInstance.signalEvent(WorkItemNodeInstance.java:222)
at
org
.drools
.workflow
.instance
.impl
.WorkflowProcessInstanceImpl
.signalEvent(WorkflowProcessInstanceImpl.java:258)
at
org
.drools
.process
.instance
.impl
.DefaultWorkItemManager.completeWorkItem(DefaultWorkItemManager.java:96)
at com.jsi.inactivity.DroolsTest$1.executeWorkItem(DroolsTest.java:40)
15 years, 8 months
How to clone object inside a rule
by Ashish Soni
Hi All ,
I want to clone/copy one object inside a rule depends on some condition ,
Please let me know how i can do that ?
Regards,
Ashish
15 years, 8 months
Facing severe issues while using Persistence
by Umesh Wankhede
Hi
While using workflow persistence feature (with human task component), I
am having quite a few problems. When I use default db (H2), I get
ConstraintViolationException [1]. Since I have to ultimately integrate
with Oracle, I modify the config files to point to Oracle. But with that
I started getting lot of other issues, like invalid column names (size,
date), invalid table name (Comment), SQLGrammarException, etc[2] (This
is serious problem, if you use Oracle!)
I am struggling for quite a few days to get this work, but no success,
any help would be greatly appreciated.
I am attaching the source code also[3].
[1]db-h2-errors.log
[2] db-oracle-errors.log
[3] RuleFlowTest.java, ruleflow.rf
Regds
Umesh
Legal Notice: This transmission, including any attachments, is confidential, proprietary, and may be privileged. It is intended solely for
the intended recipient. If you are not the intended recipient, you have received this transmission in error and you are hereby advised that any
review, disclosure, copying, distribution, or use of this transmission, or any of the information included therein, is unauthorized and strictly
prohibited. If you have received this transmission in error, please immediately notify the sender by reply and permanently delete all copies of
this transmission and its attachments
15 years, 8 months
Writing rules using java from template
by Meny Kobel
Hi,
Any updates regarding this subject?
I have the same problem and can't find a solution.
Like newbie I need to read varying rules from DB and transform them to
drools language.
Thanks,
Meny
15 years, 8 months
Drools Boot Camp Ligtning Talks and Registration Page
by Mark Proctor
Due to demand the Drools team are introducing lightning talks to the
Boot Camp, following the Drools 5.0 primer on the Monday. Each company
will be given 20 minutes to present, more time can be requested if you
need it. The Desktop Configuration team,
http://www.sun.com/products/dc/, from Sun are the first to volunteer to
present. If you wish to present, please contact me asap.
The Drools Boot Camp registration page
<http://www.jboss.org/community/docs/DOC-13468> is now open. If you are
hoping to attend, please put your details there and send me an email, so
that we can estimate and manage attendance. We only have spaces for
about 20 or so people, so please do hurry. Registration wiki page can be
found here <http://www.jboss.org/community/docs/DOC-13468>,
http://www.jboss.org/community/docs/DOC-13468, you will need to login to
edit the page.
The event time tabled schedule is now as follows:
Drools 5.0 Primer : Monday 1st of June 10.00 to 13.00
* The new features in Drools 5.0 will be covered at an end user
level. This includes all the drools projects, Guvnor, Flow, Fusion
and Expert. This is suitable for anyone with minimal previous
Drools experience who just want to know "what's new".
Community Lightning Talks : Monday 1st of June 13.30 to 14.30
* 20 minute community lightning talks about their experiences with
drools.
o Sun will talk about Drools in their Desktop Configurator
<http://www.sun.com/products/dc/>
Drools 5.0 Guvnor Internals : Tuesday 10.00 to 12.00
* The internals of Guvnor will be discussed and how all the parts
come together and current issues and directions we wish to take
the project. This is suitable for anyone with minimal previous
Drools experience, but ideally you should be aware of GWT, JCR and
Guvnor in general. This is targetted at people who wish to extend
Guvnor with new features or re-use/embed existing aspects of Guvnor.
Drools 5.0 Advanced Engine : Wednesday 10.00 to 13.00
* This will be a deep dive for the technical on Rete enhancements.
We will cover the asymmetrical Rete implementation, as compared to
the traditional symmetrical approach, and how we enhanced it for
event processing and workflow. This is targetted at experienced
people, who already have an understanding of Rete and wish to
understand the latest research and innovations - not for the feint
hearted.
Drools 5.0 Domain Specific Workflow : Thursday 10.00 to 12.00
We will show how Drools Flow can be extended for domain specific
workflow, with a focus on the pluggable Work Items and Eclipse. We will
also cover the pluggable workflow framework for customised execution
behaviour, such as is used to provide OSWorkflow compatability. This is
suitable for anyone with a java and eclipse background, ideally you
should have some understanding of what Drools and especially Drools Flow is.
15 years, 8 months
help in writing this rule logic
by techy
Hello,
Please guide me to implement following rule.
I would like to found out the city where absence of either Male or Female
found for same age. I also need to have ref to those Men and Female of that
city in collection to use it RHS. Also there will be max of one male &
female for same age.
Male{
String name;
int age;
String city
}
Female{
String name;
int age;
String city
}
Thanks
--
View this message in context: http://www.nabble.com/help-in-writing-this-rule-logic-tp22817412p22817412...
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 8 months