[rules-users] setting the @expires in java

Wolfgang Laun wolfgang.laun at gmail.com
Fri Aug 16 08:44:01 EDT 2013


On 16/08/2013, samsonrithvik <samsonrithvik.cts at gmail.com> wrote:
> Hi,
>
> how do i set the @expires vaule in the java class.

You can't.

>
> because in drl file @expires id not accepting the variables.

Documentation says:
   @expires( <timeOffset> )
where <timeOffset> is one of
   [#d][#h][#m][#s][#[ms]]
where "#" is a "numeric value" (but I guess the author meant "integer value").

-W

> so i want to
> set it in the java class. how do i do that
>
> my sample drl file looks like this
>
> declare MyEvent
> 	@role(event)
>         //@expires(timeThreshold) not working because its not accepting the
> variables
> end
>
>
>
> my event class looks like this
>
>
>
> public class MyEvent {
> 	private String eventName;
> 	public String getEventName() {
> 		return eventName;
> 	}
> 	public void setEventName(String eventName) {
> 		this.eventName = eventName;
> 	}
> 	public MyEvent(String eventName) {
> 		super();
> 		this.eventName = eventName;
> 	}
>
> }
>
> Now how do i delclate @expires in this java class ?
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/setting-the-expires-in-java-tp4025574.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list