Re: [rules-users] Using GUVNOR for FUSION RULES

2012-04-27 Thread Pellecchia Carolina

Hi Mike,

I’m a colleague of Matteo Cusmai, we would like to thank you for your 
suggestions. you have been very helpful.

Following your steps, I couldn't understand a point: how can I bind a field(for 
ex. RadiationObservation.location)  to a variable?
specifically,

$obs : RadiationObservation(?$obsLocation : location? ) over 
window:length (1) from entry-point lowLevelSensorStream


Best regards,
Carolina Pellecchia

Da: rules-users-boun...@lists.jboss.org [rules-users-boun...@lists.jboss.org] 
per conto di rules-users-requ...@lists.jboss.org 
[rules-users-requ...@lists.jboss.org]
Inviato: giovedì 26 aprile 2012 19.07
A: rules-users@lists.jboss.org
Oggetto: rules-users Digest, Vol 65, Issue 93

Send rules-users mailing list submissions to
rules-users@lists.jboss.org

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-requ...@lists.jboss.org

You can reach the person managing the list at
rules-users-ow...@lists.jboss.org

When replying, please edit your Subject line so it is more specific
than Re: Contents of rules-users digest...


Today's Topics:

   1. Re: Setting variables in a stateless session (Welsh, Armand)
   2. Re: Using GUVNOR for FUSION RULES (Michael Anstis)
   3. Re: Guvnor guided editor and non argument constructor
  (Michael Anstis)
   4. looking for advice (Bobby Richards)
   5. Re: Guvnor guided editor and non argument constructor
  (Vincent LEGENDRE)
   6. Re: Guvnor guided editor and non argument constructor (Sean Su)


--

Message: 1
Date: Thu, 26 Apr 2012 15:57:11 +
From: Welsh, Armand awe...@statestreet.com
Subject: Re: [rules-users] Setting variables in a stateless session
To: rules-users@lists.jboss.org rules-users@lists.jboss.org
Message-ID:
d52de19b4c463c4ba21f81790b9f079543084...@gdcpw3376.corp.statestr.com
Content-Type: text/plain; charset=us-ascii

Think of a stateless knowledge session as being a statefull knowledge session, 
with the following adjustments:
A stateless knowledge session cannot be manipulated prior the start of the 
session.
A stateless knowledge session cannot be manipulated or queried after the end of 
the session.
A stateless session begins when you execute the fireallrules method.
A stateless session ends when the rule processing terminates.  -- There is no 
pause, there is no restarting.  The instant the rules stop firing, and return 
to your calling code, the knowledge session has been torn down.



-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of bardelman
Sent: Thursday, April 26, 2012 2:06 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] Setting variables in a stateless session

hi folks, this is a simple question ,
i just want to understand how is it possible that a stateless session have a
setGlobal() method as it does not maintain a state. What's the point ?!
i  also have some confusion between a request scope and a stateless
session scope i think it s the same..


--
View this message in context: 
http://drools.46999.n3.nabble.com/Setting-variables-in-a-stateless-session-tp3940652p3940652.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



--

Message: 2
Date: Thu, 26 Apr 2012 15:52:09 +0100
From: Michael Anstis michael.ans...@gmail.com
Subject: Re: [rules-users] Using GUVNOR for FUSION RULES
To: Rules Users List rules-users@lists.jboss.org
Message-ID:
CAAG9P0tN=HqTJ9hkJHDiQGBk=_10o4f810-bqbhbtfwuto-...@mail.gmail.com
Content-Type: text/plain; charset=iso-8859-1

Sure.

   - Create New Rule


   - Add a condition (green + near WHEN)


   - Select From Entry Point


   - Type lowLevelSensorStream into TextBox


   - Click on click to add patterns...


   - Select your Fact Type (see * below)


   - In Over sliding window ListBox select Length


   - Type 1 into the TextBox next to Length.

* OK, so this is possibly where you're having problems.

In order for a Fact Type to be used with CEP it needs to be annotated as an
Event. This is how this can be accomplished:-

*If you have a Declarative Model
*

   - Open the Declarative Model


   - Select the Fact Type that should be an Event


   - Add an Annotation, name=role, key=value, value=event


   - Save


*If you have a POJO Model*

   - Create a new Declarative Model


   - Add a Fact Type that matches the name of that in your JAR


   - Add an Annotation, name=role, key=value, value=event


   - Save


Annotating your POJO is covered in the Drools Expert User Guide. You are
just using Guvnor

Re: [rules-users] Using GUVNOR for FUSION RULES

