Re: [rules-users] Need Help: Error creating bean with name 'kbase'

2012-04-26 Thread singkamas
Based from the logs my error is on the autowiring of session and/or the
knowledgebase. I am not sure what i did wrong. Here's my latest setup.

?xml version=1.0 encoding=UTF-8?
beans:beans xmlns=http://www.springframework.org/schema/mvc;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:beans=http://www.springframework.org/schema/beans;
xmlns:context=http://www.springframework.org/schema/context;
xmlns:drools=http://drools.org/schema/drools-spring;
xsi:schemaLocation=http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://drools.org/schema/drools-spring
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-container/drools-spring/src/main/resources/org/drools/container/spring/drools-spring.xsd;




annotation-driven /


drools:kbase id=kbase
drools:resources
drools:resource type=DRL
source=classpath:validation.drl/drools:resource
/drools:resources
/drools:kbase


drools:ksession id=ksession type=stateless name=ksession
kbase=kbase /


resources mapping=/resources/** location=/resources/ /




beans:bean
class=org.springframework.web.servlet.view.InternalResourceViewResolver
beans:property name=prefix value=/WEB-INF/views/ /
beans:property name=suffix value=.jsp /
/beans:bean

context:component-scan base-package=com.spring.drools /

/beans:beans

===
@Controller
public class HomeController {

private static final Logger logger =
LoggerFactory.getLogger(HomeController.class);

@Autowired
private StatelessKnowledgeSession ksession;

/**
 * Simply selects the home view to render by returning its name.
 */
@RequestMapping(value = /, method = RequestMethod.GET)
public String home(Locale locale, Model model) {
logger.info(Welcome home! the client locale is + 
locale.toString());

Date date = new Date();
DateFormat dateFormat = 
DateFormat.getDateTimeInstance(DateFormat.LONG,
DateFormat.LONG, locale);

String formattedDate = dateFormat.format(date);

model.addAttribute(serverTime, formattedDate );

return home;
}

}
===
*Exception*
===


SEVERE: PWC1306: Startup of context /SpringDrools1 failed due to previous
errors
INFO: PWC1412: WebModule[null] ServletContext.log():Destroying Spring
FrameworkServlet 'appServlet'
INFO: PWC1412: WebModule[null] ServletContext.log():Closing Spring root
WebApplicationContext
INFO: INFO :
org.springframework.web.context.support.XmlWebApplicationContext - Closing
Root WebApplicationContext: startup date [Thu Apr 26 14:06:19 CST 2012];
root of context hierarchy

INFO: INFO :
org.springframework.beans.factory.support.DefaultListableBeanFactory -
Destroying singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@33eca56a:
defining beans []; root of factory hierarchy

SEVERE: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException:
org.apache.catalina.LifecycleException:
org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property 'resource'
threw exception; nested exception is java.lang.NoSuchMethodError:
org.drools.util.ClassLoaderUtil.getClassLoader([Ljava/lang/ClassLoader;Ljava/lang/Class;Z)Lorg/drools/util/CompositeClassLoader;
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:5389)
at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2018)
at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
at 

[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


[rules-users] Setting variables in a stateless session

2012-04-26 Thread bardelman
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


Re: [rules-users] Setting variables in a stateless session

2012-04-26 Thread Wolfgang Laun
On 26/04/2012, bardelman feki.ahmed@gmail.com wrote:
 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 ?!

You don't keep state in globals with a stateful session either, so
your question is moot. If you don't have the need for a global, then
don't use it.

 i  also have some confusion between a request scope and a stateless
 session scope i think it s the same..

Probably, if I interpret your request scope correctly.

-W



 --
 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

___
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] Guvnor 5.3 to Guvnor 5.2

2012-04-26 Thread Michael Anstis
The release notes will tell you.

Any reason you need to go back to 5.2 from 5.3?

If all your rules are plain text DRL an export from 5.3 and import into 5.2
might be OK.

To be honest we don't check for compatibility between repository exports
going backwards - obviously old versions can't support what has yet to be
implemented.

With kind regards,

Mike

On 26 April 2012 10:03, arup arup4u2...@gmail.com wrote:

 Hi all,

 I just wanted to know that what are the major changes made in Guvnor 5.3
 that were not present in Guvnor 5.2. I need to move all my drls from Guvnor
 5.3 to 5.2. Is there any chance of getting any versioning problem? also
 what
 is the best way to move all the drls from Guvnor 5.3 to 5.2?? thanks in
 advance... :)

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Guvnor-5-3-to-Guvnor-5-2-tp3940646p3940646.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


Re: [rules-users] Guvnor and Joda time

2012-04-26 Thread Toni Rikkola
I made a Jira for this. If possible, provide a small repository export that we 
can use for testing.

