Guvnor Fact field
by wasim.khan318
i have a table in database Contain itemId and Item Price suppose i want to
do that
public class Applicant
{
private int ItemId;
public static int Calculate(ItemId id)
{
// here i have written code to find item price and apply some formula for
adding tax
and return prices
}
}
when i importing this class in guvnor application . in technical rule
editor. under fact field it is not showing
Calculate as a fact
i want to write
when
100<(Calculate(1))
then
//// some rule
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Guvnor-Fact-field-tp2...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 3 months
.NET web application problem
by primoz1987
Hello!
I have a lot of problems with my asp.net web application.
The example(MinimalDroolsForm) good fine to me, but web application not..
Did you resolved that problem with missing compiledRules0.dll or The invoked
member is not supported in a dynamic assembly error.
error show at builder.AddPackageFromDrl(rule);
I am sure there is no problem with my Stream and .drl file.
If I do that:
try {
builder.AddPackageFromDrl(rule);
} catch (Exception ex)
{
if (ex is NotSupportedException)
{ }
}
get error: ... rule is not valid, but I'm sure it is..
rule:
package test
rule "OldCustomer"
when
cust : Bolnik( Id > 90 )
then
modify(cust) { cust.Starost = "111" };
end
or
rule "OldCustomer"
when
cust : CustomerRecord( Id > 90 )
then
cust.Starost = "111";
modify(cust);
end
I really need help because I spent a lot of time with these problem.
I can't find .NET web app example..
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/NET-web-application-p...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 3 months
help with diagnosing CEP performance issue
by me
Hi.
im trying to demo drools-fusion for a system that processes backup events.
i have the following 2 CEP rules:
rule "Backup Not Succeeded For At Least 3 Days"
@ruleId(1)
when
Node($id : id)
not ( Backup(clientId == $id, $state: state == BackupStateEnum.FINISHED)
over window:time( 3d ) from entry-point "Backup Stream" )
then
//nothing for now
end
rule "Prune Previous Successful Backups"
@ruleId(2)
when
$prevBackup : Backup($id : clientId, state ==
BackupStateEnum.FINISHED) from entry-point "Backup Stream"
$newerBackup : Backup(clientId == $id, state ==
BackupStateEnum.FINISHED, this after $prevBackup) from entry-point "Backup
Stream"
then
drools.retract($prevBackup);
end
rule #2 is my attempt to cut down on memory usage. the problem is that rule
#2 slows down the processing very very considerably (2 orders of magnitude
slower when simulating batches of 40K events/day).
what would be my next step in trying to find the reason for it? my intuition
tells me that with 2 events in the system at any given time instead of 120K
(single node, 40K events/day 3 day window) i should have seen either a
speedup or reduced memory consumption (if not both) and yet the results im
seeing are the exact opposite.
is there anything im missing ? i could try adding some sort of
LastSuccessfulBackup "marker" object into main memory and updating it using
events from the backup stream, but then how would i express rule #1 ?
any help/clues/suggestions would be greatly appreciated,
radai.
15 years, 3 months
Setting rule properties via guvnor
by GPatel@tsys.com
Is there a way to set the rule-flow group of a rule via the guvnor UI?
Thanks
GP
-----------------------------------------
The information contained in this communication (including any
attachments hereto) is confidential and is intended solely for the
personal and confidential use of the individual or entity to whom
it is addressed. If the reader of this message is not the intended
recipient or an agent responsible for delivering it to the intended
recipient, you are hereby notified that you have received this
communication in error and that any review, dissemination, copying,
or unauthorized use of this information, or the taking of any
action in reliance on the contents of this information is strictly
prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original
message. Thank you
15 years, 3 months
Unable to validate package configuration (eg, DSLs, models) for [package name]
by John Peterson
Hi,
We recently upgraded from Drools/Guvnor 5.0.1 to 5.1.1 (early December).
We had an existing package we had developed in 5.0.1 that we had not
done much with since the upgrade. This morning, we tried to open one of
the rules in that package and we get the following messages:
<<Picture (Device Independent Bitmap)>>
Unable to validate package configuration (eg, DSLs, models) for [package
name]. Suggestion completions may not operate correctly for graphical
editors for this package.
<<Picture (Device Independent Bitmap)>>
Unable to get content assistance for this rule.
<<Picture (Device Independent Bitmap)>>
Unable to get content assistance for this rule.
I've tried to re-upload the 3 jar files (I saw this post as a possible
solution: http://comments.gmane.org/gmane.comp.java.drools.user/23407),
but I get "Unable to upload the file". New packages seem to be okay
(e.g. packages created since the upgrade). Does anyone have any
thoughts on what's going on here?
Thanks.
15 years, 3 months
Upload an existing .drl for the Guvnor dynamically
by Vandewilly
Is there any api available that allows me to load an existing file drl for
the Guvnor repository. In my case, I can not upload through the web
interface, only in a dynamic way through a java class.
--
Vandewilly Oliveira
15 years, 3 months
StatefulKnowledgeSession.startProcess not thread-safe ?
by OptimusPrime
Hello,
I wrote a micro benchmark in order to test the performance of Drools Flow
5.1.0 in single and multi-threaded environments.
And I noticed that, when 2 threads call startProcess() at the same time
(Intel Core 2 Duo CPU), the returned process instance IDs are the same.
I checked the code and it seems there is no locking mechanism in the
org.drools.process.instance.impl.DefaultProcessInstanceManager class for the
id creation.
Is this a bug or am I missing something ?
Thanks
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/StatefulKnowledgeSess...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 3 months
Exception while loading session from JPA store
by jawa
Hi,
I've got a drools application running with EJB3 and JBoss 5.1. It works fine
but most of the times it throws exception while trying to load drools
session from JPA. My flow has got user tasks so it stops at places and get
stored in db using JPA. Then I try to load it by providing the session id
which does exist in database but it fails to load with following exception:
Caused by: Could not commit session
2010-12-21 00:47:16,453 ERROR [STDERR] (pool-37-thread-1)
java.lang.IllegalStateException: Wrong tx on thread: expected
TransactionImple < ac, BasicAction: a64360d:8184:4d0ff52a:18d status:
ActionStatus.ABOR
TED >, actual null
2010-12-21 00:47:16,453 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:157)
2010-12-21 00:47:16,453 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:421)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:85)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
2010-12-21 00:47:16,454 ERROR [STDERR] (pool-37-thread-1) at
$Proxy678.invoke(Unknown Source)
Does anyone know how to get around this issue?
Thanks
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Exception-while-loadi...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 3 months