2012-04-27 Thread Michael Anstis
Glad to be of assistance.

To bind a field, once the field has been added to the Fact type simply
click on the field name.

With kind regards,

Mike

On 27 April 2012 08:31, Pellecchia Carolina c.pellecc...@vitrociset.itwrote:


 Hi Mike,

 I’m a colleague of Matteo Cusmai, we would like to thank you for your
 suggestions. you have been very helpful.

 Following your steps, I couldn't understand a point: how can I bind a
 field(for ex. RadiationObservation.location)  to a variable?
 specifically,

$obs : RadiationObservation(?$obsLocation : location? ) over
 window:length (1) from entry-point lowLevelSensorStream


 Best regards,
 Carolina Pellecchia
 
 Da: rules-users-boun...@lists.jboss.org [
 rules-users-boun...@lists.jboss.org] per conto di
 rules-users-requ...@lists.jboss.org [rules-users-requ...@lists.jboss.org]
 Inviato: giovedì 26 aprile 2012 19.07
 A: rules-users@lists.jboss.org
 Oggetto: rules-users Digest, Vol 65, Issue 93

 Send rules-users mailing list submissions to
rules-users@lists.jboss.org

 To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
 or, via email, send a message with subject or body 'help' to
rules-users-requ...@lists.jboss.org

 You can reach the person managing the list at
rules-users-ow...@lists.jboss.org

 When replying, please edit your Subject line so it is more specific
 than Re: Contents of rules-users digest...


 Today's Topics:

   1. Re: Setting variables in a stateless session (Welsh, Armand)
   2. Re: Using GUVNOR for FUSION RULES (Michael Anstis)
   3. Re: Guvnor guided editor and non argument constructor
  (Michael Anstis)
   4. looking for advice (Bobby Richards)
   5. Re: Guvnor guided editor and non argument constructor
  (Vincent LEGENDRE)
   6. Re: Guvnor guided editor and non argument constructor (Sean Su)


 --

 Message: 1
 Date: Thu, 26 Apr 2012 15:57:11 +
 From: Welsh, Armand awe...@statestreet.com
 Subject: Re: [rules-users] Setting variables in a stateless session
 To: rules-users@lists.jboss.org rules-users@lists.jboss.org
 Message-ID:

 d52de19b4c463c4ba21f81790b9f079543084...@gdcpw3376.corp.statestr.com
 Content-Type: text/plain; charset=us-ascii

 Think of a stateless knowledge session as being a statefull knowledge
 session, with the following adjustments:
 A stateless knowledge session cannot be manipulated prior the start of the
 session.
 A stateless knowledge session cannot be manipulated or queried after the
 end of the session.
 A stateless session begins when you execute the fireallrules method.
 A stateless session ends when the rule processing terminates.  -- There is
 no pause, there is no restarting.  The instant the rules stop firing, and
 return to your calling code, the knowledge session has been torn down.



 -Original Message-
 From: rules-users-boun...@lists.jboss.org [mailto:
 rules-users-boun...@lists.jboss.org] On Behalf Of bardelman
 Sent: Thursday, April 26, 2012 2:06 AM
 To: rules-users@lists.jboss.org
 Subject: [rules-users] Setting variables in a stateless session

 hi folks, this is a simple question ,
 i just want to understand how is it possible that a stateless session have
 a
 setGlobal() method as it does not maintain a state. What's the point ?!
 i  also have some confusion between a request scope and a stateless
 session scope i think it s the same..


 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Setting-variables-in-a-stateless-session-tp3940652p3940652.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



 --

 Message: 2
 Date: Thu, 26 Apr 2012 15:52:09 +0100
 From: Michael Anstis michael.ans...@gmail.com
 Subject: Re: [rules-users] Using GUVNOR for FUSION RULES
 To: Rules Users List rules-users@lists.jboss.org
 Message-ID:
CAAG9P0tN=HqTJ9hkJHDiQGBk=_10o4f810-bqbhbtfwuto-...@mail.gmail.com
 
 Content-Type: text/plain; charset=iso-8859-1

 Sure.

   - Create New Rule


   - Add a condition (green + near WHEN)


   - Select From Entry Point


   - Type lowLevelSensorStream into TextBox


   - Click on click to add patterns...


   - Select your Fact Type (see * below)


   - In Over sliding window ListBox select Length


   - Type 1 into the TextBox next to Length.

 * OK, so this is possibly where you're having problems.

 In order for a Fact Type to be used with CEP it needs to be annotated as an
 Event. This is how this can be accomplished:-

 *If you have a Declarative Model
 *

   - Open the Declarative Model


   - Select the Fact Type that should be an Event


   - Add an Annotation, name=role, key=value, value=event


   - Save