https://issues.jboss.org/browse/GUVNOR-1877

Toni Rikkola

On Apr 25, 2012, at 8:30 PM, Sean Su wrote:

 Do we support Joda time objects in Guvnor (5.3)? I did add joda time jar on 
 the classpath (Guvnor's lib folder) and there is no class not found 
 exception. However I get following exception when trying to access the 
 deployment snapshot. 
 
 The snapshot worked fine when I was using Date. After switching to Joda time, 
 I did reload the POJO model and regenerated the deployment snapshot.
 
 I am using 5.3.final.
 
 java.lang.NullPointerException
 at java.io.OutputStream.write(OutputStream.java:58)
 at 
 org.drools.guvnor.server.files.FileManagerUtils.loadBinaryPackage(FileManagerUtils.java:196)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
 at 
 org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
 at 
 org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
 at 
 org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
 at 
 org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
 at 
 org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
 at 
 org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
 at 
 org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
 at 
 org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
 at 
 org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:163)
 at 
 org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
 at 
 org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
 at 
 org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
 at 
 org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
 at 
 org.drools.guvnor.server.files.FileManagerUtils_$$_javassist_seam_10.loadBinaryPackage(FileManagerUtils_$$_javassist_seam_10.java)
 at 
 org.drools.guvnor.server.files.PackageDeploymentServlet$1.execute(PackageDeploymentServlet.java:252)
 at 
 org.drools.guvnor.server.files.RepositoryServlet.doAuthorizedAction(RepositoryServlet.java:75)
 at 
 org.drools.guvnor.server.files.PackageDeploymentServlet.doGet(PackageDeploymentServlet.java:130)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:625)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)
 at 
 org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:65)
 at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
 at 
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
 at 
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
 at java.lang.Thread.run(Thread.java:662)
 
 -- 
 But beware of the Dark Side. Anger, fear, aggression - the Dark Side of the 
 Force are they. -Yoda
 ___
 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] Redundancy check option not working in Drools Verifier 5.4

2012-04-26 Thread worldofprasanna
Hi,

Still am stuck up with this problem. I couldn t verify the redundancy in my
rules using Drools Verifier. Can somebody out there help me ?

Thanks,
Prasanna.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Redundancy-check-option-not-working-in-Drools-Verifier-5-4-tp3938055p3941009.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] Guvnor and Joda time

2012-04-26 Thread Sean Su
sure. Attach to the jira or send to here?

Thanks

Sean

Sent from my iPad

On Apr 26, 2012, at 7:39 AM, Toni Rikkola toni.rikk...@gmail.com wrote:

I made a Jira for this. If possible, provide a small repository export that
we can use for testing.

https://issues.jboss.org/browse/GUVNOR-1877

Toni Rikkola

On Apr 25, 2012, at 8:30 PM, Sean Su wrote:

Do we support Joda time objects in Guvnor (5.3)? I did add joda time jar on
the classpath (Guvnor's lib folder) and there is no class not found
exception. However I get following exception when trying to access the
deployment snapshot.

The snapshot worked fine when I was using Date. After switching to Joda
time, I did reload the POJO model and regenerated the deployment snapshot.

I am using 5.3.final.

java.lang.NullPointerException
at java.io.OutputStream.write(OutputStream.java:58)
at
org.drools.guvnor.server.files.FileManagerUtils.loadBinaryPackage(FileManagerUtils.java:196)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:163)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
at
org.drools.guvnor.server.files.FileManagerUtils_$$_javassist_seam_10.loadBinaryPackage(FileManagerUtils_$$_javassist_seam_10.java)
at
org.drools.guvnor.server.files.PackageDeploymentServlet$1.execute(PackageDeploymentServlet.java:252)
at
org.drools.guvnor.server.files.RepositoryServlet.doAuthorizedAction(RepositoryServlet.java:75)
at
org.drools.guvnor.server.files.PackageDeploymentServlet.doGet(PackageDeploymentServlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:625)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)
at
org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:65)
at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)

-- 
But beware of the Dark Side. Anger, fear, aggression - the Dark Side of
the Force are they. -Yoda
___
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

[rules-users] Guvnor guided editor and non argument constructor

2012-04-26 Thread Sean Su
It seems that the new fact created by the guided editor must be from
the java class that has the default non argument constructor in
Guvnor. There seems no way we can customize it to pass arguments in.
This would force us to provide setters to the object.

Is this a true statement?

Thanks

Sean

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


[rules-users] Contains an object

2012-04-26 Thread gboro54
Is there a way to use contains with an object? i.e

obj:Object(collection contains SubObject(string=TST,int=1))


