Re: [rules-users] how to check difference between two .pkg files

2013-09-09 Thread Zahid Ahmed
Hi,

It depends which version of Guvnor u r using. If its 5.x then, there are two 
ways to do this;

1. Use guvnor provided REST interface to get information related to packages.
2. Use JackRabbit API to directly access the repository as Guvnor 5.x uses 
JackRabbit as the assets repository.

Regards,
Zahid Ahmed

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of maunakea
Sent: 09 September 2013 20:38
To: rules-users@lists.jboss.org
Subject: [rules-users] how to check difference between two .pkg files

I have 2 .pkg files that are 2 snapshots for the same package from 2 different 
Guvnor instances. The 2 Guvnor instances are prod and test. I see that within 
Guvnor, it can show diff between 2 snapshots in its repository.
If Guvnor can do it, there must be some API that I can use outside in a 
standalone program to compare between .pkg file. Anybody knows how to do this?

thanks



--
View this message in context: 
http://drools.46999.n3.nabble.com/how-to-check-difference-between-two-pkg-files-tp4025877.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] how to check difference between two .pkg files

2013-09-09 Thread maunakea
I have 2 .pkg files that are 2 snapshots for the same package from 2
different Guvnor instances. The 2 Guvnor instances are prod and test. I see
that within Guvnor, it can show diff between 2 snapshots in its repository.
If Guvnor can do it, there must be some API that I can use outside in a
standalone program to compare between .pkg file. Anybody knows how to do
this?

thanks



--
View this message in context: 
http://drools.46999.n3.nabble.com/how-to-check-difference-between-two-pkg-files-tp4025877.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] How to the set"drools.dialect.mvel.strict"usingDrools+Spring?

2013-09-09 Thread srikanthmalli
Did you ever resolve the issue, I get the same error?



--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-How-to-the-set-drools-dialect-mvel-strict-using-Drools-Spring-tp3064468p4025878.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Dynamic ValueRangeProvider

2013-09-09 Thread Andrew Varner
Optaplanners,

I'm looking to add some dynamic goodness to ValueRangeProvider. The only way I 
see to specify a ValueRangeProvider is via annotation.

I'd like to be able to generate the id and Collection of candidate values 
dynamically. Is it possible to generate the ValueRangeProvider data outside of 
an annotation?

For example:

public class MyDataSource {
  public Collection getValues(String id) {
…
return values;
  }
} 

Thanks,
Drew
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] A Drools CEP Scenario - did I get it right?

2013-09-09 Thread Wolfgang Laun
1. A fact doesn't change until it *is* changed or the knowledge base
destined to operate it changes: so why should reasoning due to
the unchanged fact be repeated, with all consequential actions.

Continuing your line of thought would result in a hopeless muddle
if all consequences are re-executed each time fireAllRules is
called even where facts and rules haven't changed.

2. This works fine to adjust the pseudo-clock to the time of the next event,
about to be inserted in a "playback" run:

PseudoClockScheduler clock;

private void advance( Date eventDate ){
long currentTime = clock.getCurrentTime();
long eventTime = eventDate.getTime();
clock.advanceTime( eventTime - currentTime, TimeUnit.MILLISECONDS );
}

-W


On 09/09/2013, Alexander Wolf  wrote:
> The question is more or less where to begin.
>
> 1. If there is a Fact in working memory (e.g. "Person") and I invoke
> fireAllRules() twice, I would expect to have the following rule fire both
> times:
>
> rule "alwaysFire"
> when
>   $room : Room( )
> then
>   System.out.println("there is a room");
> end
>
> I would also expect this rule to fire every time I invoke fireAllRules()
>
> rule "alwaysFire2"
> when
> then
>   System.out.println("always!");
> end
>
> Both rules fire only once (the first time) even though the Working Memory is
> the same. (The room still exists...). I expected the rule to fire each time
> fireAllRules() is invoked and for the number of Rooms e.g. with 4 rooms ->
> 4x output "there is a room".
>
> 2. It seems to be impossible to set the pseudo clock to a specific time. How
> can I test CRON timer rules?!
>
>
>
> On 08.09.2013, at 18:51, Michael Anstis  wrote:
>
>> What did not happen as you expected?
>>
>> The HTTP session to Knowledge session association seems reasonable; but I
>> assume you are trying with a more simple configuration initially.
>>
>> Sent on the move
>>
>> On 8 Sep 2013 17:42, "amarok"  wrote:
>> I got the following scenario:
>> - I need a Web Service that reasons over received sensor events (1000+
>> per
>> day and client) in realtime and send messages if certain patterns occur.
>> - The web service has many clients (100-1000) but their events / facts do
>> not interfere (each client has his own state and events that change his
>> state).
>> - Each client also has his own rules (10-100) (but they are parameterized
>> generic rules - I thought maybe I could use rule templates or DSL to let
>> clients individualize their rules).
>> - Some rules are time dependant (e.g. if event (type=x) does not occour
>> at
>> least within half an hour after 8:00 a.m. (where 8 o'clock is a rule
>> parameter) -> send a message), others are accumulative (e.g. if number of
>> events within 5h is > 3).
>>
>>
>> I'd like to use drools CEP for this. I already read some documentation
>> and
>> tutorials but my first examples do not really work as I expected. Now I
>> fear
>> to have some general misconception about Drools/CEP. If someone could have
>> a
>> look over my ideas, I'd be very glad!
>>
>>
>> How I would do it:
>> -> Every client would have his own KnowledgeBase with his
>> (individualized)
>> rules. Rules would be stored in guvnor or on a mysql database as plain
>> text.
>> -> Every client would have his own KnowledgeBase /
>> StatefullKnowledgeSession
>> on the service, that knows about recent sensor events and some facts
>> about
>> the client. Events automatically are disposed of once they are not
>> relevant
>> anymore.
>> -> A static hashmap will hold references to the session for each client.
>> (clientID -> KnowledgeSession)
>> -> Sessions are created when a new client joins the system, but are
>> normally
>> not disposed unless the client completely leaves the system.
>> -> When a new Event is received (HTTP PUT), the session corresponding to
>> the
>> client would be retrieved from the HashMap and the new event would be
>> inserted via an event stream. Then (for every new event)
>> session.fireAllRules() would be called on the clients KnowledgeSession.
>>
>> -> The Knowledge Base would run in STREAM mode to be able to reason over
>> time windows and automatically expire (=delete?!) events. This would keep
>> memory usage in within bounds(?)
>> -> pseudo clock allows me to write tests or simulate the system with
>> records
>> of old events. (Is it possible to test timer, cron and sliding-window
>> rules
>> with pseudo clock? Can I explicitly set the time of the pseudo clock?)
>>
>> I appreciate your help!
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://drools.46999.n3.nabble.com/A-Drools-CEP-Scenario-did-I-get-it-right-tp4025863.html
>> Sent from the Drools: User forum mailing list archive at Nabble.com.
>> ___
>> rules-users mailing list
>> rules-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>> ___
>> rules-users mail