Re: [rules-users] Using GUVNOR for FUSION RULES

2012-04-27 Thread Pellecchia Carolina

Hi Mike,

I couldn't bind a field because the click on the field doesn't work.
concretely, please see attached.

 
Thank you in advance,
Carolina Pellecchia



-- Forwarded message --
From: Michael Anstis michael.ans...@gmail.commailto:michael.ans...@gmail.com
Date: Fri, Apr 27, 2012 at 11:26 AM
Subject: Re: [rules-users] Using GUVNOR for FUSION RULES
To: Rules Users List 
rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org


Glad to be of assistance.

To bind a field, once the field has been added to the Fact type simply click on 
the field name.

With kind regards,

Mike


On 27 April 2012 08:31, Pellecchia Carolina 
c.pellecc...@vitrociset.itmailto:c.pellecc...@vitrociset.it wrote:

Hi Mike,

I’m a colleague of Matteo Cusmai, we would like to thank you for your 
suggestions. you have been very helpful.

Following your steps, I couldn't understand a point: how can I bind a field(for 
ex. RadiationObservation.location)  to a variable?
specifically,

   $obs : RadiationObservation(?$obsLocation : location? ) over 
window:length (1) from entry-point lowLevelSensorStream


Best regards,
Carolina Pellecchia

Da: 
rules-users-boun...@lists.jboss.orgmailto:rules-users-boun...@lists.jboss.org 
[rules-users-boun...@lists.jboss.orgmailto:rules-users-boun...@lists.jboss.org]
 per conto di 
rules-users-requ...@lists.jboss.orgmailto:rules-users-requ...@lists.jboss.org 
[rules-users-requ...@lists.jboss.orgmailto:rules-users-requ...@lists.jboss.org]
Inviato: giovedì 26 aprile 2012 19.07
A: rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org
Oggetto: rules-users Digest, Vol 65, Issue 93

Send rules-users mailing list submissions to
   rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org

To subscribe or unsubscribe via the World Wide Web, visit
   https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
   
rules-users-requ...@lists.jboss.orgmailto:rules-users-requ...@lists.jboss.org

You can reach the person managing the list at
   
rules-users-ow...@lists.jboss.orgmailto:rules-users-ow...@lists.jboss.org

When replying, please edit your Subject line so it is more specific
than Re: Contents of rules-users digest...


Today's Topics:

  1. Re: Setting variables in a stateless session (Welsh, Armand)
  2. Re: Using GUVNOR for FUSION RULES (Michael Anstis)
  3. Re: Guvnor guided editor and non argument constructor
 (Michael Anstis)
  4. looking for advice (Bobby Richards)
  5. Re: Guvnor guided editor and non argument constructor
 (Vincent LEGENDRE)
  6. Re: Guvnor guided editor and non argument constructor (Sean Su)


--

Message: 1
Date: Thu, 26 Apr 2012 15:57:11 +
From: Welsh, Armand awe...@statestreet.com
Subject: Re: [rules-users] Setting variables in a stateless session
To: rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org 
rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org
Message-ID:
   
d52de19b4c463c4ba21f81790b9f079543084...@gdcpw3376.corp.statestr.commailto:d52de19b4c463c4ba21f81790b9f079543084...@gdcpw3376.corp.statestr.com
Content-Type: text/plain; charset=us-ascii

Think of a stateless knowledge session as being a statefull knowledge session, 
with the following adjustments:
A stateless knowledge session cannot be manipulated prior the start of the 
session.
A stateless knowledge session cannot be manipulated or queried after the end of 
the session.
A stateless session begins when you execute the fireallrules method.
A stateless session ends when the rule processing terminates.  -- There is no 
pause, there is no restarting.  The instant the rules stop firing, and return 
to your calling code, the knowledge session has been torn down.



-Original Message-
From: 
rules-users-boun...@lists.jboss.orgmailto:rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.orgmailto:rules-users-boun...@lists.jboss.org]
 On Behalf Of bardelman
Sent: Thursday, April 26, 2012 2:06 AM
To: rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org
Subject: [rules-users] Setting variables in a stateless session

hi folks, this is a simple question ,
i just want to understand how is it possible that a stateless session have a
setGlobal() method as it does not maintain a state. What's the point ?!
i  also have some confusion between a request scope and a stateless
session scope i think it s the same..