I know you could do a from but we are writing a DSL and it would be great if
I could accomplish something like this above

TIA!

--
View this message in context: 
http://drools.46999.n3.nabble.com/Contains-an-object-tp3941334p3941334.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] Contains an object

2012-04-26 Thread gboro54
I guess I could also have a method on my main object that takes parameters
and just do a not null check...


gboro54 wrote
 
 Is there a way to use contains with an object? i.e
 
 obj:Object(collection contains SubObject(string=TST,int=1))
 
 
 I know you could do a from but we are writing a DSL and it would be great
 if I could accomplish something like this above
 
 TIA!
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/Contains-an-object-tp3941334p3941343.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] Contains an object

2012-04-26 Thread gboro54
Yes I know that from can be used with DSL. I was just trying to think of a
way to do something with a sub part of the object(i.e a dsl entry with a - )


laune wrote
 
 On 26/04/2012, gboro54 lt;gboro54@gt; wrote:
 Is there a way to use contains with an object? i.e
 
 Yes, but've got to follow Java's sytax rules (apart from using
 additional operators).
 
 

 obj:Object(collection contains SubObject(string=TST,int=1))

 
 The second operand isn't a valid Java expression.
 
 Rather than being forced to use from, consider inserting SubObjects as
 facts.
 
$subobj: SubObject(string=TST,int=1)
obj:Object(collection contains $subobj)
 

 I know you could do a from but we are writing a DSL and it would be great
 if
 I could accomplish something like this above
 
 But using from can be accomplished with a DSL phrase as well.
 
 -W
 

 TIA!

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Contains-an-object-tp3941334p3941334.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

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


--
View this message in context: 
http://drools.46999.n3.nabble.com/Contains-an-object-tp3941334p3941387.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] Contains an object

2012-04-26 Thread Wolfgang Laun
On 26/04/2012, gboro54 gbor...@gmail.com wrote:
 Is there a way to use contains with an object? i.e

Yes, but've got to follow Java's sytax rules (apart from using
additional operators).



 obj:Object(collection contains SubObject(string=TST,int=1))


The second operand isn't a valid Java expression.

Rather than being forced to use from, consider inserting SubObjects as facts.

   $subobj: SubObject(string=TST,int=1)
   obj:Object(collection contains $subobj)


 I know you could do a from but we are writing a DSL and it would be great
 if
 I could accomplish something like this above

But using from can be accomplished with a DSL phrase as well.

-W


 TIA!

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Contains-an-object-tp3941334p3941334.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


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] Redundancy check option not working in Drools Verifier 5.4

2012-04-26 Thread Mark Proctor
On 26/04/2012 12:56, worldofprasanna wrote:
 Hi,

 Still am stuck up with this problem. I couldn t verify the redundancy in my
 rules using Drools Verifier. Can somebody out there help me ?
Only toni knows that code. If it's not  working, it's likely a bug. 
Please submit a unit test:
https://hudson.jboss.org/hudson/job/droolsjbpm-knowledge/lastSuccessfulBuild/artifact/droolsjbpm-introduction-docs/target/docbook/publish/en-US/html_single/index.html#gettingstarted

Mark

 Thanks,
 Prasanna.

 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Redundancy-check-option-not-working-in-Drools-Verifier-5-4-tp3938055p3941009.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


Re: [rules-users] Setting variables in a stateless session

2012-04-26 Thread Welsh, Armand
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

___
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


Re: [rules-users] Guvnor guided editor and non argument constructor

2012-04-26 Thread Michael Anstis
Seems reasonable enough.

On 26 April 2012 14:36, Sean Su sean.x...@gmail.com wrote:

 It seems that the new fact created by the guided editor must be from
 the java class that has the default non argument constructor in
 Guvnor. There seems no way we can customize it to pass arguments in.
 This would force us to provide setters to the object.

 Is this a true statement?

 Thanks

 Sean

 Sent from my iPad
 ___
 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] looking for advice

2012-04-26 Thread Bobby Richards
I have not yet determined how I want to implement my problem and was hoping
to get some feedback.

I am using drools to migrate the logic from my automated currency trading
infrastructure.  Each currency pair, i.e. eurusd has around
200 attributes associated with it.

This includes range values (high, low, average) for multiple time periods,
volatility information, bid/ask updates etc.

Currently I have classes associated for each, so say for range:

class Range {
  double high;
  double low;
  double avg;
}

Range europe = new Range();  //european trading hours
Range us = new Range(); //us trading hours


Questions:
1.  I am wondering if I should not just create a map that lists every
attribute per pair as a key (eurusd:range:europe:high)?  So essentially
my drools session will have one fact, not counting the incoming quotes.  I
see on the list that this was a problem before the mvel updates but that
was a while ago.