Re: [rules-users] A Drools CEP Scenario - did I get it right?

2013-09-09 Thread Alexander Wolf
The question is more or less where to begin. 

1. If there is a Fact in working memory (e.g. "Person") and I invoke 
fireAllRules() twice, I would expect to have the following rule fire both times:

rule "alwaysFire"
when
$room : Room( )
then
System.out.println("there is a room");
end

I would also expect this rule to fire every time I invoke fireAllRules()

rule "alwaysFire2"
when
then
System.out.println("always!");
end

Both rules fire only once (the first time) even though the Working Memory is 
the same. (The room still exists...). I expected the rule to fire each time 
fireAllRules() is invoked and for the number of Rooms e.g. with 4 rooms -> 4x 
output "there is a room".

2. It seems to be impossible to set the pseudo clock to a specific time. How 
can I test CRON timer rules?!



On 08.09.2013, at 18:51, Michael Anstis  wrote:

> What did not happen as you expected?
> 
> The HTTP session to Knowledge session association seems reasonable; but I 
> assume you are trying with a more simple configuration initially.
> 
> Sent on the move
> 
> On 8 Sep 2013 17:42, "amarok"  wrote:
> I got the following scenario:
> - I need a Web Service that reasons over received sensor events (1000+ per
> day and client) in realtime and send messages if certain patterns occur.
> - The web service has many clients (100-1000) but their events / facts do
> not interfere (each client has his own state and events that change his
> state).
> - Each client also has his own rules (10-100) (but they are parameterized
> generic rules - I thought maybe I could use rule templates or DSL to let
> clients individualize their rules).
> - Some rules are time dependant (e.g. if event (type=x) does not occour at
> least within half an hour after 8:00 a.m. (where 8 o'clock is a rule
> parameter) -> send a message), others are accumulative (e.g. if number of
> events within 5h is > 3).
> 
> 
> I'd like to use drools CEP for this. I already read some documentation and
> tutorials but my first examples do not really work as I expected. Now I fear
> to have some general misconception about Drools/CEP. If someone could have a
> look over my ideas, I'd be very glad!
> 
> 
> How I would do it:
> -> Every client would have his own KnowledgeBase with his (individualized)
> rules. Rules would be stored in guvnor or on a mysql database as plain text.
> -> Every client would have his own KnowledgeBase / StatefullKnowledgeSession
> on the service, that knows about recent sensor events and some facts about
> the client. Events automatically are disposed of once they are not relevant
> anymore.
> -> A static hashmap will hold references to the session for each client.
> (clientID -> KnowledgeSession)
> -> Sessions are created when a new client joins the system, but are normally
> not disposed unless the client completely leaves the system.
> -> When a new Event is received (HTTP PUT), the session corresponding to the
> client would be retrieved from the HashMap and the new event would be
> inserted via an event stream. Then (for every new event)
> session.fireAllRules() would be called on the clients KnowledgeSession.
> 
> -> The Knowledge Base would run in STREAM mode to be able to reason over
> time windows and automatically expire (=delete?!) events. This would keep
> memory usage in within bounds(?)
> -> pseudo clock allows me to write tests or simulate the system with records
> of old events. (Is it possible to test timer, cron and sliding-window rules
> with pseudo clock? Can I explicitly set the time of the pseudo clock?)
> 
> I appreciate your help!
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/A-Drools-CEP-Scenario-did-I-get-it-right-tp4025863.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Guvnor REST api, compile package

2013-09-09 Thread anchi
I could not figure out why compile is not working. I solved it by changing
Guvnor source - i removed 'is up to date' check.

Now I have one more concern, is there a REST method to delete snapshot?
Documentation mentions just snapshot creation.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-REST-api-compile-package-tp4025756p4025872.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users