Not able to deploy workbench
by stephan
Hello all
I would like to use the Drools workbench, so I downloaded
"kie-drools-wb-distribution-6.0.1.Final.zip".
The archive has two WAR-files in it - one for Tomcat, one for JBoss.
Unfortunately I'm not able to deploy the workbench, neither on Tomcat, nor
on JBoss.
My problem is a BindException
*Caused by: java.lang.RuntimeException: java.net.BindException: Address
already in use: bind
at
org.uberfire.java.nio.fs.jgit.daemon.ssh.GitSSHService.start(GitSSHService.java:82)
~[uberfire-nio2-jgit-0.3.1.Final.jar:0.3.1.Final]
*
I'm pretty sure this is because the Windows-Firewall of my local machine
doesn't let Tomcat open the port. Since I'm a "normal user" on my company-PC
I cannot change that.
My questions:
- What port does the service try to use? (It doesn't say)
- Why do I need this service anyway? I just want to edit rules, I do not
care about Git. (My Sysadmin will not be amused about opening ports
anyway... (security))
- Can I disable the GitSSHService?
Thank you very much in advance and best regards
Stephan
--
View this message in context: http://drools.46999.n3.nabble.com/Not-able-to-deploy-workbench-tp4028658....
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 10 months
Temporal rules in decision table
by JChrist
Hello everyone,
I was messing with drools v6.0.1.Final the past week and I have not been
able to completely understand how to integrate the rule engine to my
specification.
For the needs of my project, I want to regularly insert some data in the
engine, similar to the following:
class Level { double value;Calendar date; }
this class contains some values at specific time points (both in the past
and in the future).
I would like to be able create a decision table based on the "current" time
(plus or minus a variable offset) and the value of the closest Level to that
time point.
For example, assuming it is '2014-11-03 19:10:00' and the level objects in
the session currently are:
'1.0 2014-11-03 18:00:00' and '2.0 2014-11-03 19:00:00',
I would want a rule to say that if current level value is 2.0 then do some
stuff and it would make a match.
I would really appreciate any help on how to overcome this issue, as well as
any good examples/tutorials regarding this.
Kind regards.
--
View this message in context: http://drools.46999.n3.nabble.com/Temporal-rules-in-decision-table-tp4028...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 10 months
DSL: Unable to Expand Error - Even things that shouldn't be expanded.
by SrjTx
I've done a couple DSL/RDSLR rules in the past with success. Been trying to
create one today but get "Unable to expand" errors on validation on every
line, even with not substitutions.
What am i missing?
Here is a NON-DSL/RDRL file that works just fine.
5. | rule "AAA"
6. | dialect "mvel"
7. | when
8. | $sep : DroolsSepBean( )
9. | then
10. | System.out.println("HI");
11. | end
Here is a DSL/RDSLR file that generates the errors below (note this is the
same code as above and nothing should substitute) I even took out the $sep
assignment to make it more simple (it gives same errors if it's in there)
5. | rule "dsltest"
6. | dialect "mvel"
7. | when
8. | DroolsSepBean( )
9. | then
10. | System.out.println("HI");
11. | end
18:42:57,396 ERROR [org.drools.compiler.kie.builder.impl.AbstractKieModule]
(http-/127.0.0.1:8080-2) Unable to build KieBaseModel:defaultKieBase
[8] Unable to expand: DroolsSepBean( )
[10] Unable to expand: System.out.println("HI");
--
View this message in context: http://drools.46999.n3.nabble.com/DSL-Unable-to-Expand-Error-Even-things-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 10 months
Two Integration Servers sharing a single persisted session?
by dunnlow
I'm using Drools 5.5 with Hibernate 4 and Spring 3.1.
I am trying to implement the shared persisted session referenced
(http://www.plugtree.com/making-a-non-persistent-ha-knowledge-session/) but
I can not get it to work. I have two knowledge sessions (two instances of
the drools integration server) and I would like to share the same persisted
session (they both call JPAKnowledgeService.loadStatefulKnowledgeSession()
on the same session id).
The two integration servers (running in Tomcat) are of course deployed
(started) one after the other. They both successfully start and load the
existing knowledge session from the database
(JPAKnowledgeServer.loadStatefulKnowledgeSession) both instances print out
the objects that were stored in the persisted knowledge session.
The session that is started last continues to work fine, but the other
server throws the vague exception below with no other messages when I send a
command to it. If I restart the one that isn't working, that one comes up
and starts working and the other instance returns an Exception from then on.
Same basic issue when I create a new session
(JPAKnowledgeServer.newStatefulKnowledgeSession()).
With TRACE debugging, the only exception I am getting in the server logs is:
*org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper toResponse
WARNING: WebApplicationException has been caught : Could not commit
session or rollback*
With debug I see that Hibernate is identifying the dirty session, updating
optlock and trying to update the session (see below) but then rolling back
(I am not sure why the upodate to session is rolling back, but nothing in
the logs indicates the rollback even failed). I'm using local transactions
(transaction-type="RESOURCE_LOCAL").
I've tried configuring both
org.springframework.orm.hibernate4.HibernateTransactionManager as well as
org.springframework.orm.jpa.JpaTransactionManager (via spring XML config)
but get the same error with both.
First, is it correct that this /SHOULD/ be possible to do?
Secondly, before I post my full spring/hibernate configuration, does anyone
have any thoughts about what is causing this or ways to troubleshoot?
Thanks in advance for any thoughts,
-J
a summary of the rollback trace:
org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.enlistInCurrentTransaction(423)
- Starting resource local transaction on application-managed EntityManager
[org.hibernate.ejb.EntityManagerImpl@cas5ed94]
.
.
org.hibernate.SQL.logStatement(104) - update SessionInfo set
lastModificationDate=?, rulesByteArray=?, startDate=?, OPTLOCK=? where id=?
and OPTLOCK=?
org.hibernate.ejb.AbstractEntityManagerImpl.markAsRollback(1137) - Mark
transaction for rollback
org.hibernate.engine.transaction.spi.AbstractTransactionImpl.rollback(203) -
rolling back
org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doRollback(164)
- rolled JDBC Connection
.
.
.
--
View this message in context: http://drools.46999.n3.nabble.com/Two-Integration-Servers-sharing-a-singl...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 10 months
Re: [rules-users] sliding window problem
by grules
I think you have to follow the structure of accumulate function. Like
<result pattern> from accumulate( <source pattern>,
init( <init code> ),
action( <action code> ),
reverse( <reverse code> ), (optional)
result( <result expression> ) )
examples are:
when
$order : Order()
$total : Number( doubleValue > 100 )
from accumulate( OrderItem( order == $order, $value : value ),
init( double total = 0; ),
action( total += $value; ),
result( total ) )
then
# apply discount to $order
end
As I understand from your code,
1. Make List for Event class, because accumulate will loop through the elements of List<Event>
2. Init (write action codes, i.e. initialize value so you will find how many time it got looped)
3. Write code inside the block of action(//code here) and
4. Update it in result block i.e. result(//update here);
Being said, follow the structure 1) init, 2) action, 3) result as above..
From: Sandhya Sree [via Drools] [mailto:ml-node+s46999n4028639h52@n3.nabble.com]
Sent: Tuesday, March 11, 2014 1:51 PM
To: Gopu Shrestha
Subject: [rules-users] sliding window problem
i have a class called Event which has the following members { name, source, timestamp } with getters ,setters and constructor. i have a rule file which creates Event objects whenever a file is added / deleted in a particular folder. the rule file is as follows
rule "new file"
when
$p: RuleContext( $old : getOldContext().getContainedFiles(), $new :getNewContext().getContainedFiles())
RuleContext( $old != $new)
accumulate( $s : Object( this not memberOf $old ) from $new, $plus : collectList( $s ) )
events : Object() from $plus;
then
Event event = new Event("new file added",$p.getOldContext().getParent(),new Date());
end
rule " file deleted"
when
$p: RuleContext( $old : getOldContext().getContainedFiles(), $new:getNewContext().getContainedFiles())
RuleContext( $old != $new)
accumulate( $t : Object( this not memberOf $new ) from $old, $mins : collectList( $t ) )
events : Object() from $mins;
then
Event event = new Event("file deleted",$p.getOldContext().getParent(),new Date());
end
(do not confuse with RuleContext and other unknown identifiers.. they r just related with other classes in the project.. these two rules just works fine )..i need to use a sliding time window and create another event if the number of file additions are > 5 over the past 1 minute. my rule file is :
declare Event
@role( event )
end
rule "More than 5 additions"
when
Number(intValue > 5)
from accumulate( $tick : Event ( name == "new file added" ) over window:time( 1m ),
count( $tick ) ) )
then
System.out.println("too many additions");
end
i have enabled stream mode processing too.. but it doesnt seem to work. what could be the problem?
_______________________________________________
rules-users mailing list
[hidden email]</user/SendEmail.jtp?type=node&node=4028639&i=0>
https://lists.jboss.org/mailman/listinfo/rules-users
________________________________
If you reply to this email, your message will be added to the discussion below:
http://drools.46999.n3.nabble.com/rules-users-sliding-window-problem-tp40...
To start a new topic under Drools: User forum, email ml-node+s46999n47000h43(a)n3.nabble.com<mailto:ml-node+s46999n47000h43@n3.nabble.com>
To unsubscribe from Drools, click here<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscr...>.
NAML<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_vi...>
--
View this message in context: http://drools.46999.n3.nabble.com/RE-rules-users-sliding-window-problem-t...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 10 months
sliding window problem
by Sandhya Sree
i have a class called Event which has the following members { name, source,
timestamp } with getters ,setters and constructor. i have a rule file which
creates Event objects whenever a file is added / deleted in a particular
folder. the rule file is as follows
rule "new file"
when
$p: RuleContext( $old : getOldContext().getContainedFiles(), $new
:getNewContext().getContainedFiles())
RuleContext( $old != $new)
accumulate( $s : Object( this not memberOf $old ) from $new, $plus :
collectList( $s ) )
events : Object() from $plus;
then
Event event = new Event("new file
added",$p.getOldContext().getParent(),new Date());
end
rule " file deleted"
when
$p: RuleContext( $old : getOldContext().getContainedFiles(),
$new:getNewContext().getContainedFiles())
RuleContext( $old != $new)
accumulate( $t : Object( this not memberOf $new ) from $old, $mins :
collectList( $t ) )
events : Object() from $mins;
then
Event event = new Event("file
deleted",$p.getOldContext().getParent(),new Date());
end
(do not confuse with RuleContext and other unknown identifiers.. they r
just related with other classes in the project.. these two rules just works
fine )..i need to use a sliding time window and create another event if the
number of file additions are > 5 over the past 1 minute. my rule file is :
declare Event
@role( event )
end
rule "More than 5 additions"
when
Number(intValue > 5)
from accumulate( $tick : Event ( name == "new file added" ) over
window:time( 1m ),
count( $tick ) ) )
then
System.out.println("too many additions");
end
i have enabled stream mode processing too.. but it doesnt seem to work.
what could be the problem?
11 years, 10 months
Large data sets
by Raja Sekhar
Hi
Is it a good approach to apply rules on large data-sets ranging 100,000 to
50 million records Of course it depends upon the logic written in the rule
conditions and consequences.
--
Raja Sekhar Amirapu
------------------------------------------------------
"If any anyone can do it, i can do it. If no one else can do it, i must do
it"
11 years, 10 months