2.  When an incoming quote might modify a value, what is the performance
difference between using a rule to change the value or making the changes
outside of the ksession and referencing the facthandler to modify?  Is one
method considered 'cleaner'?

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


Re: [rules-users] Guvnor guided editor and non argument constructor

2012-04-26 Thread Vincent LEGENDRE
JavaBeans convention : all default constructible and plenty of setters (for 
writeable properties) and getters (for readeable properties)

- Mail original -

De: Michael Anstis michael.ans...@gmail.com
À: Rules Users List rules-users@lists.jboss.org
Envoyé: Jeudi 26 Avril 2012 15:40:27
Objet: Re: [rules-users] Guvnor guided editor and non argument constructor 


Seems reasonable enough.


On 26 April 2012 14:36, Sean Su  sean.x...@gmail.com  wrote:


It seems that the new fact created by the guided editor must be from
the java class that has the default non argument constructor in
Guvnor. There seems no way we can customize it to pass arguments in.
This would force us to provide setters to the object.

Is this a true statement?

Thanks

Sean

Sent from my iPad
___
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 guided editor and non argument constructor

2012-04-26 Thread Sean Su
What I am prototyping is part of the event processing (with or without
fusion). I want to use the rules created by the Guvnor to create the new
events. However, as you would understand, once the event has been created,
it should not be modified as it happened in the past.

So I am trying to avoid setters if possible.

Sean

Sent from my iPad

On Apr 26, 2012, at 12:49 PM, Vincent LEGENDRE 
vincent.legen...@eurodecision.com wrote:

JavaBeans convention : all default constructible and plenty of setters (for
writeable properties) and getters (for readeable properties)

--
*De: *Michael Anstis michael.ans...@gmail.com
*À: *Rules Users List rules-users@lists.jboss.org
*Envoyé: *Jeudi 26 Avril 2012 15:40:27
*Objet: *Re: [rules-users] Guvnor guided editor and non argument constructor

Seems reasonable enough.

On 26 April 2012 14:36, Sean Su sean.x...@gmail.com wrote:

 It seems that the new fact created by the guided editor must be from
 the java class that has the default non argument constructor in
 Guvnor. There seems no way we can customize it to pass arguments in.
 This would force us to provide setters to the object.

 Is this a true statement?

 Thanks

 Sean

 Sent from my iPad
 ___
 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


Re: [rules-users] Guvnor guided editor and non argument constructor

2012-04-26 Thread Vincent LEGENDRE
Should use a DSL then.

- Mail original -

De: Sean Su sean.x...@gmail.com
À: Rules Users List rules-users@lists.jboss.org
Envoyé: Jeudi 26 Avril 2012 19:06:57
Objet: Re: [rules-users] Guvnor guided editor and non argument constructor 


What I am prototyping is part of the event processing (with or without fusion). 
I want to use the rules created by the Guvnor to create the new events. 
However, as you would understand, once the event has been created, it should 
not be modified as it happened in the past.


So I am trying to avoid setters if possible.


Sean

Sent from my iPad

On Apr 26, 2012, at 12:49 PM, Vincent LEGENDRE  
vincent.legen...@eurodecision.com  wrote:






JavaBeans convention : all default constructible and plenty of setters (for 
writeable properties) and getters (for readeable properties)

- Mail original -

De: Michael Anstis  michael.ans...@gmail.com 
À: Rules Users List  rules-users@lists.jboss.org 
Envoyé: Jeudi 26 Avril 2012 15:40:27
Objet: Re: [rules-users] Guvnor guided editor and non argument constructor 


Seems reasonable enough.


On 26 April 2012 14:36, Sean Su  sean.x...@gmail.com  wrote:

blockquote
It seems that the new fact created by the guided editor must be from
the java class that has the default non argument constructor in
Guvnor. There seems no way we can customize it to pass arguments in.
This would force us to provide setters to the object.

Is this a true statement?

Thanks

Sean

Sent from my iPad
___
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


/blockquote

blockquote

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

/blockquote

___
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] looking for advice

2012-04-26 Thread slyfox
actually I think I just answered my own question.  Every computation that I
do is based on either quotes or previous closing values.  Using fusion
greatly simplifies everything and (I'm pretty sure) solves my problems.

Am I correct?

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-looking-for-advice-tp3941853p3941953.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] DroolsjBPM Drop in Centre at JBoss World

2012-04-26 Thread Mark Proctor

http://blog.athico.com/2012/04/drools-drop-in-centre-at-jboss-world.html
--
Now you have another reason to come to JBoss World 
http://www.redhat.com/summit/, as if you didn't already have too many  
on your list :)