--
View this message in context: 
http://drools.46999.n3.nabble.com/Setting-variables-in-a-stateless-session-tp3940652p3940652.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--

Message: 2

Re: [rules-users] Using GUVNOR for FUSION RULES

2012-04-27 Thread Michael Anstis
What version of Guvnor are you using?

I attach a screenshot produced using 5.4.0.CR1.

I also note your screenshot shows All ACObeservation where as mine There
is a TelephoneCall

Can you describe the steps you have taken, or supply a repository export?

On 27 April 2012 12:12, Pellecchia Carolina c.pellecc...@vitrociset.itwrote:


 Hi Mike,

 I couldn't bind a field because the click on the field doesn't work.
 concretely, please see attached.


 Thank you in advance,
 Carolina Pellecchia



 -- Forwarded message --
 From: Michael Anstis michael.ans...@gmail.commailto:
 michael.ans...@gmail.com
 Date: Fri, Apr 27, 2012 at 11:26 AM
 Subject: Re: [rules-users] Using GUVNOR for FUSION RULES
 To: Rules Users List rules-users@lists.jboss.orgmailto:
 rules-users@lists.jboss.org


 Glad to be of assistance.

 To bind a field, once the field has been added to the Fact type simply
 click on the field name.

 With kind regards,

 Mike


 On 27 April 2012 08:31, Pellecchia Carolina c.pellecc...@vitrociset.it
 mailto:c.pellecc...@vitrociset.it wrote:

 Hi Mike,

 I’m a colleague of Matteo Cusmai, we would like to thank you for your
 suggestions. you have been very helpful.

 Following your steps, I couldn't understand a point: how can I bind a
 field(for ex. RadiationObservation.location)  to a variable?
 specifically,

   $obs : RadiationObservation(?$obsLocation : location? ) over
 window:length (1) from entry-point lowLevelSensorStream


 Best regards,
 Carolina Pellecchia
 
 Da: rules-users-boun...@lists.jboss.orgmailto:
 rules-users-boun...@lists.jboss.org [rules-users-boun...@lists.jboss.org
 mailto:rules-users-boun...@lists.jboss.org] per conto di
 rules-users-requ...@lists.jboss.orgmailto:
 rules-users-requ...@lists.jboss.org [rules-users-requ...@lists.jboss.org
 mailto:rules-users-requ...@lists.jboss.org]
 Inviato: giovedì 26 aprile 2012 19.07
 A: rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org
 Oggetto: rules-users Digest, Vol 65, Issue 93

 Send rules-users mailing list submissions to
rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org

 To subscribe or unsubscribe via the World Wide Web, visit
   https://lists.jboss.org/mailman/listinfo/rules-users
 or, via email, send a message with subject or body 'help' to
rules-users-requ...@lists.jboss.orgmailto:
 rules-users-requ...@lists.jboss.org

 You can reach the person managing the list at
rules-users-ow...@lists.jboss.orgmailto:
 rules-users-ow...@lists.jboss.org

 When replying, please edit your Subject line so it is more specific
 than Re: Contents of rules-users digest...


 Today's Topics:

  1. Re: Setting variables in a stateless session (Welsh, Armand)
  2. Re: Using GUVNOR for FUSION RULES (Michael Anstis)
  3. Re: Guvnor guided editor and non argument constructor
 (Michael Anstis)
  4. looking for advice (Bobby Richards)
  5. Re: Guvnor guided editor and non argument constructor
 (Vincent LEGENDRE)
  6. Re: Guvnor guided editor and non argument constructor (Sean Su)


 --

 Message: 1
 Date: Thu, 26 Apr 2012 15:57:11 +
 From: Welsh, Armand awe...@statestreet.com
 Subject: Re: [rules-users] Setting variables in a stateless session
 To: rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org 
 rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org
 Message-ID:
   
 d52de19b4c463c4ba21f81790b9f079543084...@gdcpw3376.corp.statestr.com
 mailto:
 d52de19b4c463c4ba21f81790b9f079543084...@gdcpw3376.corp.statestr.com
 Content-Type: text/plain; charset=us-ascii

 Think of a stateless knowledge session as being a statefull knowledge
 session, with the following adjustments:
 A stateless knowledge session cannot be manipulated prior the start of the
 session.
 A stateless knowledge session cannot be manipulated or queried after the
 end of the session.
 A stateless session begins when you execute the fireallrules method.
 A stateless session ends when the rule processing terminates.  -- There is
 no pause, there is no restarting.  The instant the rules stop firing, and
 return to your calling code, the knowledge session has been torn down.



 -Original Message-
 From: rules-users-boun...@lists.jboss.orgmailto:
 rules-users-boun...@lists.jboss.org [mailto:
 rules-users-boun...@lists.jboss.orgmailto:
 rules-users-boun...@lists.jboss.org] On Behalf Of bardelman
 Sent: Thursday, April 26, 2012 2:06 AM
 To: rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org
 Subject: [rules-users] Setting variables in a stateless session

 hi folks, this is a simple question ,
 i just want to understand how is it possible that a stateless session have
 a
 setGlobal() method as it does not maintain a state. What's the point ?!
 i  also have some confusion between a request scope and a stateless
 session scope i think it s the same..


 --
 View this message

