[rules-users] [rules-use​rs] The Temporal Operators in Guvnor

2012-05-15 Thread Carolina Pellecchia
Hi all

I have a new question. How can I define a Temporal Operators in GUVNOR?

I need to do something like this:

DoorOpeningEvent( this meets[25s] $obs )
thank you and kindly regards!
Carolina Pellecchia
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] [rules-use​rs] The Temporal Operators in Guvnor

2012-05-15 Thread Michael Anstis
IIRC with 5.2 onwards, yes (definitely 5.3 onwards).

You don't as such "define" temporal operators, but you can use those
provided by Drools Fusion (CEP).

If using a POJO model make sure you have completed the necessary steps to
expose it as an Event, as covered in the documentation.

If using a declarative model, make sure you have annotated it accordingly,
as covered in the documentation.

With kind regards,

Mike

On 15 May 2012 15:58, Carolina Pellecchia wrote:

> Hi all
>
> I have a new question. How can I define a Temporal Operators in GUVNOR?
>
> I need to do something like this:
>
> DoorOpeningEvent( this meets[25s] $obs )
> thank you and kindly regards!
> Carolina Pellecchia
>
> ___
> 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] [rules-use​rs] The Temporal Operators in Guvnor

2012-05-15 Thread Michael Anstis
According to the documentation you will need to create a declarative model
to add the annotation @role(event) to your POJO.

If in doubt please consult the user guide - Chapter 4. Authoring Assets,
4.6.2 has the below)

Complex Event Processing operators are also available when the Fact has
been declared as an event. Refer to the "Fact Model" chapter of this
user-guide for details on how to add annotations to your Fact model. Events
have access to the full range of CEP operators; Date field-types are
restricted to "after", "before" and "coincides".

Basically, you need to create a declarative type of the same name as your
POJO and add the @role(event) to the declared type.

This is a requirement of Drools Expert (and documented in their
corresponding user-guide too).

With kind regards,

Mike

On 15 May 2012 18:38, Carolina Pellecchia wrote:

> Hi Mike,
>
> first of all, thank you for your suggestions.
>
> I couldn't understand a point:
>
> which are the steps to follow in order  to expose POJO model
> as an event?
>
> because when I try to write a business rule with the guided editor, in my
> package, I couldn't add a CEP operator ( I haven't a  "clock" icon).
>
> Regards
> Carolina Pellecchia
> 2012/5/15 Michael Anstis 
>
>> IIRC with 5.2 onwards, yes (definitely 5.3 onwards).
>>
>> You don't as such "define" temporal operators, but you can use those
>> provided by Drools Fusion (CEP).
>>
>> If using a POJO model make sure you have completed the necessary steps to
>> expose it as an Event, as covered in the documentation.
>>
>> If using a declarative model, make sure you have annotated it
>> accordingly, as covered in the documentation.
>>
>> With kind regards,
>>
>> Mike
>>
>> On 15 May 2012 15:58, Carolina Pellecchia 
>> wrote:
>>
>>> Hi all
>>>
>>> I have a new question. How can I define a Temporal Operators in GUVNOR?
>>>
>>> I need to do something like this:
>>>
>>> DoorOpeningEvent( this meets[25s] $obs )
>>> thank you and kindly regards!
>>> Carolina Pellecchia
>>>
>>> ___
>>> 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