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

Michael Anstis michael.anstis at gmail.com
Tue May 15 13:45:49 EDT 2012


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 <carolina.pellecchia at gmail.com>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 <michael.anstis at gmail.com>
>
>> 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 <carolina.pellecchia at gmail.com>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 at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120515/8170bd90/attachment-0001.html 


More information about the rules-users mailing list