On Friday the 29th of June we'll have an all day drop in centre for 
Drools  jBPM. We'll be having an all day team meeting and codeathon 
which will be open to the public. You can come along and hang out with 
us for the whole day and code, or just drop in for a bit and we'll help 
you with your questions.


Best of all Edson will be handing out free hugs all day.

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


Re: [rules-users] Guvnor guided editor and non argument constructor

2012-04-26 Thread Sean Su
Can DSL be presented as the decision table as well? Any examples if yes?

Thanks.

Sean

Sent from my iPad

On Apr 26, 2012, at 1:14 PM, Vincent LEGENDRE 
vincent.legen...@eurodecision.com wrote:

Should use a DSL then.

--
*De: *Sean Su sean.x...@gmail.com
*À: *Rules Users List rules-users@lists.jboss.org
*Envoyé: *Jeudi 26 Avril 2012 19:06:57
*Objet: *Re: [rules-users] Guvnor guided editor and non argument constructor

What I am prototyping is part of the event processing (with or without
fusion). I want to use the rules created by the Guvnor to create the new
events. However, as you would understand, once the event has been created,
it should not be modified as it happened in the past.

So I am trying to avoid setters if possible.

Sean

Sent from my iPad

On Apr 26, 2012, at 12:49 PM, Vincent LEGENDRE 
vincent.legen...@eurodecision.com wrote:

JavaBeans convention : all default constructible and plenty of setters (for
writeable properties) and getters (for readeable properties)

--
*De: *Michael Anstis michael.ans...@gmail.com
*À: *Rules Users List rules-users@lists.jboss.org
*Envoyé: *Jeudi 26 Avril 2012 15:40:27
*Objet: *Re: [rules-users] Guvnor guided editor and non argument constructor

Seems reasonable enough.

On 26 April 2012 14:36, Sean Su sean.x...@gmail.com wrote:

 It seems that the new fact created by the guided editor must be from
 the java class that has the default non argument constructor in
 Guvnor. There seems no way we can customize it to pass arguments in.
 This would force us to provide setters to the object.

 Is this a true statement?

 Thanks

 Sean

 Sent from my iPad
 ___
 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

___
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 guided editor and non argument constructor

2012-04-26 Thread Michael Anstis
Yes, if you use 5.4 - this supports BRL fragments as columns. Rule
Templates also support DSLs.

HOWEVER - and this is probably an issue - DSLs in Guvnor currently only
support literal values.

So if you use a DSL in either a Decision Table or Rule Template you cannot
specify different values in the table for the DSL place-holder.

On 26 April 2012 19:21, Sean Su sean.x...@gmail.com wrote:

 Can DSL be presented as the decision table as well? Any examples if yes?

 Thanks.

 Sean

 Sent from my iPad

 On Apr 26, 2012, at 1:14 PM, Vincent LEGENDRE 
 vincent.legen...@eurodecision.com wrote:

 Should use a DSL then.

 --
 *De: *Sean Su sean.x...@gmail.com
 *À: *Rules Users List rules-users@lists.jboss.org
 *Envoyé: *Jeudi 26 Avril 2012 19:06:57
 *Objet: *Re: [rules-users] Guvnor guided editor and non argument
 constructor

 What I am prototyping is part of the event processing (with or without
 fusion). I want to use the rules created by the Guvnor to create the new
 events. However, as you would understand, once the event has been created,
 it should not be modified as it happened in the past.

 So I am trying to avoid setters if possible.

 Sean

 Sent from my iPad

 On Apr 26, 2012, at 12:49 PM, Vincent LEGENDRE 
 vincent.legen...@eurodecision.com wrote:

 JavaBeans convention : all default constructible and plenty of setters
 (for writeable properties) and getters (for readeable properties)

 --
 *De: *Michael Anstis michael.ans...@gmail.com
 *À: *Rules Users List rules-users@lists.jboss.org
 *Envoyé: *Jeudi 26 Avril 2012 15:40:27
 *Objet: *Re: [rules-users] Guvnor guided editor and non argument
 constructor

 Seems reasonable enough.

 On 26 April 2012 14:36, Sean Su sean.x...@gmail.com wrote:

 It seems that the new fact created by the guided editor must be from
 the java class that has the default non argument constructor in
 Guvnor. There seems no way we can customize it to pass arguments in.
 This would force us to provide setters to the object.

 Is this a true statement?

 Thanks

 Sean

 Sent from my iPad
 ___
 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

 ___
 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 guided editor and non argument constructor

2012-04-26 Thread Sean Su
Any time frame for the final release? I played with CR1 and it does not
seem stable.

Sent from my iPad

On Apr 26, 2012, at 2:28 PM, Michael Anstis michael.ans...@gmail.com
wrote:

Yes, if you use 5.4 - this supports BRL fragments as columns. Rule
Templates also support DSLs.

HOWEVER - and this is probably an issue - DSLs in Guvnor currently only
support literal values.

So if you use a DSL in either a Decision Table or Rule Template you cannot
specify different values in the table for the DSL place-holder.

On 26 April 2012 19:21, Sean Su sean.x...@gmail.com wrote:

 Can DSL be presented as the decision table as well? Any examples if yes?

 Thanks.

 Sean

 Sent from my iPad

 On Apr 26, 2012, at 1:14 PM, Vincent LEGENDRE 
 vincent.legen...@eurodecision.com wrote:

 Should use a DSL then.

 --
 *De: *Sean Su sean.x...@gmail.com
 *À: *Rules Users List rules-users@lists.jboss.org
 *Envoyé: *Jeudi 26 Avril 2012 19:06:57
 *Objet: *Re: [rules-users] Guvnor guided editor and non argument
 constructor

 What I am prototyping is part of the event processing (with or without
 fusion). I want to use the rules created by the Guvnor to create the new
 events. However, as you would understand, once the event has been created,
 it should not be modified as it happened in the past.

 So I am trying to avoid setters if possible.

 Sean

 Sent from my iPad

 On Apr 26, 2012, at 12:49 PM, Vincent LEGENDRE 
 vincent.legen...@eurodecision.com wrote:

 JavaBeans convention : all default constructible and plenty of setters
 (for writeable properties) and getters (for readeable properties)

 --
 *De: *Michael Anstis michael.ans...@gmail.com
 *À: *Rules Users List rules-users@lists.jboss.org
 *Envoyé: *Jeudi 26 Avril 2012 15:40:27
 *Objet: *Re: [rules-users] Guvnor guided editor and non argument
 constructor

 Seems reasonable enough.

 On 26 April 2012 14:36, Sean Su sean.x...@gmail.com wrote:

 It seems that the new fact created by the guided editor must be from
 the java class that has the default non argument constructor in
 Guvnor. There seems no way we can customize it to pass arguments in.
 This would force us to provide setters to the object.

 Is this a true statement?

 Thanks

 Sean

 Sent from my iPad
 ___
 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

 ___
 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


Re: [rules-users] Guvnor guided editor and non argument constructor

2012-04-26 Thread Michael Anstis
Mark Proctor has mentioned it being within the next couple of weeks, so I'd
assume before June.

sent on the move

On 26 Apr 2012 20:00, Sean Su sean.x...@gmail.com wrote:

 Any time frame for the final release? I played with CR1 and it does not
 seem stable.

 Sent from my iPad

 On Apr 26, 2012, at 2:28 PM, Michael Anstis michael.ans...@gmail.com
 wrote:

 Yes, if you use 5.4 - this supports BRL fragments as columns. Rule
 Templates also support DSLs.

 HOWEVER - and this is probably an issue - DSLs in Guvnor currently only
 support literal values.

 So if you use a DSL in either a Decision Table or Rule Template you cannot
 specify different values in the table for the DSL place-holder.

 On 26 April 2012 19:21, Sean Su sean.x...@gmail.com wrote:

 Can DSL be presented as the decision table as well? Any examples if yes?

 Thanks.

 Sean

 Sent from my iPad

 On Apr 26, 2012, at 1:14 PM, Vincent LEGENDRE 
 vincent.legen...@eurodecision.com wrote:

 Should use a DSL then.

 --
 *De: *Sean Su sean.x...@gmail.com
 *À: *Rules Users List rules-users@lists.jboss.org
 *Envoyé: *Jeudi 26 Avril 2012 19:06:57
 *Objet: *Re: [rules-users] Guvnor guided editor and non argument
 constructor

 What I am prototyping is part of the event processing (with or without
 fusion). I want to use the rules created by the Guvnor to create the new
 events. However, as you would understand, once the event has been created,
 it should not be modified as it happened in the past.

 So I am trying to avoid setters if possible.

 Sean

 Sent from my iPad

 On Apr 26, 2012, at 12:49 PM, Vincent LEGENDRE 
 vincent.legen...@eurodecision.com wrote:

 JavaBeans convention : all default constructible and plenty of setters
 (for writeable properties) and getters (for readeable properties)

 --
 *De: *Michael Anstis michael.ans...@gmail.com
 *À: *Rules Users List rules-users@lists.jboss.org
 *Envoyé: *Jeudi 26 Avril 2012 15:40:27
 *Objet: *Re: [rules-users] Guvnor guided editor and non argument
 constructor

 Seems reasonable enough.

 On 26 April 2012 14:36, Sean Su sean.x...@gmail.com wrote:

 It seems that the new fact created by the guided editor must be from
 the java class that has the default non argument constructor in
 Guvnor. There seems no way we can customize it to pass arguments in.
 This would force us to provide setters to the object.

 Is this a true statement?

 Thanks

 Sean

 Sent from my iPad
 ___
 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

 ___
 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


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