[rules-users] Using GUVNOR for FUSION RULES

2012-04-26 Thread Matteo Cusmai
Hi all,
i am novice on GUVNOR, but i would like to define my fusion rules by
graphical tool.

An example of my rules is:

rule radiation-event
salience 10
no-loop
when
$obs: RadiationObservation( $obsLocation : location, value  10
) over window:length(1) from entry-point lowLevelSensorStream
not RadiationEvent( this meets[ 25s ] $obs, location
geoIsWithinDistance[ 5m ] $obsLocation )
then
insert(new RadiationEvent( $obs, Radiation over 10,
Event.THREAT_HIGH, $obsLocation, $obs.getSensor() ));
end

rule radiation-update
salience 5
no-loop
when
$obs: RadiationObservation( $obsLocation : location, value  10
) over window:length(1) from entry-point lowLevelSensorStream
$event : RadiationEvent( this meets[ 25s ] $obs, location
geoIsWithinDistance[ 5m ] $obsLocation )
then
Event e = Event.clone($event);
e.addObservation($obs);
insert( e );
retract($event);
retract($obs);
end

Is it possibile to define rules such the above using GUVNOR?
Are there some documentation or tutorial?

Thanks a lot in advance,
Matteo Cusmai.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Using GUVNOR for FUSION RULES

2012-04-26 Thread Michael Anstis
Yes this is possible with Guvnor 5.2 onwards.

The user-guide explains how to use the Guided Rule Editor (but not
specifically CEP features).

Read that and give it a try - it's reasonably intuitive (not an excuse for
poor documentation though) and come back here with questions.

With kind regards,

Mike

On 26 April 2012 09:08, Matteo Cusmai cusmaimat...@gmail.com wrote:

 Hi all,
 i am novice on GUVNOR, but i would like to define my fusion rules by
 graphical tool.

 An example of my rules is:

 rule radiation-event
 salience 10
 no-loop
 when
 $obs: RadiationObservation( $obsLocation : location, value 
 10 ) over window:length(1) from entry-point lowLevelSensorStream
 not RadiationEvent( this meets[ 25s ] $obs, location
 geoIsWithinDistance[ 5m ] $obsLocation )
 then
 insert(new RadiationEvent( $obs, Radiation over 10,
 Event.THREAT_HIGH, $obsLocation, $obs.getSensor() ));
 end

 rule radiation-update
 salience 5
 no-loop
 when
 $obs: RadiationObservation( $obsLocation : location, value 
 10 ) over window:length(1) from entry-point lowLevelSensorStream
 $event : RadiationEvent( this meets[ 25s ] $obs, location
 geoIsWithinDistance[ 5m ] $obsLocation )
 then
 Event e = Event.clone($event);
 e.addObservation($obs);
 insert( e );
 retract($event);
 retract($obs);
 end

 Is it possibile to define rules such the above using GUVNOR?
 Are there some documentation or tutorial?

 Thanks a lot in advance,
 Matteo Cusmai.

 ___
 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] Using GUVNOR for FUSION RULES

2012-04-26 Thread Matteo Cusmai
Hi Mike,
thanks for suggestion, but i have already read documentation.

First of all, i cannot define over window:length(1) from entry-point
lowLevelSensorStream.
Do you help me to do this?

Best Regards,
Matteo.


