Accumulate a on event combinations
by gboro54
We are using expert and fusion to monitor connection events in our system. We
would like to know the most efficient way to know that X number pair of
events have happened in a certain example(i.e eventA and eventB occurred 4
times each in the 5 seconds). What is the most efficient way to do this? I
don't believe an accumulate would allow a combination of objects but I may
be wrong. Perhaps a live query invoked by a rule?
--
View this message in context: http://drools.46999.n3.nabble.com/Accumulate-a-on-event-combinations-tp40...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
@expires
by gboro54
Based on testing expiring an event does no remove it from working memory.
What is the best way to manage working memory in the case that after a
period of X seconds you want the event removed? Would you simply write a
rule that would do a retract after a certain window i.e
rule "Closed Connection Occured"
when
$e:Event(connectionEventType == ConnectionEventType.CLOSE this after [20s]
this)
then
retract($e);
end
--
View this message in context: http://drools.46999.n3.nabble.com/expires-tp4020117.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
Error deploying Guvnor 5.4 on Weblogic 10.3.5
by droolist
I am trying to deploy Guvnor 5.4.0 Final on Weblogic Server 10.3.5.
Unzipped guvnor-5.4.0.Final-tomcat-6.0.war and tried to deploy the open
directory.
First, I was getting this error...
ClassNotFoundException: org.jboss.weld.environment.servlet.Listener
So, I got weld-1.1.8.Final and dropped weld-servlet.jar into WEB-INV/lib
After I put this jar, it deployed successfully.
But, when I try to access the page, I am getting this error...
Caused By: java.lang.IllegalStateException: CDI hasn't been properly
started.
Make sure your IDE classpath is in sync with the real maven classpath.
The classpath should include weld-servlet.
at
org.drools.guvnor.server.SecurityServiceServlet.getCurrentUser(SecurityServiceServlet.java:66)
Has anybody been successful in deploying Guvnor 5.4 on Weblogic 10.3.5?
thanks
--
View this message in context: http://drools.46999.n3.nabble.com/Error-deploying-Guvnor-5-4-on-Weblogic-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
droolsjbpm-build-bootstrap script is broken ?
by Cristiano Gavião
Hi,
I want to investigate why I couldn't build my system using the latest
snapshot of jbpm and drools..
So, I cloned the
git@github.com:droolsjbpm/droolsjbpm-build-bootstrap.git repository and
I'm following the readme.md file.
When I try $ droolsjbpm-build-bootstrap/script/git-clone-others.sh, I'm
getting a error:
===============================================================================
This directory already exists: droolsjbpm-build-bootstrap
===============================================================================
===============================================================================
Repository: droolsjbpm-knowledge
===============================================================================
Too many arguments.
usage: git clone [options] [--] <repo> [<dir>]
-v, --verbose be more verbose
-q, --quiet be more quiet
Am I missing something or the script is broken ?
regards,
Cristiano
12 years, 1 month
JtaTransactionManager couldn't find UserTransaction
by gkalabin
Hi everybody!
I'm using jBPM 5.3.0.Final, Drools 5.4.0.Final and JBoss 7.1.1.
I'm trying to run jbpm with human task service.
When I start processes without human tasks everything works fine. But when I
try to run process with human task I get the following exception (see full
error log in attachments):
Caused by: java.lang.NullPointerException
at
org.drools.persistence.jta.JtaTransactionManager.getStatus(JtaTransactionManager.java:205)
[drools-persistence-jpa-5.4.0.Final.jar:5.4.0.Final]
at
org.jbpm.task.service.persistence.TaskJTATransactionManager.getStatus(TaskJTATransactionManager.java:63)
[jbpm-human-task-core-5.3.0.Final.jar:5.3.0.Final]
at
org.jbpm.task.service.persistence.TaskJTATransactionManager.begin(TaskJTATransactionManager.java:36)
[jbpm-human-task-core-5.3.0.Final.jar:5.3.0.Final]
at
org.jbpm.task.service.persistence.TaskPersistenceManager.beginTransaction(TaskPersistenceManager.java:79)
[jbpm-human-task-core-5.3.0.Final.jar:5.3.0.Final]
at
org.jbpm.task.service.TaskServiceSession.doOperationInTransaction(TaskServiceSession.java:976)
[jbpm-human-task-core-5.3.0.Final.jar:5.3.0.Final]
... 28 more
I init HumanTaskService and jBPM in following way:
Environment JBPM_ENVIRONMENT = KnowledgeBaseFactory.newEnvironment();
JBPM_ENVIRONMENT.set(EnvironmentName.ENTITY_MANAGER_FACTORY,
Persistence.createEntityManagerFactory("org.jbpm.persistence.jpa"));
JBPM_ENVIRONMENT.set(EnvironmentName.TRANSACTION_MANAGER,
TransactionManagerServices.getTransactionManager());
JBPM_ENVIRONMENT.set(EnvironmentName.GLOBALS, new MapGlobalResolver());
Properties properties = new Properties();
properties.put("drools.processInstanceManagerFactory",
"org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory");
properties.put("drools.processSignalManagerFactory",
"org.jbpm.persistence.processinstance.JPASignalManagerFactory");
KnowledgeSessionConfiguration JBPM_CONFIG =
KnowledgeBaseFactory.newKnowledgeSessionConfiguration(properties);
EntityManagerFactory emf =
Persistence.createEntityManagerFactory("org.jbpm.task");
TaskService taskService = new TaskService(emf,
SystemEventListenerFactory.getSystemEventListener());
MinaTaskServer taskServer = new MinaTaskServer(taskService);
// start the server
Thread thread = new Thread(taskServer);
thread.start();
TaskClient taskClient = new TaskClient(new
MinaTaskClientConnector("myHtsClient",
new
MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
if (!taskClient.connect(TASK_CLIENT_SERVER_ADDRESS,
TASK_CLIENT_SERVER_PORT)) {
logger.error("Could not connect task client");
}
StatefulKnowledgeSession session =
JPAKnowledgeService.newStatefulKnowledgeSession(readKnowledgeBase(),
JBPM_CONFIG, JBPM_ENVIRONMENT);
session.getWorkItemManager().registerWorkItemHandler("Human Task", new
MinaHTWorkItemHandler(session));
I had an experiment: before a process start and after it I looked up the
UserTransaction:
try {
logger.info("found: " + new
InitialContext().lookup("java:comp/UserTransaction"));
} catch (NamingException e) {
logger.info("not found", e);
}
// start process code
try {
logger.info("found: " + new
InitialContext().lookup("java:comp/UserTransaction"));
} catch (NamingException ex) {
logger.info("not found", ex);
}
The name java:comp/UserTransaction I took from
org.drools.persistence.jta.JtaTransactionManager which falls with NPE.
It still falls and in my log:
found: org.jboss.tm.usertx.client.ServerVMClientUserTransaction@1033fb5
com.example.my.jbpm.rest.ProcessManagementResources http--127.0.0.1-8080-2
No UserTransaction found at JNDI location [java:comp/UserTransaction]
org.drools.persistence.jta.JtaTransactionManager NioProcessor-2
found: org.jboss.tm.usertx.client.ServerVMClientUserTransaction@1033fb5
com.example.my.jbpm.rest.ProcessManagementResources http--127.0.0.1-8080-2
--
View this message in context: http://drools.46999.n3.nabble.com/JtaTransactionManager-couldn-t-find-Use...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
Usage of global variables in decision table
by Mahadevappa, Shobha
Hi,
I have a scenario where I have to write a rule in decision table to find if a particular string is present in a collection of objects.
I was thinking of placing this collection as a GLOBAL variable and execute the contains method on this collection for the string that is passed.
I am not very clear as to how to realize this in a Decision table.
Any inputs towards this is greatly appreciated.
Regards,
Shobha M
______________________________________________________________________
Disclaimer:This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding
12 years, 1 month
Checking Template Columns matching with Excel columns
by himansu.nayak
Hi,
I am using drools template and spredsheet in my application.
my generic rules are maintain in template and rules data are maintained in
spreadsheet.
Currently i am declaring the columns name in my template file for using the
field of excel.
ex:
Inside template (drt)
template header
rulesName
Application
Admission
Permission
.
.
.
.
inside excel
rule(col 1), application(col2),admission(col3), permission(col4), . . . . .
i want to make sure the excel col name has to match with exact name inside
template. currently drools checks the order of the col declared in template
with excel columns but not the actual name with the excel columns.
Any possibility by which i can force drools to match the exact col name with
the col name defined inside template file?
Thanks...
-----
Thanks...
Himansu
--
View this message in context: http://drools.46999.n3.nabble.com/Checking-Template-Columns-matching-with...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
Deploy Drools in AS7 as OSGi bundles
by Dan Seaver
I'd like to use Drools as OSGi services in the JBoss Adaptive Server (version
7.1.1).
I haven't found any specifics about how to do this in the drools
documentation (or anywhere else with my google searches), so I'm attempting
to deploy the jars mentioned in the droolsjbpm-integration-docs via the
JBoss Management console. The jars are:
knowledge-api
drools-core
drools-compiler
drools-templates
drools-decisiontables
All of the jars install ok, but when I try to enable them (start the
bundles), I run into problems.
knowledge-api seems to start fine.
However, the other bundles have dependencies on drools-core.
When I try to enable drools-core, I get exceptions claiming the required
bundle, org.drools.internalapi, is missing. So, I added the following
bundle:
knowledge-internal-api.jar
Now I get the exception that package com.google.protobuf is missing.
*Any guidance on how to install drools in AS7 as OSGi services would be
greatly appreciated!*
Stack trace snippet from JBoss console when trying to deploy drools-core:
12:45:43,783 ERROR [org.jboss.osgi.framework.internal.FrameworkEventsPlugin]
(MSC service thread 1-2) Framework ERROR:
org.osgi.framework.BundleException: Cannot resolve bundle resModule:
[org.drools.core:5.4.0.Final]
at
org.jboss.osgi.framework.internal.ResolverPlugin.resolve(ResolverPlugin.java:157)
[jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]
at
org.jboss.osgi.framework.internal.AbstractBundleState.ensureResolved(AbstractBundleState.java:551)
[jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]
at
org.jboss.osgi.framework.internal.HostBundleState.startInternal(HostBundleState.java:211)
[jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]
at
org.jboss.osgi.framework.internal.AbstractBundleState.start(AbstractBundleState.java:494)
[jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]
at
org.jboss.as.osgi.deployment.BundleStartTracker$1.processService(BundleStartTracker.java:144)
[jboss-as-osgi-service-7.1.1.Final.jar:7.1.1.Final]
at
org.jboss.as.osgi.deployment.BundleStartTracker$1.transition(BundleStartTracker.java:119)
[jboss-as-osgi-service-7.1.1.Final.jar:7.1.1.Final]
at
org.jboss.msc.service.ServiceControllerImpl.invokeListener(ServiceControllerImpl.java:1416)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at
org.jboss.msc.service.ServiceControllerImpl.access$2700(ServiceControllerImpl.java:49)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at
org.jboss.msc.service.ServiceControllerImpl$ListenerTask.run(ServiceControllerImpl.java:1954)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[rt.jar:1.6.0_26]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[rt.jar:1.6.0_26]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_26]
Caused by: org.jboss.osgi.resolver.XResolverException: Unable to resolve
Module[org.drools.core:5.4.0.Final]: missing requirement
[Module[org.drools.core:5.4.0.Final]] package; (package=com.google.protobuf)
at
org.jboss.osgi.resolver.felix.FelixResolver.resolveInternal(FelixResolver.java:117)
[jbosgi-resolver-felix-1.0.13.Final.jar:1.0.13.Final]
at
org.jboss.osgi.resolver.spi.AbstractResolver.resolve(AbstractResolver.java:149)
[jbosgi-resolver-spi-1.0.13.Final.jar:1.0.13.Final]
at
org.jboss.osgi.framework.internal.ResolverPlugin.resolve(ResolverPlugin.java:155)
[jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]
... 11 more
--
View this message in context: http://drools.46999.n3.nabble.com/Deploy-Drools-in-AS7-as-OSGi-bundles-tp...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
No viable alternative at input since upgrade to 5.4.0.Final
by tekbrain
Hi,
We have rules in domain specific language that don't work anymore.
In our dsl mapping definition:
Language expression: COUNT\({attr:[A-Z][A-Z_\d]+}\)
{constraint:(>|>\=|<|<\=|\=\=|!\=)} {num:[\d\.]+}
Rule mapping: ArrayList( size {constraint} {num} ) from collect (Fact( name
== "{attr}", dataset == "0", ignore == "false" ))
Scope: condition (when)
[condition][]COUNT\({attr:[A-Z][A-Z_\d]+}\)
{constraint:(>|>\=|<|<\=|\=\=|!\=)} {num:[\d\.]+}=ArrayList( size
{constraint} {num} ) from collect (Fact( name == "{attr}", dataset == 0,
ignore == false ))
One of the rules:
rule 'BP - HOMULTIPLE'
agenda-group "user-rules"
no-loop true
when
COUNT(BP_HOCONDITION) >= 2
then
set BP_HOMULTIPLE
end
Expanded rule should be something like this:
rule 'BP - HOMULTIPLE'
agenda-group "user-rules"
no-loop true
when
ArrayList(size >= 2) from collect (Fact( name == "BP_HOCONDITION",
dataset == "0", ignore == "false" ))
then
insertLogical(new StateFact("BP_HOMULTIPLE"));
end
Everything was working with Drools 5.1 but with Drools 5.4.0.Final, we have
this kind of errors:
[3788,20]: [ERR 101] Line 3788:20 no viable alternative at input '>=' in
rule "BP - HOMULTIPLE"
Did we forget something?
Thanks,
Jean-Luc
--
View this message in context: http://drools.46999.n3.nabble.com/No-viable-alternative-at-input-since-up...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month