Re: [rules-users] Getting Error while using Drools 5.3.0

2012-04-26 Thread Wolfgang Laun
This rule (and note the correct spelling of modelYear with a capital
'Y', in contrast to your first post) compiles and executes correctly
using 5.3.0.

rule qr
when
info: CarRulesInfo( quoteRequest.VIN == null,
quoteRequest.modelYear  1982 )
then
System.out.println( got new car );
end

-W



On 25/04/2012, mkhan_rt54fde maliul...@gmail.com wrote:
 Hi,

 Thanks for the reply.

 In my application,one of the input parameters is Year.In my java class,I am
 getting the modelyear from year and converting it an integer.But even then,
 I am getting the error posted earlier.Here is my rule file:

 rule Set Time To Live
   when
   there is a restoration request
   then
   set quote process time to live to: 15
   add additional action check state regulation for vintage car
 restoration
 end


 #validation
 rule Year is required
 no-loop true
   when
   request does not contain model year
   then
   set reason of rejection to year is required
   reject request
 end


 #additional action
 rule VIN required for newer vehicles
 no-loop true
   when
   request contains no VIN and the car was built after year 1982
   then
   ask the customer to provide VIN
 end

 and here is my java class:

 public class QuoteRequest {

   private Contact contact;
   private Address address;

   private String make;
   private String model;
   private String style;
   private String year;

   private String VIN;
   private String condition;
   private String description;
   private String zip;

   private ListLink links = new ArrayListLink();

   public static void printForMe() {
   System.out.println(printing for you);
   }

   public Contact getContact() {
   return contact;
   }

   public void setContact(Contact contact) {
   this.contact = contact;
   }

   public Address getAddress() {
   return address;
   }

   public void setAddress(Address address) {
   this.address = address;
   }

   public String getMake() {
   return make;
   }

   public void setMake(String make) {
   this.make = make;
   }

   public String getModel() {
   return model;
   }

   public void setModel(String model) {
   this.model = model;
   }

   public String getStyle() {
   return style;
   }

   public void setStyle(String style) {
   this.style = style;
   }

   public String getYear() {
   return returnString(year);
   }
   
   public Integer getModelYear() {
   Integer modelYear = (getYear() == null) ? null : 
 Integer.parseInt(year);
   return modelYear;
   }

   public void setYear(String year) {
   this.year = year;
   }

   public String getVIN() {
   return returnString(VIN);
   }

   public void setVIN(String vin) {
   VIN = vin;
   }

   public String getCondition() {
   return condition;
   }

   public void setCondition(String condition) {
   this.condition = condition;
   }

   public String getDescription() {
   return description;
   }

   public void setDescription(String description) {
   this.description = description;
   }

   public String getZip() {
   return zip;
   }

   public void setZip(String zip) {
   this.zip = zip;
   }

   public ListLink getLinks() {
   return links;
   }

   public void setLinks(ListLink links) {
   this.links = links;
   }
   
   private String returnString(String s) {
return (s == null || s.isEmpty()) ? null : s;  
   }
 }

 Are there any changes I need to make any changes to the java class to fix
 the error I am seeing?

 Thanks.

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Getting-Error-while-using-Drools-5-3-0-tp3936714p3939076.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


Re: [rules-users] 5.4.CR1 Guvnor bug?

2012-04-26 Thread Michael Anstis
OK.

#1 is a bug. I have raised a JIRA -
https://issues.jboss.org/browse/GUVNOR-1879. It is a bit of an edge case
but I've fixed for 5.4.0.Final.

#2 I'll attach the provided repository to the existing JIRA.

Thanks,

Mike

On 26 April 2012 20:13, Sean Su sean.x...@gmail.com wrote:

 Attached is the repository exported from 5.3.final. There are two issues
 here.

 I would appreciate it if the development can take a look.

 1. The last column of the decision table does not display any values on
 5.4.CR1 while it works fine on 5.3.0. Please note the rules are still
 generated correctly and it even passes the validator from 5.4.CR1. However
 there is some GUI issue here.
 2. If you generate a deployment Snapshot, everything seems fine. However
 when trying to access the generated file (from the link provided by
 Guvnor), I get the NullPointerException. This can be reproduced in both
 5.3.0.final and 5.4.CR1, though the trace from 5.4.CR1 is shorter.

 I initially reported this NPE couple of days ago under the assumption that
 it is caused by Guvnor and Joda time integration. But it seems it happens
 (randomly) in that situations.

 Thanks

 Sean

 --
 But beware of the Dark Side. Anger, fear, aggression - the Dark Side of
 the Force are they. -Yoda

 ___
 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] 5.4.CR1 Guvnor bug?