On Thu, Apr 26, 2012 at 11:32 AM, Michael Anstis
michael.ans...@gmail.comwrote:

 Yes this is possible with Guvnor 5.2 onwards.

 The user-guide explains how to use the Guided Rule Editor (but not
 specifically CEP features).

 Read that and give it a try - it's reasonably intuitive (not an excuse for
 poor documentation though) and come back here with questions.

 With kind regards,

 Mike

 On 26 April 2012 09:08, Matteo Cusmai cusmaimat...@gmail.com wrote:

 Hi all,
 i am novice on GUVNOR, but i would like to define my fusion rules by
 graphical tool.

 An example of my rules is:

 rule radiation-event
 salience 10
 no-loop
 when
 $obs: RadiationObservation( $obsLocation : location, value 
 10 ) over window:length(1) from entry-point lowLevelSensorStream
 not RadiationEvent( this meets[ 25s ] $obs, location
 geoIsWithinDistance[ 5m ] $obsLocation )
 then
 insert(new RadiationEvent( $obs, Radiation over 10,
 Event.THREAT_HIGH, $obsLocation, $obs.getSensor() ));
 end

 rule radiation-update
 salience 5
 no-loop
 when
 $obs: RadiationObservation( $obsLocation : location, value 
 10 ) over window:length(1) from entry-point lowLevelSensorStream
 $event : RadiationEvent( this meets[ 25s ] $obs, location
 geoIsWithinDistance[ 5m ] $obsLocation )
 then
 Event e = Event.clone($event);
 e.addObservation($obs);
 insert( e );
 retract($event);
 retract($obs);
 end

 Is it possibile to define rules such the above using GUVNOR?
 Are there some documentation or tutorial?

 Thanks a lot in advance,
 Matteo Cusmai.

 ___
 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] Using GUVNOR for FUSION RULES

2012-04-26 Thread Michael Anstis
Sure.

   - Create New Rule


   - Add a condition (green + near WHEN)


   - Select From Entry Point


   - Type lowLevelSensorStream into TextBox


   - Click on click to add patterns...


   - Select your Fact Type (see * below)


   - In Over sliding window ListBox select Length


   - Type 1 into the TextBox next to Length.

* OK, so this is possibly where you're having problems.

In order for a Fact Type to be used with CEP it needs to be annotated as an
Event. This is how this can be accomplished:-

*If you have a Declarative Model
*

   - Open the Declarative Model


   - Select the Fact Type that should be an Event


   - Add an Annotation, name=role, key=value, value=event


   - Save


*If you have a POJO Model*

   - Create a new Declarative Model


   - Add a Fact Type that matches the name of that in your JAR


   - Add an Annotation, name=role, key=value, value=event


   - Save


Annotating your POJO is covered in the Drools Expert User Guide. You are
just using Guvnor to achieve what is required.

With kind regards,

Mike

On 26 April 2012 15:22, Matteo Cusmai cusmaimat...@gmail.com wrote:

 Hi Mike,
 thanks for suggestion, but i have already read documentation.

 First of all, i cannot define over window:length(1) from entry-point
 lowLevelSensorStream.
 Do you help me to do this?

 Best Regards,
 Matteo.



 On Thu, Apr 26, 2012 at 11:32 AM, Michael Anstis michael.ans...@gmail.com
  wrote:

 Yes this is possible with Guvnor 5.2 onwards.

 The user-guide explains how to use the Guided Rule Editor (but not
 specifically CEP features).

 Read that and give it a try - it's reasonably intuitive (not an excuse
 for poor documentation though) and come back here with questions.

 With kind regards,

 Mike

 On 26 April 2012 09:08, Matteo Cusmai cusmaimat...@gmail.com wrote:

 Hi all,
 i am novice on GUVNOR, but i would like to define my fusion rules by
 graphical tool.

 An example of my rules is:

 rule radiation-event
 salience 10
 no-loop
 when
 $obs: RadiationObservation( $obsLocation : location, value 
 10 ) over window:length(1) from entry-point lowLevelSensorStream
 not RadiationEvent( this meets[ 25s ] $obs, location
 geoIsWithinDistance[ 5m ] $obsLocation )
 then
 insert(new RadiationEvent( $obs, Radiation over 10,
 Event.THREAT_HIGH, $obsLocation, $obs.getSensor() ));
 end

 rule radiation-update
 salience 5
 no-loop
 when
 $obs: RadiationObservation( $obsLocation : location, value 
 10 ) over window:length(1) from entry-point lowLevelSensorStream
 $event : RadiationEvent( this meets[ 25s ] $obs, location
 geoIsWithinDistance[ 5m ] $obsLocation )
 then
 Event e = Event.clone($event);
 e.addObservation($obs);
 insert( e );
 retract($event);
 retract($obs);
 end

 Is it possibile to define rules such the above using GUVNOR?
 Are there some documentation or tutorial?

 Thanks a lot in advance,
 Matteo Cusmai.

 ___
 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


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