2012-04-26 Thread Sean Su
Thank Mike. I have a POC due by the end of May and these bugs/issues
directly impact the output of it. Is there any service channel we can
access (paid or free) that allows us to access the latest stable version,
and possibly dedicated support?

Sean

Sent from my iPad

On Apr 26, 2012, at 4:44 PM, Michael Anstis michael.ans...@gmail.com
wrote:

OK.

#1 is a bug. I have raised a JIRA -
https://issues.jboss.org/browse/GUVNOR-1879. It is a bit of an edge case
but I've fixed for 5.4.0.Final.

#2 I'll attach the provided repository to the existing JIRA.

Thanks,

Mike

On 26 April 2012 20:13, Sean Su sean.x...@gmail.com wrote:

 Attached is the repository exported from 5.3.final. There are two issues
 here.

 I would appreciate it if the development can take a look.

 1. The last column of the decision table does not display any values on
 5.4.CR1 while it works fine on 5.3.0. Please note the rules are still
 generated correctly and it even passes the validator from 5.4.CR1. However
 there is some GUI issue here.
 2. If you generate a deployment Snapshot, everything seems fine. However
 when trying to access the generated file (from the link provided by
 Guvnor), I get the NullPointerException. This can be reproduced in both
 5.3.0.final and 5.4.CR1, though the trace from 5.4.CR1 is shorter.

 I initially reported this NPE couple of days ago under the assumption that
 it is caused by Guvnor and Joda time integration. But it seems it happens
 (randomly) in that situations.

 Thanks

 Sean

 --
 But beware of the Dark Side. Anger, fear, aggression - the Dark Side of
 the Force are they. -Yoda

 ___
 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] 5.4.CR1 Guvnor bug?

2012-04-26 Thread Michael Anstis
Hi,

I've had a look at #2 too.

The problem is that you need to build the package before taking a snapshot.

There was another underlying problem that meant you could not build your
package either, but I've fixed that.

Regarding the latest stable version: you can get the latest snapshot build
from
https://hudson.jboss.org/hudson/job/guvnor-5.4.x/lastSuccessfulBuild/artifact/

You'll need to ensure you get the last successful build following commits
I've made this evening.

Realistically 5.4.0.Final won't be available until nearer to June (although
it *might* be early May).

With kind regards,

Mike

On 26 April 2012 22:00, Sean Su sean.x...@gmail.com wrote:

 Thank Mike. I have a POC due by the end of May and these bugs/issues
 directly impact the output of it. Is there any service channel we can
 access (paid or free) that allows us to access the latest stable version,
 and possibly dedicated support?

 Sean

 Sent from my iPad

 On Apr 26, 2012, at 4:44 PM, Michael Anstis michael.ans...@gmail.com
 wrote:

 OK.

 #1 is a bug. I have raised a JIRA -
 https://issues.jboss.org/browse/GUVNOR-1879. It is a bit of an edge case
 but I've fixed for 5.4.0.Final.

 #2 I'll attach the provided repository to the existing JIRA.

 Thanks,

 Mike

 On 26 April 2012 20:13, Sean Su sean.x...@gmail.com wrote:

 Attached is the repository exported from 5.3.final. There are two issues
 here.

 I would appreciate it if the development can take a look.

 1. The last column of the decision table does not display any values on
 5.4.CR1 while it works fine on 5.3.0. Please note the rules are still
 generated correctly and it even passes the validator from 5.4.CR1. However
 there is some GUI issue here.
 2. If you generate a deployment Snapshot, everything seems fine. However
 when trying to access the generated file (from the link provided by
 Guvnor), I get the NullPointerException. This can be reproduced in both
 5.3.0.final and 5.4.CR1, though the trace from 5.4.CR1 is shorter.

 I initially reported this NPE couple of days ago under the assumption
 that it is caused by Guvnor and Joda time integration. But it seems it
 happens (randomly) in that situations.

 Thanks

 Sean

 --
 But beware of the Dark Side. Anger, fear, aggression - the Dark Side of
 the Force are they. -Yoda

 ___
 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


Re: [rules-users] Redundancy check option not working in Drools Verifier 5.4

2012-04-26 Thread worldofprasanna
Hi Mark,

Thanks for the reply. And below is the issue which i have created.

https://issues.jboss.org/browse/JBRULES-3484

Regards,
Prasanna.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Redundancy-check-option-not-working-in-Drools-Verifier-5-4-tp3938055p3943464.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