[rules-users] Migration 3 to 4 (replace "->")

2007-10-04 Thread Markus Helbig
   In Drools 3 i used the following code (in a DSL file):

   [when]ist BlaBlub=BlaBlub(number : id -> ( BlaClass.staticFunction(
   number ))

   where id can be resolved be method getId in class BlaBlub and
   staticFunction ist a public static function in a helper class.

   Drools 4 doesn't allow me this construct, how should this be migrated?

   Any help is much appreciated

   Cheers

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


[rules-users] Sequentiel Mode

2007-10-05 Thread Markus Helbig
from drools documentation:

Sequential mode can only be used with a StatefulSession and is off by
default. To turn on either set the RuleBaseConfiguration.setSequentail to
true or set the rulebase.conf property drools.sequential to true.
 when you use it:

 *java.lang.RuntimeException*: Cannot have a stateful rule session, with
sequential configuration set to true

somebody there who can solve this mytery?

Cheers

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


[rules-users] eval

2007-10-08 Thread Markus Helbig
Hi,
given the following DSL


[when]of type Item=Item()
[when]- Title equals "{value}"=eval(title.isEqual("{value}")
[when]- Event equals "{value}"=eval(id.isEqual("{value}")
[then]Log : "{message}"=System.out.println("{message}");



the dslr File:

expander Test.dsl

rule "Your First Rule"
  when
 $p : of type Item
- Title equals "test"
- Event equals "test"
  then
#actions
end

resolves to (could be seen in the drl viewer)

rule "Your First Rule"

when
$p :Item( eval(title.isEqual("test", eval(id.isEqual("test") ) )
then
#actions

end


so this of course does not work because of the brackets in "eval"

How could i solve this problem? I need the two different eval
conditions, and sometimes they have to be combined.

Thanks

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


Re: [rules-users] eval

2007-10-09 Thread Markus Helbig
you're right, but this was just an example for possible functions. In
reality i don't use equal methods here ...

Thanks

Markus


2007/10/8, Edson Tirelli <[EMAIL PROTECTED]>:
>
>This is a bug in the DSL engine. May I ask you please to submit a JIRA
> for it?
>
>Meanwhile, I advise you to avoid eval, since it is more performant and
> more clear to use regular constraints. The following grammar entries are
> equivalent to yours, but much more performant:
>
> [when]- Title equals "{value}"=title == "{value}"
> [when]- Event equals "{value}"=id == "{value}"
>
> []s
> Edson
>
> 2007/10/8, Markus Helbig < [EMAIL PROTECTED]>:
> >
> > Hi,
> > given the following DSL
> >
> >
> > [when]of type Item=Item()
> > [when]- Title equals "{value}"=eval(title.isEqual("{value}")
> > [when]- Event equals "{value}"=eval(id.isEqual("{value}")
> > [then]Log : "{message}"= System.out.println("{message}");
> >
> >
> >
> > the dslr File:
> >
> > expander Test.dsl
> >
> > rule "Your First Rule"
> >   when
> >  $p : of type Item
> > - Title equals "test"
> > - Event equals "test"
> >   then
> > #actions
> > end
> >
> > resolves to (could be seen in the drl viewer)
> >
> > rule "Your First Rule"
> >
> > when
> > $p :Item( eval( title.isEqual("test",
> eval(id.isEqual("test") ) )
> > then
> > #actions
> >
> > end
> >
> >
> > so this of course does not work because of the brackets in "eval"
> >
> > How could i solve this problem? I need the two different eval
> > conditions, and sometimes they have to be combined.
> >
> > Thanks
> >
> > Markus
> > ___
> > rules-users mailing list
> > rules-users@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
>
>
>
> --
>   Edson Tirelli
>   Software Engineer - JBoss Rules Core Developer
>   Office: +55 11 3529-6000
>   Mobile: +55 11 9287-5646
>   JBoss, a division of Red Hat @ www.jboss.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


[rules-users] pattern

2007-10-10 Thread Markus Helbig
Drools Documentation says:

Matches a field against any valid Java Regular Expression. Typically
that regexp is a String, but variables that resolve to a valid regexp
are also allowed. It is important to note that different from java, if
you write a String regexp directly on the source file, you don't need
to escape '\'. Example:

but

"Test\s+" is a valid RegEx (it was valid in Drools 3.x too), but now:

SyntaxfehlerRule Compilation error : [Rule name=OnlineStreaming Start,
agendaGroup=MAIN, salience=100, no-loop=true]
com/p7s1/swi/phoenix/n24/Rule_OnlineStreaming_Start_0.java (19:923) :
Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \\ )



What i'm doing wrong here?

Cheers

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


Re: [rules-users] pattern

2007-10-10 Thread Markus Helbig
Hi,

no same exception when i use "\\s". JDK didn't change when i switched
from 3.x to 4.x

Cheers

Markus

2007/10/10, DELBART Vincent <[EMAIL PROTECTED]>:
> Hi,
>
> I think you have to use "Test\\s+".
>
> I don't think it's a DROOLS problem (maybe jdk).
>
> V.
>
>
> -Message d'origine-----
> De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Markus Helbig
> Envoyé : mercredi 10 octobre 2007 11:12
> À : rules-users@lists.jboss.org
> Objet : [rules-users] pattern
>
> Drools Documentation says:
>
> Matches a field against any valid Java Regular Expression. Typically that 
> regexp is a String, but variables that resolve to a valid regexp are also 
> allowed. It is important to note that different from java, if you write a 
> String regexp directly on the source file, you don't need to escape '\'. 
> Example:
>
> but
>
> "Test\s+" is a valid RegEx (it was valid in Drools 3.x too), but now:
>
> SyntaxfehlerRule Compilation error : [Rule name=OnlineStreaming Start, 
> agendaGroup=MAIN, salience=100, no-loop=true] 
> com/p7s1/swi/phoenix/n24/Rule_OnlineStreaming_Start_0.java (19:923) :
> Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \\ )
>
>
>
> What i'm doing wrong here?
>
> Cheers
>
> Markus
> ___
> 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] pattern

2007-10-10 Thread Markus Helbig
rule "PatternTest"
when
$pli:Item( eval(title.matches("^Test\s*")) )
then
#
end

Having a second look i realize that the DroolsParser should not parse
the pattern string because it's java code ... and i can't use title
matches "^Test\s*" because title may have chars like (,\ and so on
that resolves into a RuntimeException (sth. with Groups not closed in
RegEx).

Cheers

Markus

2007/10/10, Edson Tirelli <[EMAIL PROTECTED]>:
>
>Markus,
>
>Can you please show me your rule?
>
>[]s
>Edson
>
> 2007/10/10, Markus Helbig <[EMAIL PROTECTED] >:
> > Hi,
> >
> > no same exception when i use "\\s". JDK didn't change when i switched
> > from 3.x to 4.x
> >
> > Cheers
> >
> > Markus
> >
> > 2007/10/10, DELBART Vincent <[EMAIL PROTECTED]>:
> > > Hi,
> > >
> > > I think you have to use "Test\\s+".
> > >
> > > I don't think it's a DROOLS problem (maybe jdk).
> > >
> > > V.
> > >
> > >
> > > -Message d'origine-
> > > De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] De la part de
> Markus Helbig
> > > Envoyé : mercredi 10 octobre 2007 11:12
> > > À : rules-users@lists.jboss.org
> > > Objet : [rules-users] pattern
> > >
> > > Drools Documentation says:
> > >
> > > Matches a field against any valid Java Regular Expression. Typically
> that regexp is a String, but variables that resolve to a valid regexp are
> also allowed. It is important to note that different from java, if you write
> a String regexp directly on the source file, you don't need to escape '\'.
> Example:
> > >
> > > but
> > >
> > > "Test\s+" is a valid RegEx (it was valid in Drools 3.x too), but now:
> > >
> > > SyntaxfehlerRule Compilation error : [Rule name=OnlineStreaming Start,
> agendaGroup=MAIN, salience=100, no-loop=true]
> com/p7s1/swi/phoenix/n24/Rule_OnlineStreaming_Start_0.java
> (19:923) :
> > > Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \\ )
> > >
> > >
> > >
> > > What i'm doing wrong here?
> > >
> > > Cheers
> > >
> > > Markus
> > > ___
> > > 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
> >
>
>
>
> --
>   Edson Tirelli
>   Software Engineer - JBoss Rules Core Developer
>   Office: +55 11 3529-6000
>   Mobile: +55 11 9287-5646
>   JBoss, a division of Red Hat @ www.jboss.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] Problem with DSL and 4.0.2

2007-10-12 Thread Markus Helbig
i only know i have this problem to when using 4.0.2 -> conclusion:
don't use it ... stay with 4.0.1

2007/10/12, vdelbart <[EMAIL PROTECTED]>:
>
> Nobody knows what's going wrong ?
>
> All my DSLs are wrong and in the same time my rules too... It's very
> problematic...
>
>
> V.
>
>
> vdelbart wrote:
> >
> > Hi,
> >
> > I have a problem with my DSL and the 4.0.2 version :
> >
> > this sentence doesn't work in 4.0.2 (work in 4.0.1) in Eclipse Editor :
> >
> > [condition][]there is at least {number} {object}=ArrayList( size >=
> > {number}) from collect( {object}() )
> >
> > log :
> > !ENTRY org.eclipse.ui 4 0 2007-10-11 14:29:29.052
> > !MESSAGE String index out of range: -1
> > !STACK 0
> > java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> >   at java.lang.String.substring(String.java:1768)
> >   at
> > org.drools.lang.dsl.DefaultDSLMappingEntry.setMappingKey(DefaultDSLMappingEntry.java:139)
> >   at org.drools.eclipse.dsl.editor.MappingEditor.okPressed(Unknown 
> > Source)
> >   at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:508)
> >   at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:660)
> >   at
> > org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
> >   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
> >   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
> >   at 
> > org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
> >   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
> >   at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
> >   at org.eclipse.jface.window.Window.open(Window.java:796)
> >   at org.drools.eclipse.dsl.editor.DSLEditor$8.widgetSelected(Unknown
> > Source)
> >   at
> > org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
> >   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
> >   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
> >   at 
> > org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
> >   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
> >   at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
> >   at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
> >   at
> > org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
> >   at 
> > org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> >   at 
> > org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
> >   at
> > org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
> >   at
> > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
> >   at
> > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
> >   at
> > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
> >   at
> > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
> >   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:585)
> >   at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
> >   at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
> >   at org.eclipse.core.launcher.Main.run(Main.java:977)
> >   at org.eclipse.core.launcher.Main.main(Main.java:952)
> >
> >
> > If I put two blanks between {number} {object}, it's working.
> > [condition][]there is at least {number}  {object}=ArrayList( size >=
> > {number}) from collect( {object}() )
> >
> >
> > But it's not a solution.
> >
> > thanks for your help,
> >
> > V.
> >
>
> --
> View this message in context: 
> http://www.nabble.com/Problem-with-DSL-and-4.0.2-tf4606960.html#a13170213
> Sent from the drools - user 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] pattern

2007-10-15 Thread Markus Helbig
2007/10/10, Edson Tirelli <[EMAIL PROTECTED]>:
>
> Markus,
>
> Yes, eval code block will pass through DRL compiler into the java
> compiler. So you need to write the regexp as it is written in standard java
> code.
> Now, this must work:
>
> Item( title matches "^Test\s*" )
>
>Does not matter what characters title contains. If it is not working, it
> is a bug. Can you please submit a JIRA with a test case showing the problem?

i will do that ... because it is still not working

>
>Thanks,
>
>   Edson
>
>  2007/10/10, Markus Helbig <[EMAIL PROTECTED]>:
> > rule "PatternTest"
> > when
> > $pli:Item( eval(title.matches("^Test\s*")) )
> > then
> > #
> > end
> >
> > Having a second look i realize that the DroolsParser should not parse
> > the pattern string because it's java code ... and i can't use title
> > matches "^Test\s*" because title may have chars like (,\ and so on
> > that resolves into a RuntimeException (sth. with Groups not closed in
> > RegEx).
> >
> > Cheers
> >
> > Markus
> >
> > 2007/10/10, Edson Tirelli <[EMAIL PROTECTED]>:
> > >
> > >Markus,
> > >
> > >Can you please show me your rule?
> > >
> > >[]s
> > >Edson
> > >
> > > 2007/10/10, Markus Helbig <[EMAIL PROTECTED] >:
> > > > Hi,
> > > >
> > > > no same exception when i use "\\s". JDK didn't change when i switched
> > > > from 3.x to 4.x
> > > >
> > > > Cheers
> > > >
> > > > Markus
> > > >
> > > > 2007/10/10, DELBART Vincent <[EMAIL PROTECTED]>:
> > > > > Hi,
> > > > >
> > > > > I think you have to use "Test\\s+".
> > > > >
> > > > > I don't think it's a DROOLS problem (maybe jdk).
> > > > >
> > > > > V.
> > > > >
> > > > >
> > > > > -Message d'origine-
> > > > > De : [EMAIL PROTECTED]
> > > [mailto: [EMAIL PROTECTED] De la
> part de
> > > Markus Helbig
> > > > > Envoyé : mercredi 10 octobre 2007 11:12
> > > > > À : rules-users@lists.jboss.org
> > > > > Objet : [rules-users] pattern
> > > > >
> > > > > Drools Documentation says:
> > > > >
> > > > > Matches a field against any valid Java Regular Expression. Typically
> > > that regexp is a String, but variables that resolve to a valid regexp
> are
> > > also allowed. It is important to note that different from java, if you
> write
> > > a String regexp directly on the source file, you don't need to escape
> '\'.
> > > Example:
> > > > >
> > > > > but
> > > > >
> > > > > "Test\s+" is a valid RegEx (it was valid in Drools 3.x too), but
> now:
> > > > >
> > > > > SyntaxfehlerRule Compilation error : [Rule name=OnlineStreaming
> Start,
> > > agendaGroup=MAIN, salience=100, no-loop=true]
> > >
> com/p7s1/swi/phoenix/n24/Rule_OnlineStreaming_Start_0.java
> > > (19:923) :
> > > > > Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \\ )
> > > > >
> > > > >
> > > > >
> > > > > What i'm doing wrong here?
> > > > >
> > > > > Cheers
> > > > >
> > > > > Markus
> > > > > ___
> > > > > 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
> > > >
> > >
> > >
> > >
> > > --
> > >   Edson Tirelli
> > >   Software Engineer - JBoss Rules Core Developer
> > >   Office: +55 11 3529-6000
> > >   Mobile: +55 11 9287-5646
> > >   JBoss, a division of Red Hat @ www.jboss.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
> >
>
>
>
> --
>   Edson Tirelli
>   Software Engineer - JBoss Rules Core Developer
>   Office: +55 11 3529-6000
>   Mobile: +55 11 9287-5646
>   JBoss, a division of Red Hat @ www.jboss.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


[rules-users] BRMS

2007-10-15 Thread Markus Helbig
Hi,

i tryed to deploy the BRMS on a WebSphere Server, but i get
incompatibility errors. It seems BRMS can not be used with JRE 1.4.x,
right? Why? JRE 1.4.x is still very common and often used in
enterprises ...

Cheers

Markus

Stacktrace is:

Could not be defined due to: (org/jboss/seam/servlet/SeamListener) bad
major version at offset=6
This is often caused by having a class defined at multiple
locations within the classloader hierarchy.  Other potential causes
include compiling against an older or newer version of the class
that has an incompatible method signature.
Dumping the current context classloader hierarchy:
==> indicates defining classloader
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] BRMS

2007-10-15 Thread Markus Helbig
that's a real pitty ... it's a great thing ... but WebSphere 6.0.x is
using JRE 1.4 ... damned

2007/10/15, Mark Proctor <[EMAIL PROTECTED]>:
> Markus Helbig wrote:
> > Hi,
> >
> > i tryed to deploy the BRMS on a WebSphere Server, but i get
> > incompatibility errors. It seems BRMS can not be used with JRE 1.4.x,
> > right? Why? JRE 1.4.x is still very common and often used in
> > enterprises ...
> >
> yup the BRMS is JDK1.5 - welcome to the future :)
> > Cheers
> >
> > Markus
> >
> > Stacktrace is:
> >
> > Could not be defined due to: (org/jboss/seam/servlet/SeamListener) bad
> > major version at offset=6
> > This is often caused by having a class defined at multiple
> > locations within the classloader hierarchy.  Other potential causes
> > include compiling against an older or newer version of the class
> > that has an incompatible method signature.
> > Dumping the current context classloader hierarchy:
> > ==> indicates defining classloader
> > ___
> > 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] BRMS

2007-10-17 Thread Markus Helbig
tried it for several hours, but hadn't success to get it running ...

2007/10/17, Mark Proctor <[EMAIL PROTECTED]>:
> Paul Browne wrote:
> > Haven't tried it in this context , but would using Retroweaver help
> > ?(Java 5 code compiled to work in Java 1.4 JVM)
> It may do, but we don't have the resources to QA this, so its up to the
> community to see if that works.
> >
> > Mark Proctor wrote:
> >> Markus Helbig wrote:
> >>> that's a real pitty ... it's a great thing ... but WebSphere 6.0.x is
> >>> using JRE 1.4 ... damned
> >>>
> >> There are still people out there using drools 2.x because they are on
> >> JDK1.3. But their comes a time when the advantages of moving
> >> outweight the advantages of staying, its not an easy decision but
> >> jdk1.4 has been around since 2003, so I think we've supported it long
> >> enough. Our next major release will be jdk1.5 only, both BRMS and
> >> engine.
> >>> 2007/10/15, Mark Proctor <[EMAIL PROTECTED]>:
> >>>
> >>>> Markus Helbig wrote:
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> i tryed to deploy the BRMS on a WebSphere Server, but i get
> >>>>> incompatibility errors. It seems BRMS can not be used with JRE 1.4.x,
> >>>>> right? Why? JRE 1.4.x is still very common and often used in
> >>>>> enterprises ...
> >>>>>
> >>>>>
> >>>> yup the BRMS is JDK1.5 - welcome to the future :)
> >>>>
> >>>>> Cheers
> >>>>>
> >>>>> Markus
> >>>>>
> >>>>> Stacktrace is:
> >>>>>
> >>>>> Could not be defined due to: (org/jboss/seam/servlet/SeamListener)
> >>>>> bad
> >>>>> major version at offset=6
> >>>>> This is often caused by having a class defined at multiple
> >>>>> locations within the classloader hierarchy.  Other potential causes
> >>>>> include compiling against an older or newer version of the class
> >>>>> that has an incompatible method signature.
> >>>>> Dumping the current context classloader hierarchy:
> >>>>> ==> indicates defining classloader
> >>>>> ___
> >>>>> 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] BRMS on 1.4 using Retroweaver

2007-10-19 Thread Markus Helbig
And here the next one (i removed asm-1.5.3 so that there's just asm-3.0):

[19.10.07 10:22:10:791 CEST] 0034 WebAppE   SRVE0026E:
[Servlet-Fehler]-[/index.jsp]: java.lang.IllegalStateException: No
Manager could be created, make sure the Component exists in
application scope
at org.jboss.seam.core.Manager.instance(Manager.java:269)
at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:51)
at 
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:759)
at 
com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
at 
com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:204)
at 
com.ibm.ws.jsp.webcontainerext.JSPExtensionProcessor.handleRequest(JSPExtensionProcessor.java:254)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3071)
at 
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:236)
at 
com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:210)
at 
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1958)
at 
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:98)
at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:288)
at 
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:207)
at 
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:109)
at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)
at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)
at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)
at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1471)



2007/10/19, Markus Helbig <[EMAIL PROTECTED]>:
> Ok here i have the stacktrace when starting the application:
>
> ---Original exception---
> java.lang.ClassFormatError: (org/jboss/seam/core/package-info) class
> name is invalid at offset=0
> at java.lang.ClassLoader.defineClassImpl(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:213)
> at 
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:147)
> at 
> com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:518)
> at 
> com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:469)
> at 
> com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:365)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:584)
> at 
> org.jboss.seam.deployment.NamespaceScanner.getPackage(NamespaceScanner.java:70)
> at 
> org.jboss.seam.deployment.NamespaceScanner.handleItem(NamespaceScanner.java:51)
> at org.jboss.seam.deployment.Scanner.handleArchive(Scanner.java:117)
> at org.jboss.seam.deployment.Scanner.scan(Scanner.java:96)
> at 
> org.jboss.seam.deployment.NamespaceScanner.getPackages(NamespaceScanner.java:34)
> at 
> org.jboss.seam.init.Initialization.addNamespaces(Initialization.java:590)
> at org.jboss.seam.init.Initialization.(Initialization.java:80)
> at 
> org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:33)
> at 
> com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1434)
> at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:411)
> at 
> com.ibm.ws.webcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:117)
> at 
> com.ibm.ws.webcontainer.VirtualHost.addWebApplication(VirtualHost.java:128)
> at 
> com.ibm.ws.webcontainer.WebContainer.addWebApp(WebContainer.java:939)
> at 
> com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:892)
> at 
> com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:167)
> at 
> com.ibm.ws.runtime.component.WebCo

Re: [rules-users] BRMS on 1.4 using Retroweaver

2007-10-19 Thread Markus Helbig
(SessionContext.java:972)
at 
com.ibm.ws.webcontainer.httpsession.SessionContext.getIHttpSession(SessionContext.java:2508)
at 
com.ibm.ws.webcontainer.httpsession.SessionContext.getIHttpSession(SessionContext.java:2417)
at 
com.ibm.ws.webcontainer.srt.SRTRequestContext.getSession(SRTRequestContext.java:88)
at 
com.ibm.ws.webcontainer.srt.SRTServletRequest.getSession(SRTServletRequest.java:1049)
at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:47)
at 
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:759)
at 
com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
at 
com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:204)
at 
com.ibm.ws.jsp.webcontainerext.JSPExtensionProcessor.handleRequest(JSPExtensionProcessor.java:254)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3071)
at 
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:236)
at 
com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:210)
at 
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1958)
at 
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:98)
at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:288)
at 
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:207)
at 
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:109)
at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)
at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)
at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)
at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1471)

2007/10/19, Markus Helbig <[EMAIL PROTECTED]>:
> Hi,
>
> i manipulated the classes folder and several Jar files in the lib
> folder. Deployment is fine, but starting the applications gives:
>
> ---Original exception---
> java.lang.ClassFormatError: (org/jboss/seam/core/package-info) class
> name is invalid at offset=0
> at java.lang.ClassLoader.defineClassImpl(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:213)
>
> i had other exceptions too, about problems with:
>
> ClassVisitor.class in asm.jar ...
>
> i couldn't find the reason ... i'll try again and post the exact exceptions 
> ...
>
> > Remember that typically the BRMS is an editing tool used by 2-10 people,
> > so a case could be made for a 'local' Tomcat or JBoss. The rules can
> > then be exported from this and deployed on the existing production
> > Websphere (JVM version permitting) - no BRMS needed there.
>
> i know ... but there are several political reasons, which prohibit to
> use another AppServer than Websphere ...
>
> Cheers
>
> Markus
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] BRMS on 1.4 using Retroweaver

2007-10-19 Thread Markus Helbig
Hi,

i manipulated the classes folder and several Jar files in the lib
folder. Deployment is fine, but starting the applications gives:

---Original exception---
java.lang.ClassFormatError: (org/jboss/seam/core/package-info) class
name is invalid at offset=0
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:213)

i had other exceptions too, about problems with:

ClassVisitor.class in asm.jar ...

i couldn't find the reason ... i'll try again and post the exact exceptions ...

> Remember that typically the BRMS is an editing tool used by 2-10 people,
> so a case could be made for a 'local' Tomcat or JBoss. The rules can
> then be exported from this and deployed on the existing production
> Websphere (JVM version permitting) - no BRMS needed there.

i know ... but there are several political reasons, which prohibit to
use another AppServer than Websphere ...

Cheers

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


Re: [rules-users] BRMS on 1.4 using Retroweaver

2007-10-21 Thread Markus Helbig
Hi,

> Couple of Questions:
> a) What version of Websphere are you using

currently it is 6.0.2.3 FixPack 17

> b) Which JDK are you using - Sun or IBM?

It's the IBM JDK 1.4.2 which is included in 6.0.2.3 FixPack 17

> c) How much access to do you to the WS production and Dev servers ; i.e.
> will you be able to change security policies, replace core server jars
> with more up to date versions?

No way ...

> My gut feeling is that you have 3 choices:
> 1) Try to 'retrofit' the BRMS into a previous JVM / Websphere version.
> No guarantee that it will work nor that the changes needed will render
> the production server unstable. You need three changes: Retroweaver the
> code to 1.4, Add JSF to the App Server and overcome any differences
> between the IBM and the Sun JDK. One change you might attempt; to make
> three is madness!
> 2) Deploy BRMS on Tomcat / JBoss. It might go against corporate policy,
> but either the business needs the BRMS functionality enough to accept
> this, or they will *have* to choose options 1 or 3.
> 3) Use an alternative means for business users to write rules; e.g.
> Decision Tables or train user in the use of the Drools IDE.
>
> None of these are ideal. As bad as options 2 and 3 are, number 1 is even
> worse; you could waste a lot of time (no guarantee of success) and very
> quickly find yourself with an App Server that IBM will refuse to support
> :-(.

I decided to stop trying to get it to work ... then they have to deal
with a simple editor to write rules (just a plain textarea in a
website) ... there's a roadmap to migrate to WebSphere 6.1 but this
could last months ... but i don't care anymore ... i'm just can use
what's there ...

Cheers

Markus

>
> Paul
>
>
> Markus Helbig wrote:
> > And here the next one (i removed asm-1.5.3 so that there's just asm-3.0):
> >
> > [19.10.07 10:22:10:791 CEST] 0034 WebAppE   SRVE0026E:
> > [Servlet-Fehler]-[/index.jsp]: java.lang.IllegalStateException: No
> > Manager could be created, make sure the Component exists in
> > application scope
> >   at org.jboss.seam.core.Manager.instance(Manager.java:269)
> >   at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:51)
> >   at 
> > com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
> >   at 
> > com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
> >   at 
> > com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
> >   at 
> > com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:759)
> >   at 
> > com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
> >   at 
> > com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:204)
> >   at 
> > com.ibm.ws.jsp.webcontainerext.JSPExtensionProcessor.handleRequest(JSPExtensionProcessor.java:254)
> >   at 
> > com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3071)
> >   at 
> > com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:236)
> >   at 
> > com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:210)
> >   at 
> > com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1958)
> >   at 
> > com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:98)
> >   at 
> > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
> >   at 
> > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
> >   at 
> > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:288)
> >   at 
> > com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:207)
> >   at 
> > com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:109)
> >   at 
> > com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)
> >   at 
> > com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)
> >   at 
> > com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)
> >   at 
> > com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)
> >   at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1471)
&

[rules-users] again eval

2007-10-24 Thread Markus Helbig
Hi

rule
  when
item : eval(Factory.getList().contains(id))
  then
end

resolves into

[10/24/07 17:50:55:636 CEST] 0030 SystemErr R
org.drools.rule.InvalidRulePackage: Rule Compilation error : [Rule
name=Rule1, agendaGroup=MAIN, salience=30, no-loop=false]
package/Rule_Rule1_0.java (13:756) : The method eval(boolean) is
undefined for the type Rule_Rule1_0

what does it mean?

Cheers

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


Re: [rules-users] again eval

2007-10-25 Thread Markus Helbig
sorry it is:

item : Item(eval(Factory.getList().contains(id)))


2007/10/24, Edson Tirelli <[EMAIL PROTECTED]>:
>
> You can't bind a variable to an eval.
>
> []s
> Edson
>
> 2007/10/24, Markus Helbig <[EMAIL PROTECTED]>:
> >
> > Hi
> >
> > rule
> >   when
> > item : eval(Factory.getList().contains(id))
> >   then
> > end
> >
> > resolves into
> >
> > [10/24/07 17:50:55:636 CEST] 0030 SystemErr R
> > org.drools.rule.InvalidRulePackage: Rule Compilation
> error : [Rule
> > name=Rule1, agendaGroup=MAIN, salience=30, no-loop=false]
> > package/Rule_Rule1_0.java (13:756) : The method eval(boolean) is
> > undefined for the type Rule_Rule1_0
> >
> > what does it mean?
> >
> > Cheers
> >
> > Markus
> > ___
> > rules-users mailing list
> > rules-users@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
>
>
>
> --
>   Edson Tirelli
>   Software Engineer - JBoss Rules Core Developer
>   Office: +55 11 3529-6000
>   Mobile: +55 11 9287-5646
>   JBoss, a division of Red Hat @ www.jboss.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] JDK version

2007-10-25 Thread Markus Helbig
Yes ... and it works (Except BRMS) ...

Cheers

Markus

2007/10/25, Xiandong Su <[EMAIL PROTECTED]>:
> Has anyone used jdk 1.4.x with the latest drools (4.0.3)? Are the jars in 
> 4.0.3 compiled using Java 5? Do we have options here using the old JDK 
> versions?
>
> Thanks
>
> Sean
>
>
>
> ___
> 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] again eval

2007-10-26 Thread Markus Helbig
Sorry it was my fault, the reason is the same bug i submitted a while
ago, there are two conditions with an eval and the DSL Parser makes in
4.0.3 again:

eval(firstcondition, eval(secondcondition))

Cheers

Markus

2007/10/25, Edson Tirelli <[EMAIL PROTECTED]>:
>
>I see nothing wrong then. Can you show me the whole rule?
>
>[]s
>Edson
>
>
> 2007/10/25, Markus Helbig <[EMAIL PROTECTED] >:
> > sorry it is:
> >
> > item : Item(eval(Factory.getList().contains(id)))
> >
> >
> > 2007/10/24, Edson Tirelli <[EMAIL PROTECTED]>:
> > >
> > > You can't bind a variable to an eval.
> > >
> > > []s
> > > Edson
> > >
> > > 2007/10/24, Markus Helbig < [EMAIL PROTECTED]>:
> > > >
> > > > Hi
> > > >
> > > > rule
> > > >   when
> > > > item : eval(Factory.getList().contains(id))
> > > >   then
> > > > end
> > > >
> > > > resolves into
> > > >
> > > > [10/24/07 17:50:55:636 CEST] 0030 SystemErr R
> > > > org.drools.rule.InvalidRulePackage: Rule Compilation
> > > error : [Rule
> > > > name=Rule1, agendaGroup=MAIN, salience=30, no-loop=false]
> > > > package/Rule_Rule1_0.java (13:756) : The method eval(boolean) is
> > > > undefined for the type Rule_Rule1_0
> > > >
> > > > what does it mean?
> > > >
> > > > Cheers
> > > >
> > > > Markus
> > > > ___
> > > > rules-users mailing list
> > > > rules-users@lists.jboss.org
> > > > https://lists.jboss.org/mailman/listinfo/rules-users
> > > >
> > >
> > >
> > >
> > > --
> > >   Edson Tirelli
> > >   Software Engineer - JBoss Rules Core Developer
> > >   Office: +55 11 3529-6000
> > >   Mobile: +55 11 9287-5646
> > >   JBoss, a division of Red Hat @ www.jboss.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
> >
>
>
>
> --
>   Edson Tirelli
>   Software Engineer - JBoss Rules Core Developer
>   Office: +55 11 3529-6000
>   Mobile: +55 11 9287-5646
>   JBoss, a division of Red Hat @ www.jboss.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] JDK version

2007-10-26 Thread Markus Helbig
> Do you have to download the source and build it under 1.4? I downloaded the 
> binary files and it does not work in Eclipse 3.3 with Java 5.


No i downloaded the binaries and it works with 1.4 ... but you're
speaking about Java 5???

Do you have any error messages or stacktrace ...

>
> - Original Message ----
> From: Markus Helbig <[EMAIL PROTECTED]>
> To: Rules Users List 
> Sent: Thursday, October 25, 2007 10:23:59 AM
> Subject: Re: [rules-users] JDK version
>
>
> Yes ... and it works (Except BRMS) ...
>
> Cheers
>
> Markus
>
> 2007/10/25, Xiandong Su <[EMAIL PROTECTED]>:
> > Has anyone used jdk 1.4.x with the latest drools (4.0.3)? Are the
>  jars in 4.0.3 compiled using Java 5? Do we have options here using the old
>  JDK versions?
> >
> > Thanks
> >
> > Sean
> >
> >
> >
> > ___
> > 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] Combine DSL and Java Code?

2007-11-07 Thread Markus Helbig
Hi,

following example:

Item Class:

public class MyItem {

  public MyItem() {}

  public String getMessage()
  {
return "Hello World!";
  }

}

DSL:

[condition][]is of type MyItem=MyItem()
[consequence][]write "{value}" to stdout=System.out.println("{value}");

DSRL File:

rule
when
   $item: is of type MyItem
then
   write $item.getMessage() to stdout
end

Is this "write $item.getMessage() to stdout" possible in any way?
Currently i'm not able to get it to work ...

Cheers

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


Re: [rules-users] Combine DSL and Java Code?

2007-11-09 Thread Markus Helbig
thanks ... that works ...

2007/11/7, Edson Tirelli <[EMAIL PROTECTED]>:
>
>   Markus, did you tried:
>
> [consequence][]write {value} to stdout=System.out.println({value});
>
>With the line:
>
> write $item.getMessage() to stdout
>
> []s
> Edson
>
>  2007/11/7, Markus Helbig <[EMAIL PROTECTED]>:
> >
> > Hi,
> >
> > following example:
> >
> > Item Class:
> >
> > public class MyItem {
> >
> >   public MyItem() {}
> >
> >   public String getMessage()
> >   {
> > return "Hello World!";
> >   }
> >
> > }
> >
> > DSL:
> >
> > [condition][]is of type MyItem=MyItem()
> > [consequence][]write "{value}" to stdout=System.out.println("{value}");
> >
> > DSRL File:
> >
> > rule
> > when
> >$item: is of type MyItem
> > then
> >write $item.getMessage() to stdout
> > end
> >
> > Is this "write $item.getMessage() to stdout" possible in any way?
> > Currently i'm not able to get it to work ...
> >
> > Cheers
> >
> > Markus
> > ___
> > rules-users mailing list
> > rules-users@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
>
>
>
> --
>   Edson Tirelli
>   Software Engineer - JBoss Rules Core Developer
>   Office: +55 11 3529-6000
>   Mobile: +55 11 9287-5646
>   JBoss, a division of Red Hat @ www.jboss.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


[rules-users] RegEx in LHS

2007-11-28 Thread Markus Helbig
Hi all,

i'd like to have following DSL conditions

[condition][]Title contains {value}=title matches {value}
[condition][]Title contains not {value}=title not matches {value}


Currently (using Drools 4.0.3) it seems the parsers resolves to the
first condtion and is matching the word "not" to {value}, so i tried

[condition][]Title contains\s+{value}=title matches {value}
[condition][]Title contains\snot\s{value}=title not matches {value}


but this doesn't help, because second one again matches to the first
rule ... also it is missing one parameter ...

Any solutions?

Cheers

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


Re: [rules-users] Combine DSL and Java Code?

2007-11-28 Thread Markus Helbig
Additional the problem is:

if i have to conditions like

when
  $item1: Item()
  $item2: Item()
  -Text is $item1.getText()
  -Text2 is $item1.getText2()

it resolves to

   Item( title matches $item1.getText(, title matches $item1.getText2() ) )

which is absolutly not usable ...

Cheers

Markus



2007/11/28, Markus Helbig <[EMAIL PROTECTED]>:
> and what about using java code in LHS:
>
> DSL
> [condition][]Text is {value}=text matches {value}
>
> Rule1 (works fine)
>
> when
>   $item: Item()
>   -Text is "Hello World.*"
>
> Rule2 (doesn't work)
>
> when
>   $item1: Item()
>   $item2: Item()
>   -Text is $item1.getText()
>
> am i doing sth. wrong or is it impossible?
>
> Cheers
>
> Markus
>
> 2007/11/9, Markus Helbig <[EMAIL PROTECTED]>:
> > thanks ... that works ...
> >
> > 2007/11/7, Edson Tirelli <[EMAIL PROTECTED]>:
> > >
> > >   Markus, did you tried:
> > >
> > > [consequence][]write {value} to stdout=System.out.println({value});
> > >
> > >With the line:
> > >
> > > write $item.getMessage() to stdout
> > >
> > > []s
> > > Edson
> > >
> > >  2007/11/7, Markus Helbig <[EMAIL PROTECTED]>:
> > > >
> > > > Hi,
> > > >
> > > > following example:
> > > >
> > > > Item Class:
> > > >
> > > > public class MyItem {
> > > >
> > > >   public MyItem() {}
> > > >
> > > >   public String getMessage()
> > > >   {
> > > > return "Hello World!";
> > > >   }
> > > >
> > > > }
> > > >
> > > > DSL:
> > > >
> > > > [condition][]is of type MyItem=MyItem()
> > > > [consequence][]write "{value}" to stdout=System.out.println("{value}");
> > > >
> > > > DSRL File:
> > > >
> > > > rule
> > > > when
> > > >$item: is of type MyItem
> > > > then
> > > >write $item.getMessage() to stdout
> > > > end
> > > >
> > > > Is this "write $item.getMessage() to stdout" possible in any way?
> > > > Currently i'm not able to get it to work ...
> > > >
> > > > Cheers
> > > >
> > > > Markus
> > > > ___
> > > > rules-users mailing list
> > > > rules-users@lists.jboss.org
> > > > https://lists.jboss.org/mailman/listinfo/rules-users
> > > >
> > >
> > >
> > >
> > > --
> > >   Edson Tirelli
> > >   Software Engineer - JBoss Rules Core Developer
> > >   Office: +55 11 3529-6000
> > >   Mobile: +55 11 9287-5646
> > >   JBoss, a division of Red Hat @ www.jboss.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] Combine DSL and Java Code?

2007-11-28 Thread Markus Helbig
and what about using java code in LHS:

DSL
[condition][]Text is {value}=text matches {value}

Rule1 (works fine)

when
  $item: Item()
  -Text is "Hello World.*"

Rule2 (doesn't work)

when
  $item1: Item()
  $item2: Item()
  -Text is $item1.getText()

am i doing sth. wrong or is it impossible?

Cheers

Markus

2007/11/9, Markus Helbig <[EMAIL PROTECTED]>:
> thanks ... that works ...
>
> 2007/11/7, Edson Tirelli <[EMAIL PROTECTED]>:
> >
> >   Markus, did you tried:
> >
> > [consequence][]write {value} to stdout=System.out.println({value});
> >
> >With the line:
> >
> > write $item.getMessage() to stdout
> >
> > []s
> > Edson
> >
> >  2007/11/7, Markus Helbig <[EMAIL PROTECTED]>:
> > >
> > > Hi,
> > >
> > > following example:
> > >
> > > Item Class:
> > >
> > > public class MyItem {
> > >
> > >   public MyItem() {}
> > >
> > >   public String getMessage()
> > >   {
> > > return "Hello World!";
> > >   }
> > >
> > > }
> > >
> > > DSL:
> > >
> > > [condition][]is of type MyItem=MyItem()
> > > [consequence][]write "{value}" to stdout=System.out.println("{value}");
> > >
> > > DSRL File:
> > >
> > > rule
> > > when
> > >$item: is of type MyItem
> > > then
> > >write $item.getMessage() to stdout
> > > end
> > >
> > > Is this "write $item.getMessage() to stdout" possible in any way?
> > > Currently i'm not able to get it to work ...
> > >
> > > Cheers
> > >
> > > Markus
> > > ___
> > > rules-users mailing list
> > > rules-users@lists.jboss.org
> > > https://lists.jboss.org/mailman/listinfo/rules-users
> > >
> >
> >
> >
> > --
> >   Edson Tirelli
> >   Software Engineer - JBoss Rules Core Developer
> >   Office: +55 11 3529-6000
> >   Mobile: +55 11 9287-5646
> >   JBoss, a division of Red Hat @ www.jboss.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] RegEx in LHS

2007-11-28 Thread Markus Helbig
ok thanks ...

Markus

2007/11/28, Edson Tirelli <[EMAIL PROTECTED]>:
>
>Markus,
>
>The engine processes the mappings in the order they are written, so you
> must always write more restrictive patterns first and less restrictive
> patterns second:
>
> [condition][]Title contains not {value}=title not matches {value}
>  [condition][]Title contains {value}=title matches {value}
>
>    []s
>Edson
>
> 2007/11/28, Markus Helbig <[EMAIL PROTECTED] >:
> >
> > Hi all,
> >
> > i'd like to have following DSL conditions
> >
> > [condition][]Title contains {value}=title matches {value}
> > [condition][]Title contains not {value}=title not matches {value}
> >
> >
> > Currently (using Drools 4.0.3) it seems the parsers resolves to the
> > first condtion and is matching the word "not" to {value}, so i tried
> >
> > [condition][]Title contains\s+{value}=title matches {value}
> > [condition][]Title contains\snot\s{value}=title not matches {value}
> >
> >
> > but this doesn't help, because second one again matches to the first
> > rule ... also it is missing one parameter ...
> >
> > Any solutions?
> >
> > Cheers
> >
> > Markus
> > ___
> > rules-users mailing list
> > rules-users@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
>
>
>
> --
>   Edson Tirelli
>   JBoss Drools Core Development
>   Office: +55 11 3529-6000
>   Mobile: +55 11 9287-5646
>   JBoss, a division of Red Hat @ www.jboss.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


[rules-users] Get compiled Java Code of Rules

2007-11-28 Thread Markus Helbig
Hi,

is there any possibility to get the compiled java code of the rules
... could be helpful for several reasons ...

Cheers

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


Re: [rules-users] Get compiled Java Code of Rules

2007-11-28 Thread Markus Helbig
that's right, but can you read bytecode? Or is there a way to
serialize into pure Java Code,

i think i'll try the way Mark provided ...

Cheers

Markus

2007/11/28, Darko IVANCAN <[EMAIL PROTECTED]>:
> Hi,
>
> The package can be serialized. See manual: deployment options.
> The package can also be downloaded from the BRMS.
>
> Hope this helps,
> Darko Ivancan
>
> On 28/11/2007 13:58, Markus Helbig wrote:
> > Hi,
> >
> > is there any possibility to get the compiled java code of the rules
> > ... could be helpful for several reasons ...
> >
> > Cheers
> >
> > Markus
> > ___
> > 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] Get compiled Java Code of Rules

2007-11-28 Thread Markus Helbig
now i tried Mark's suggestion but this is also just bytecode i get ...
ok with byte code it would be possible to decompile ...

Cheers

Markus

2007/11/28, Darko IVANCAN <[EMAIL PROTECTED]>:
> Hi,
>
> Obviously Mark's suggestion is better.
>
> Anyway: Seen, that the BRMS gives you a package (as .pkg) and the
> RuleAgents can load those files and Packages are Serializable, I think
> you want to investigate also in this possibility, by looking how current
> DRools code is doing this job.
>
> Darko
>
> On 28/11/2007 16:00, Markus Helbig wrote:
> > that's right, but can you read bytecode? Or is there a way to
> > serialize into pure Java Code,
> >
> > i think i'll try the way Mark provided ...
> >
> > Cheers
> >
> > Markus
> >
> > 2007/11/28, Darko IVANCAN <[EMAIL PROTECTED]>:
> >
> >> Hi,
> >>
> >> The package can be serialized. See manual: deployment options.
> >> The package can also be downloaded from the BRMS.
> >>
> >> Hope this helps,
> >> Darko Ivancan
> >>
> >> On 28/11/2007 13:58, Markus Helbig wrote:
> >>
> >>> Hi,
> >>>
> >>> is there any possibility to get the compiled java code of the rules
> >>> ... could be helpful for several reasons ...
> >>>
> >>> Cheers
> >>>
> >>> Markus
> >>> ___
> >>> 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] Get compiled Java Code of Rules

2007-11-29 Thread Markus Helbig
I decompiled the class files, but there's sth curious in the Constant
Pool there is an invalid TagValue it is 97, it occurs in the
*ReturnValueInvoker Classes any idea what's 97 (or it should be mapped
to)?

valid types are (as far as i know):

CONSTANT_Class  7
CONSTANT_Fieldref   9
CONSTANT_Methodref  10
CONSTANT_InterfaceMethodref 11
CONSTANT_String 8
CONSTANT_Integer3
CONSTANT_Float  4
CONSTANT_Long   5
CONSTANT_Double 6
CONSTANT_NameAndType12
CONSTANT_Utf8   1

Cheers

Markus

2007/11/29, Markus Helbig <[EMAIL PROTECTED]>:
> now i tried Mark's suggestion but this is also just bytecode i get ...
> ok with byte code it would be possible to decompile ...
>
> Cheers
>
> Markus
>
> 2007/11/28, Darko IVANCAN <[EMAIL PROTECTED]>:
> > Hi,
> >
> > Obviously Mark's suggestion is better.
> >
> > Anyway: Seen, that the BRMS gives you a package (as .pkg) and the
> > RuleAgents can load those files and Packages are Serializable, I think
> > you want to investigate also in this possibility, by looking how current
> > DRools code is doing this job.
> >
> > Darko
> >
> > On 28/11/2007 16:00, Markus Helbig wrote:
> > > that's right, but can you read bytecode? Or is there a way to
> > > serialize into pure Java Code,
> > >
> > > i think i'll try the way Mark provided ...
> > >
> > > Cheers
> > >
> > > Markus
> > >
> > > 2007/11/28, Darko IVANCAN <[EMAIL PROTECTED]>:
> > >
> > >> Hi,
> > >>
> > >> The package can be serialized. See manual: deployment options.
> > >> The package can also be downloaded from the BRMS.
> > >>
> > >> Hope this helps,
> > >> Darko Ivancan
> > >>
> > >> On 28/11/2007 13:58, Markus Helbig wrote:
> > >>
> > >>> Hi,
> > >>>
> > >>> is there any possibility to get the compiled java code of the rules
> > >>> ... could be helpful for several reasons ...
> > >>>
> > >>> Cheers
> > >>>
> > >>> Markus
> > >>> ___
> > >>> 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] Get compiled Java Code of Rules

2007-11-29 Thread Markus Helbig
hmm ...

PackageCompilatData data = pkg.getPackageCompilationData(); // gets the
String[] list = data.list() // returns the list of files
Byte[] bytes = data.read( list[0] ) // get the bytecode for
new String(bytes);

just gives me the bytecode ... but i will try with the PackageBuilder ...

Cheers

Markus

2007/11/29, Mark Proctor <[EMAIL PROTECTED]>:
>
>  The src code is not kept. You would have to get this from the
> PackageBuilder and the JavaDialect, which is  in the DialectRegistry. You'll
> need to do this via reflection. When you get a reference to the mape it'll
> be bytes  again, just do new String(byte[] bytes).
>
>  Mark
>
>  Markus Helbig wrote:
>  I decompiled the class files, but there's sth curious in the Constant
> Pool there is an invalid TagValue it is 97, it occurs in the
> *ReturnValueInvoker Classes any idea what's 97 (or it should be mapped
> to)?
>
> valid types are (as far as i know):
>
> CONSTANT_Class 7
> CONSTANT_Fieldref 9
> CONSTANT_Methodref 10
> CONSTANT_InterfaceMethodref 11
> CONSTANT_String 8
> CONSTANT_Integer 3
> CONSTANT_Float 4
> CONSTANT_Long 5
> CONSTANT_Double 6
> CONSTANT_NameAndType 12
> CONSTANT_Utf8 1
>
> Cheers
>
> Markus
>
> 2007/11/29, Markus Helbig <[EMAIL PROTECTED]>:
>
>
>  now i tried Mark's suggestion but this is also just bytecode i get ...
> ok with byte code it would be possible to decompile ...
>
> Cheers
>
> Markus
>
> 2007/11/28, Darko IVANCAN <[EMAIL PROTECTED]>:
>
>
>  Hi,
>
> Obviously Mark's suggestion is better.
>
> Anyway: Seen, that the BRMS gives you a package (as .pkg) and the
> RuleAgents can load those files and Packages are Serializable, I think
> you want to investigate also in this possibility, by looking how current
> DRools code is doing this job.
>
> Darko
>
> On 28/11/2007 16:00, Markus Helbig wrote:
>
>
>  that's right, but can you read bytecode? Or is there a way to
> serialize into pure Java Code,
>
> i think i'll try the way Mark provided ...
>
> Cheers
>
> Markus
>
> 2007/11/28, Darko IVANCAN <[EMAIL PROTECTED]>:
>
>
>
>  Hi,
>
> The package can be serialized. See manual: deployment options.
> The package can also be downloaded from the BRMS.
>
> Hope this helps,
> Darko Ivancan
>
> On 28/11/2007 13:58, Markus Helbig wrote:
>
>
>
>  Hi,
>
> is there any possibility to get the compiled java code of the rules
> ... could be helpful for several reasons ...
>
> Cheers
>
> Markus
> ___
> 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] Get compiled Java Code of Rules

2007-12-05 Thread Markus Helbig
i will do that the next days ... where should i post it?

Cheers

Markus

2007/12/5, Mark Proctor <[EMAIL PROTECTED]>:
>
>  Markus Helbig wrote:
>  Here's the way it works for those who are interested
>
>  Could you put that up on the wiki for us?
>
>
>
> -- create a Packagebuilder and build package
>
> JavaDialect jd = (JavaDialect)
> builder.getDialectRegistry().getDialect("java");
>
> Field field = jd.getClass().getDeclaredField("src");
> field.setAccessible(true);
>
> MemoryResourceReader src = (MemoryResourceReader) field.get(jd);
>
> String[] list = src.list();
>
> for (int z = 0; z < list.length; z++)
> {
>  String name = (String) list[z];
>  byte[] bytes = src.getBytes( name );
>
>  System.out.println(new String(bytes));
> }
>
> -
>
> thx for the help ...
>
> 2007/11/29, Markus Helbig <[EMAIL PROTECTED]>:
>
>
>  hmm ...
>
> PackageCompilatData data = pkg.getPackageCompilationData(); // gets the
> String[] list = data.list() // returns the list of files
> Byte[] bytes = data.read( list[0] ) // get the bytecode for
> new String(bytes);
>
> just gives me the bytecode ... but i will try with the PackageBuilder ...
>
> Cheers
>
> Markus
>
> 2007/11/29, Mark Proctor <[EMAIL PROTECTED]>:
>
>
>  The src code is not kept. You would have to get this from the
> PackageBuilder and the JavaDialect, which is in the DialectRegistry. You'll
> need to do this via reflection. When you get a reference to the mape it'll
> be bytes again, just do new String(byte[] bytes).
>
>  Mark
>
>  Markus Helbig wrote:
>  I decompiled the class files, but there's sth curious in the Constant
> Pool there is an invalid TagValue it is 97, it occurs in the
> *ReturnValueInvoker Classes any idea what's 97 (or it should be mapped
> to)?
>
> valid types are (as far as i know):
>
> CONSTANT_Class 7
> CONSTANT_Fieldref 9
> CONSTANT_Methodref 10
> CONSTANT_InterfaceMethodref 11
> CONSTANT_String 8
> CONSTANT_Integer 3
> CONSTANT_Float 4
> CONSTANT_Long 5
> CONSTANT_Double 6
> CONSTANT_NameAndType 12
> CONSTANT_Utf8 1
>
> Cheers
>
> Markus
>
> 2007/11/29, Markus Helbig <[EMAIL PROTECTED]>:
>
>
>  now i tried Mark's suggestion but this is also just bytecode i get ...
> ok with byte code it would be possible to decompile ...
>
> Cheers
>
> Markus
>
> 2007/11/28, Darko IVANCAN <[EMAIL PROTECTED]>:
>
>
>  Hi,
>
> Obviously Mark's suggestion is better.
>
> Anyway: Seen, that the BRMS gives you a package (as .pkg) and the
> RuleAgents can load those files and Packages are Serializable, I think
> you want to investigate also in this possibility, by looking how current
> DRools code is doing this job.
>
> Darko
>
> On 28/11/2007 16:00, Markus Helbig wrote:
>
>
>  that's right, but can you read bytecode? Or is there a way to
> serialize into pure Java Code,
>
> i think i'll try the way Mark provided ...
>
> Cheers
>
> Markus
>
> 2007/11/28, Darko IVANCAN <[EMAIL PROTECTED]>:
>
>
>
>  Hi,
>
> The package can be serialized. See manual: deployment options.
> The package can also be downloaded from the BRMS.
>
> Hope this helps,
> Darko Ivancan
>
> On 28/11/2007 13:58, Markus Helbig wrote:
>
>
>
>  Hi,
>
> is there any possibility to get the compiled java code of the rules
> ... could be helpful for several reasons ...
>
> Cheers
>
> Markus
> ___
> 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] Get compiled Java Code of Rules

2007-12-05 Thread Markus Helbig
done ... 
http://wiki.jboss.org/wiki/Wiki.jsp?page=RetrieveCompiledRulesSourceCode

2007/12/5, Mark Proctor <[EMAIL PROTECTED]>:
> Markus Helbig wrote:
> > i will do that the next days ... where should i post it?
> >
> http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossRules
> Just add a link to a page under the Tips and Tricks - it only takes a
> minute to do.
> > Cheers
> >
> > Markus
> >
> > 2007/12/5, Mark Proctor <[EMAIL PROTECTED]>:
> >
> >>  Markus Helbig wrote:
> >>  Here's the way it works for those who are interested
> >>
> >>  Could you put that up on the wiki for us?
> >>
> >>
> >>
> >> -- create a Packagebuilder and build package
> >>
> >> JavaDialect jd = (JavaDialect)
> >> builder.getDialectRegistry().getDialect("java");
> >>
> >> Field field = jd.getClass().getDeclaredField("src");
> >> field.setAccessible(true);
> >>
> >> MemoryResourceReader src = (MemoryResourceReader) field.get(jd);
> >>
> >> String[] list = src.list();
> >>
> >> for (int z = 0; z < list.length; z++)
> >> {
> >>  String name = (String) list[z];
> >>  byte[] bytes = src.getBytes( name );
> >>
> >>  System.out.println(new String(bytes));
> >> }
> >>
> >> -
> >>
> >> thx for the help ...
> >>
> >> 2007/11/29, Markus Helbig <[EMAIL PROTECTED]>:
> >>
> >>
> >>  hmm ...
> >>
> >> PackageCompilatData data = pkg.getPackageCompilationData(); // gets the
> >> String[] list = data.list() // returns the list of files
> >> Byte[] bytes = data.read( list[0] ) // get the bytecode for
> >> new String(bytes);
> >>
> >> just gives me the bytecode ... but i will try with the PackageBuilder ...
> >>
> >> Cheers
> >>
> >> Markus
> >>
> >> 2007/11/29, Mark Proctor <[EMAIL PROTECTED]>:
> >>
> >>
> >>  The src code is not kept. You would have to get this from the
> >> PackageBuilder and the JavaDialect, which is in the DialectRegistry. You'll
> >> need to do this via reflection. When you get a reference to the mape it'll
> >> be bytes again, just do new String(byte[] bytes).
> >>
> >>  Mark
> >>
> >>  Markus Helbig wrote:
> >>  I decompiled the class files, but there's sth curious in the Constant
> >> Pool there is an invalid TagValue it is 97, it occurs in the
> >> *ReturnValueInvoker Classes any idea what's 97 (or it should be mapped
> >> to)?
> >>
> >> valid types are (as far as i know):
> >>
> >> CONSTANT_Class 7
> >> CONSTANT_Fieldref 9
> >> CONSTANT_Methodref 10
> >> CONSTANT_InterfaceMethodref 11
> >> CONSTANT_String 8
> >> CONSTANT_Integer 3
> >> CONSTANT_Float 4
> >> CONSTANT_Long 5
> >> CONSTANT_Double 6
> >> CONSTANT_NameAndType 12
> >> CONSTANT_Utf8 1
> >>
> >> Cheers
> >>
> >> Markus
> >>
> >> 2007/11/29, Markus Helbig <[EMAIL PROTECTED]>:
> >>
> >>
> >>  now i tried Mark's suggestion but this is also just bytecode i get ...
> >> ok with byte code it would be possible to decompile ...
> >>
> >> Cheers
> >>
> >> Markus
> >>
> >> 2007/11/28, Darko IVANCAN <[EMAIL PROTECTED]>:
> >>
> >>
> >>  Hi,
> >>
> >> Obviously Mark's suggestion is better.
> >>
> >> Anyway: Seen, that the BRMS gives you a package (as .pkg) and the
> >> RuleAgents can load those files and Packages are Serializable, I think
> >> you want to investigate also in this possibility, by looking how current
> >> DRools code is doing this job.
> >>
> >> Darko
> >>
> >> On 28/11/2007 16:00, Markus Helbig wrote:
> >>
> >>
> >>  that's right, but can you read bytecode? Or is there a way to
> >> serialize into pure Java Code,
> >>
> >> i think i'll try the way Mark provided ...
> >>
> >> Cheers
> >>
> >> Markus
> >>
> >> 2007/11/28, Darko IVANCAN <[EMAIL PROTECTED]>:
> >>
> >>
> >>
> >>  Hi,
> >>
> >> The package can be serialized. See manual: deployment options.
> >> The package can also be downloaded from the BRMS.
> >>
> >> Hope this helps,
> >> Darko Ivancan
> >>
> >> On 28/11/2007 13:58, Markus Helbig wrote:
> >>
> >>
> >>
> >>  Hi,
> >>
> >> is there any possibility to get the compiled java code of the rules
> >> ... could be helpful for several reasons ...
> >>
> >> Cheers
> >>
> >> Markus
> >>
>
> ___
> 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] Get compiled Java Code of Rules

2007-12-05 Thread Markus Helbig
Here's the way it works for those who are interested


-- create a Packagebuilder and build package

JavaDialect jd = (JavaDialect) builder.getDialectRegistry().getDialect("java");

Field field = jd.getClass().getDeclaredField("src");
field.setAccessible(true);

MemoryResourceReader src = (MemoryResourceReader) field.get(jd);

String[] list = src.list();

for (int z = 0; z < list.length; z++)
{
   String name = (String) list[z];
   byte[] bytes = src.getBytes( name );

   System.out.println(new String(bytes));
}

-

thx for the help ...

2007/11/29, Markus Helbig <[EMAIL PROTECTED]>:
> hmm ...
>
> PackageCompilatData data = pkg.getPackageCompilationData(); // gets the
> String[] list = data.list() // returns the list of files
> Byte[] bytes = data.read( list[0] ) // get the bytecode for
> new String(bytes);
>
> just gives me the bytecode ... but i will try with the PackageBuilder ...
>
> Cheers
>
> Markus
>
> 2007/11/29, Mark Proctor <[EMAIL PROTECTED]>:
> >
> >  The src code is not kept. You would have to get this from the
> > PackageBuilder and the JavaDialect, which is  in the DialectRegistry. You'll
> > need to do this via reflection. When you get a reference to the mape it'll
> > be bytes  again, just do new String(byte[] bytes).
> >
> >  Mark
> >
> >  Markus Helbig wrote:
> >  I decompiled the class files, but there's sth curious in the Constant
> > Pool there is an invalid TagValue it is 97, it occurs in the
> > *ReturnValueInvoker Classes any idea what's 97 (or it should be mapped
> > to)?
> >
> > valid types are (as far as i know):
> >
> > CONSTANT_Class 7
> > CONSTANT_Fieldref 9
> > CONSTANT_Methodref 10
> > CONSTANT_InterfaceMethodref 11
> > CONSTANT_String 8
> > CONSTANT_Integer 3
> > CONSTANT_Float 4
> > CONSTANT_Long 5
> > CONSTANT_Double 6
> > CONSTANT_NameAndType 12
> > CONSTANT_Utf8 1
> >
> > Cheers
> >
> > Markus
> >
> > 2007/11/29, Markus Helbig <[EMAIL PROTECTED]>:
> >
> >
> >  now i tried Mark's suggestion but this is also just bytecode i get ...
> > ok with byte code it would be possible to decompile ...
> >
> > Cheers
> >
> > Markus
> >
> > 2007/11/28, Darko IVANCAN <[EMAIL PROTECTED]>:
> >
> >
> >  Hi,
> >
> > Obviously Mark's suggestion is better.
> >
> > Anyway: Seen, that the BRMS gives you a package (as .pkg) and the
> > RuleAgents can load those files and Packages are Serializable, I think
> > you want to investigate also in this possibility, by looking how current
> > DRools code is doing this job.
> >
> > Darko
> >
> > On 28/11/2007 16:00, Markus Helbig wrote:
> >
> >
> >  that's right, but can you read bytecode? Or is there a way to
> > serialize into pure Java Code,
> >
> > i think i'll try the way Mark provided ...
> >
> > Cheers
> >
> > Markus
> >
> > 2007/11/28, Darko IVANCAN <[EMAIL PROTECTED]>:
> >
> >
> >
> >  Hi,
> >
> > The package can be serialized. See manual: deployment options.
> > The package can also be downloaded from the BRMS.
> >
> > Hope this helps,
> > Darko Ivancan
> >
> > On 28/11/2007 13:58, Markus Helbig wrote:
> >
> >
> >
> >  Hi,
> >
> > is there any possibility to get the compiled java code of the rules
> > ... could be helpful for several reasons ...
> >
> > Cheers
> >
> > Markus
> > ___
> > 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] RE:brms with jdk compatibility

2007-12-13 Thread Markus Helbig
the answer is no, i tried that too ... but without success

2007/12/13, Sikkandar Nawabjan <[EMAIL PROTECTED]>:
> Hi,
>
> My application using jdk.1.4.2 and if i use brms with my application will it 
> work
>
> Basha
>
>
> ___
> 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] Basic Question about Errors

2008-01-15 Thread Markus Helbig
Hi,

it's a basic question but since half a year i am not sure how to read the error

[53,61]: unknown:53:61 Unexpected token '('[53,73]: unknown:53:73
mismatched token: [EMAIL PROTECTED],2278:2278=')',<12>,53:73]; expecting type
THEN[65,61]:


which line/position is indicated in the corresponding rule file. Every
time, when i think now i got it the next error shows me i'm not right.

Cheers

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


[rules-users] OR

2008-01-28 Thread Markus Helbig
This is from Drools documentation

Example 6.36. or with binding

pensioner : (or Person( sex == "f", age > 60 )
Person( sex == "m", age > 65 ) )

Explicit binding on each Pattern is also allowed.

(or pensioner : Person( sex == "f", age > 60 )
pensioner : Person( sex == "m", age > 65 ) )


but trying to get this to work resolves in:

[60,8]: unknown:60:8 Unexpected token 'or'[62,8]: unknown:62:8
mismatched token: [EMAIL PROTECTED],2279:2291='Person',<7>,62:8]; expecting type
RIGHT_PAREN[62,81]: unknown:62:81 mismatched token:
[EMAIL PROTECTED],2352:2352=')',<12>,62:81]; expecting type THEN

Any ideas (using Drools 4.0.4)?

Cheers

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


Re: [rules-users] OR

2008-01-28 Thread Markus Helbig
ok this works, BUT using a DSL it fails again.

DSL:

[condition][]is a Person=Person()
[condition][]- female=sex == "f"
[condition][]- male=sex == "f"
[condition][]- age {value}=age=={value}

DSLR:

rule
when
 ($person: is a Person
   - male
   - age 60
 or
 $person: is a Person
   - female
   - age 70)
then
end

resolves to:
|
   \/
 ($person: Person( , sex="m", age == 60)
 or
  $person: Person(sex="f", age == 70))


the "," seems to be the problem ..

Cheers

Markus

2008/1/28, Krishnan Sivaramakrishna Iyer <[EMAIL PROTECTED]>:
>
> Hi Markus,
>
> can u try this please ?
>
> (pensioner : Person( sex == "f", age > 60 )
>  or pensioner : Person( sex == "m", age > 65 ) )
>
> -Krishnan
>
> Markus Helbig wrote:
> > This is from Drools documentation
> >
> > Example 6.36. or with binding
> >
> > pensioner : (or Person( sex == "f", age > 60 )
> > Person( sex == "m", age > 65 ) )
> >
> > Explicit binding on each Pattern is also allowed.
> >
> > (or pensioner : Person( sex == "f", age > 60 )
> > pensioner : Person( sex == "m", age > 65 ) )
> >
> >
> > but trying to get this to work resolves in:
> >
> > [60,8]: unknown:60:8 Unexpected token 'or'[62,8]: unknown:62:8
> > mismatched token: [EMAIL PROTECTED],2279:2291='Person',<7>,62:8]; expecting 
> > type
> > RIGHT_PAREN[62,81]: unknown:62:81 mismatched token:
> > [EMAIL PROTECTED],2352:2352=')',<12>,62:81]; expecting type THEN
> >
> > Any ideas (using Drools 4.0.4)?
> >
> > Cheers
> >
> > Markus
> > ___
> > 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] OR

2008-02-05 Thread Markus Helbig
No solution for the problem below?

Ok so the question is: Is it possible to combine DSL language and DSRL
language in a DSLR file?

2008/1/28, Markus Helbig <[EMAIL PROTECTED]>:
> ok this works, BUT using a DSL it fails again.
>
> DSL:
>
> [condition][]is a Person=Person()
> [condition][]- female=sex == "f"
> [condition][]- male=sex == "f"
> [condition][]- age {value}=age=={value}
>
> DSLR:
>
> rule
> when
>  ($person: is a Person
>- male
>- age 60
>  or
>  $person: is a Person
>- female
>- age 70)
> then
> end
>
> resolves to:
> |
>\/
>  ($person: Person( , sex="m", age == 60)
>  or
>   $person: Person(sex="f", age == 70))
>
>
> the "," seems to be the problem ..
>
> Cheers
>
> Markus
>
> 2008/1/28, Krishnan Sivaramakrishna Iyer <[EMAIL PROTECTED]>:
> >
> > Hi Markus,
> >
> > can u try this please ?
> >
> > (pensioner : Person( sex == "f", age > 60 )
> >  or pensioner : Person( sex == "m", age > 65 ) )
> >
> > -Krishnan
> >
> > Markus Helbig wrote:
> > > This is from Drools documentation
> > >
> > > Example 6.36. or with binding
> > >
> > > pensioner : (or Person( sex == "f", age > 60 )
> > > Person( sex == "m", age > 65 ) )
> > >
> > > Explicit binding on each Pattern is also allowed.
> > >
> > > (or pensioner : Person( sex == "f", age > 60 )
> > > pensioner : Person( sex == "m", age > 65 ) )
> > >
> > >
> > > but trying to get this to work resolves in:
> > >
> > > [60,8]: unknown:60:8 Unexpected token 'or'[62,8]: unknown:62:8
> > > mismatched token: [EMAIL PROTECTED],2279:2291='Person',<7>,62:8]; 
> > > expecting type
> > > RIGHT_PAREN[62,81]: unknown:62:81 mismatched token:
> > > [EMAIL PROTECTED],2352:2352=')',<12>,62:81]; expecting type THEN
> > >
> > > Any ideas (using Drools 4.0.4)?
> > >
> > > Cheers
> > >
> > > Markus
> > > ___
> > > 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] OR

2008-02-05 Thread Markus Helbig
I know that it results in two rules, that's currently my workaround to
write more rules. But for the "real" users (not the developer) it my
be easier to read with "or".

I'll have a look at the drools source and try to fix it ...

2008/2/5, Mark Proctor <[EMAIL PROTECTED]>:
>
>  Markus Helbig wrote:
>  ok this works, BUT using a DSL it fails again.
>
> DSL:
>
> [condition][]is a Person=Person()
> [condition][]- female=sex == "f"
> [condition][]- male=sex == "f"
> [condition][]- age {value}=age=={value}
>
> DSLR:
>
> rule
>  when
>  ($person: is a Person
>  - male
>  - age 60
>  or
>  $person: is a Person
>  - female
>  - age 70)
>  then
> end
>
> resolves to:
>  |
>  \/
>  ($person: Person( , sex="m", age == 60)
>  or
>  $person: Person(sex="f", age == 70))
>
>
> the "," seems to be the problem ..
>
>  I'm betting 'or' isn't doing what you think it's going? Conditional Element
> 'or' results in sub rule generation, each rule is total separate, so your
> above rule will result in two rules, both of which can match and fire if
> satisfied. I'm guessing its the 'or' that is screwing up the parsing with
> the extra quotation at the front? Can you open a jira for this?
>
>
>  Cheers
>
> Markus
>
> 2008/1/28, Krishnan Sivaramakrishna Iyer <[EMAIL PROTECTED]>:
>
>
>  Hi Markus,
>
> can u try this please ?
>
> (pensioner : Person( sex == "f", age > 60 )
>  or pensioner : Person( sex == "m", age > 65 ) )
>
> -Krishnan
>
> Markus Helbig wrote:
>
>
>  This is from Drools documentation
>
> Example 6.36. or with binding
>
> pensioner : (or Person( sex == "f", age > 60 )
>  Person( sex == "m", age > 65 ) )
>
> Explicit binding on each Pattern is also allowed.
>
> (or pensioner : Person( sex == "f", age > 60 )
>  pensioner : Person( sex == "m", age > 65 ) )
>
>
> but trying to get this to work resolves in:
>
> [60,8]: unknown:60:8 Unexpected token 'or'[62,8]: unknown:62:8
> mismatched token: [EMAIL PROTECTED],2279:2291='Person',<7>,62:8];
> expecting type
> RIGHT_PAREN[62,81]: unknown:62:81 mismatched token:
> [EMAIL PROTECTED],2352:2352=')',<12>,62:81]; expecting type THEN
>
> Any ideas (using Drools 4.0.4)?
>
> Cheers
>
> Markus
> ___
> 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] Upgrade 4.0.4 to 4.0.5 failed !?

2008-03-20 Thread Markus Helbig
Dear Drools users,

i tried to replace Drools 4.0.4 with 4.0.5 and know i get the following errors:

[20.03.08 09:21:24:100 CET] 0036 SystemOut O 2008-03-20
09:21:24 XXX  ERROR Exception executing predicate
[EMAIL PROTECTED] -
org.drools.RuntimeDroolsException: Exception executing predicate
[EMAIL PROTECTED]
org.drools.RuntimeDroolsException: Exception executing predicate
[EMAIL PROTECTED]
   at 
org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:216)
   at org.drools.rule.OrConstraint.isAllowed(OrConstraint.java:50)
   at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:137)
   at 
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:318)
   at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
   at 
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
   at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
   at 
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
   at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
   at 
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:318)
   at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)
   at org.drools.reteoo.Rete.assertObject(Rete.java:175)
   at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
   at 
org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
   at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:915)
   at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:887)
   at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:688)

Caused by:
java.lang.ClassCastException:
org/drools/rule/AbstractCompositeConstraint$MultiFieldConstraintContextEntry
incompatible with
org/drools/rule/PredicateConstraint$PredicateContextEntry
   at 
org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:209)
   at org.drools.rule.OrConstraint.isAllowed(OrConstraint.java:50)
   at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:137)
   at 
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:318)
   at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
   at 
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
   at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
   at 
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
   at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
   at 
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:318)
   at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)
   at org.drools.reteoo.Rete.assertObject(Rete.java:175)
   at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
   at 
org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
   at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:915)
   at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:887)
   at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:688)

What do i have to change? Do i miss sth important?

Cheers

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


[rules-users] Running through Collection using DSL

2008-04-02 Thread Markus Helbig
Hi,

i'd like to do the following in consequence:


for (Iterator it = $collection.iterator(); it.hasNext(); $item = it.next()) {
  System.out.println($item);
}

But as always i'd like to use a DSL

[consequence][]For each {item} from {collection}=for (Iterator it =
{collection}.iterator(); it.hasNext(); {item} = it.next()) {
[consequence][]End=}

The Rule:

For each $item from $pli.getItems()
Show $item
End


The DRL Viewer exactly shows what i want to have. But compiling any
rulefile expanding this DSL (also the consequences are not used)
resolve into following errors:

line 68:0 mismatched character '' expecting '"'
[0,-1]: unknown:0:-1 mismatched token: [EMAIL PROTECTED],0:0='',<-1>,0:-1]; expecting type END

or

line 131:80 required (...)+ loop did not match anything at character '+'
line 15:74 no viable alternative at character '\'

The reason theems to be

[consequence][]End=}

But why?? Any suggestions, thans very much in advance

Cheers

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


[rules-users] anonsvn down?

2008-04-04 Thread Markus Helbig
Hi,

i could not connect to the anonymous svn with subclipse plugin?

  RA layer request failed
svn: PROPFIND request failed on '/labs/jbossrules/trunk'
svn: PROPFIND of '/labs/jbossrules/trunk': could not connect to server
(http://anonsvn.labs.jboss.com)

Cheers

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


Re: [rules-users] Unable to fire Rules

2008-04-04 Thread Markus Helbig
Hi,

your rules represent the following Java Code (the system.out are just
to see the result of matches)

public static void main(String[] args)
{
// You're rule

System.out.println("ABC-834".matches("ABC-834-test-100.edi")); 
//false
System.out.println("XYZ-834".matches("ABC-834-test-100.edi"));  
// false
System.out.println("834".matches("ABC-834-test-100.edi"));  // 
false

so it could never work  

but maybe this is what you want to have


// m.fileName matches .*+fileMask+.*



System.out.println("ABC-834-test-100.edi".matches(".*ABC-834.*")); //true

System.out.println("ABC-834-test-100.edi".matches(".*XYZ-834.*"));
//false, if this should also be true because fo the 834 you have to
use regex grouping with an optional group before the -
System.out.println("ABC-834-test-100.edi".matches(".*834.*")); 
//true
}

Cheers

Markus

On Fri, Apr 4, 2008 at 9:28 AM, hanumesh.m <[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
>   I am inserting message(fileName, fromQ,toQ,transType) to WorkingMemory.
>  fileName as "ABC-834-test-100.edi"
>
>   I am inserting 3 instances of TrasactionVO's to workingmemory as follows:
>   TransactionVO transVO = new TransactionVO("ABC-834", "ABC.834.EDI",
>  "ABC.834.XML", "834");
>   TransactionVO transVO1 = new TransactionVO("XYZ-834", "XYZ.834.EDI",
>  "XYZ.834.XML", "834");
>   TransactionVO transVO2 = new TransactionVO("834", "INBOUND.834.EDI",
>  "INBOUND.834.XML", "834");
>
>   In drl, which ever object of TransactionVO matches the fileName of Message,
>  then update Message's rest of the details with TransactionVO. But the rules
>  are not getting fired.
>
>   Follewed is the testCase and .drl file along with FactObjects.
>
>  TestCase:
>  -
>  package com.sample;
>
>  import java.io.InputStreamReader;
>  import java.io.Reader;
>
>  import org.drools.FactException;
>  import org.drools.RuleBase;
>  import org.drools.RuleBaseFactory;
>  import org.drools.WorkingMemory;
>  import org.drools.compiler.PackageBuilder;
>  import org.drools.rule.Package;
>  import com.sample.MessageEA;
>  import com.sample.TransactionVO;
>
>  /**
>   * This is a sample file to launch a rule package from a rule source file.
>   */
>  public class DroolsTest2 {
>
> public static final void main(String[] args) {
> try {
>
> //load up the rulebase
> RuleBase ruleBase = readRule();
> WorkingMemory workingMemory = ruleBase.newStatefulSession();
> MessageEA messageEA = new MessageEA();
> messageEA.setFileName("ABC-834-test-100.edi");
> workingMemory.insert( messageEA );
>
> TransactionVO transVO = new TransactionVO("ABC-834",
>  "ABC.834.EDI", "ABC.834.XML", "834");
> TransactionVO transVO1 = new TransactionVO("XYZ-834",
>  "XYZ.834.EDI", "XYZ.834.XML", "834");
> TransactionVO transVO2 = new TransactionVO("834",
>  "INBOUND.834.EDI", "INBOUND.834.XML", "834");
> workingMemory.insert( transVO );
> workingMemory.insert( transVO1 );
> workingMemory.insert( transVO2);
> try{
> workingMemory.fireAllRules();
> }catch (FactException e ){
> System.out.println("err: "+e.getMessage());
> }catch(Exception ee){
> System.out.println("Err2 : "+ee.getMessage());
> }
>
> System.out.println("fName: "+messageEA.getFileName());
> System.out.println("frQ: "+messageEA.getFromQ());
> System.out.println("toQ: "+messageEA.getToQ());
>
>
> } catch (Throwable t) {
> t.printStackTrace();
> }
> }
>
> /**
>  * Please note that this is the "low level" rule assembly API.
>  */
> private static RuleBase readRule() throws Exception {
> //read in the source
> Reader source = new InputStreamReader(
>  DroolsTest.class.getResourceAsStream( "/EATech.drl" ) );
>
> //optionally read in the DSL (if you are using it).
> //Reader dsl = new InputStreamReader(
>  DroolsTest.class.getResourceAsStream( "/mylang.dsl" ) );
>
> //Use package builder to build up a rule package.
> //An alternative lower level class called "DrlParser" can 
> also be used...
>
> PackageBuilder builder = new PackageBuilder();
>
> //this wil parse and compile in one step
> //NOTE: There are 2 methods here, the one argument one is for 
> normal DRL.
> builder.addPackageFromDrl( source );
>
> //Use the following instead of above if you are using a DSL:
>

[rules-users] Re: Running through Collection using DSL

2008-05-16 Thread Markus Helbig
Any suggestions?

Thanks for your help ...

Cheers

Markus

On Thu, Apr 3, 2008 at 8:22 AM, Markus Helbig <[EMAIL PROTECTED]> wrote:
> Hi,
>
> i'd like to do the following in consequence:
>
>
> for (Iterator it = $collection.iterator(); it.hasNext(); $item = it.next()) {
>  System.out.println($item);
> }
>
> But as always i'd like to use a DSL
>
> [consequence][]For each {item} from {collection}=for (Iterator it =
> {collection}.iterator(); it.hasNext(); {item} = it.next()) {
> [consequence][]End=}
>
> The Rule:
>
> For each $item from $pli.getItems()
>Show $item
> End
>
>
> The DRL Viewer exactly shows what i want to have. But compiling any
> rulefile expanding this DSL (also the consequences are not used)
> resolve into following errors:
>
> line 68:0 mismatched character '' expecting '"'
> [0,-1]: unknown:0:-1 mismatched token: [EMAIL PROTECTED],0:0=' text>',<-1>,0:-1]; expecting type END
>
> or
>
> line 131:80 required (...)+ loop did not match anything at character '+'
> line 15:74 no viable alternative at character '\'
>
> The reason theems to be
>
> [consequence][]End=}
>
> But why?? Any suggestions, thans very much in advance
>
> Cheers
>
> Markus
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Using global in LHS

2008-05-29 Thread Markus Helbig
Hi,

again a question, any body had success using globals in LHS?

Following DSL

[condition][]is a Item=Item()
[condition][]-is of type Advertisment=advertisment contains catId


rule
 when
$pli: is a Item
- is of type Advertisment
 then
// do whatever you want
end

catId is a member of Item
advertisment is a Integer[] array set as global

comiling ends with:

Unable to create Field Extractor for 'advertisment' of '[ClassObjectType

It works fine if advertisment is a member of Item, but i want to have
it as global ...

Cheers

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


Re: [rules-users] Using global in LHS

2008-05-30 Thread Markus Helbig
Hi,

also using memberOf results in: Unable to create Field Extractor for
'advertisment' of '[ClassObjectType

do i'll miss sth else?

Cheers

Markus

On Thu, May 29, 2008 at 2:48 PM, Jaroslaw Kijanowski
<[EMAIL PROTECTED]> wrote:
> Hi,
>  there are two issues:
> - the left side of contains needs to be filed of Item (it also needs to be a
> Collection or array)
> - in your case you should use "memberOf" to check if a field (catId) is a
> member of a Collection or array.
>
> see the docs for more info (6.5.2.1.1.3.1. Operators)
>
> However if you're going to use an array as your global, you will run into a
> CCE, because an array doesn't implement the Collection interface [1], [2].
> I'm not sure if this is a bug in drools or an expected "constraint", hence a
> bug in the docs.
> Anyway, your safe using a List.
>
> Cheers,
>  Jarek
>
> [1]
> drools-core/src/main/java/org/drools/base/evaluators/BaseMemberOfEvaluator.java
> (evaluate())
> [2] drools-core/src/main/java/org/drools/spi/FieldValue.java
>
>
> Markus Helbig wrote:
>>
>> Hi,
>>
>> again a question, any body had success using globals in LHS?
>>
>> Following DSL
>>
>> [condition][]is a Item=Item()
>> [condition][]-is of type Advertisment=advertisment contains catId
>>
>>
>> rule
>> when
>>$pli: is a Item
>>- is of type Advertisment
>> then
>>// do whatever you want
>> end
>>
>> catId is a member of Item
>> advertisment is a Integer[] array set as global
>>
>> comiling ends with:
>>
>> Unable to create Field Extractor for 'advertisment' of '[ClassObjectType
>>
>> It works fine if advertisment is a member of Item, but i want to have
>> it as global ...
>>
>> Cheers
>>
>> Markus
>> ___
>> 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] Consequence Restriction

2008-06-06 Thread Markus Helbig
Hi,

i have on DSL and several DSRL files. What i want to do is to restrict
the usage of consequence parts. Means

I have to possible kind of objects in my workingmemory, e.g. Item1 and Item2.

Item1 has a methode setValue1(), and Item2 setValue2()

my DSL has to possible consequence lines

[consequence][]set value1 {value} for {item}={item}.setValue1({value});
[consequence][]set value2 {value} for {item}={item}.setValue2({value});

so now you can use both consequences for the objects but you
shouldn't. currently at runtime an exception will occur. Is it
possible to check this fault at compile time?

Cheers

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


[rules-users] RuleFlow Groups and retraction

2008-06-17 Thread Markus Helbig
Hi,

one question about using ruleflows:

1. i have a ruleflow consisting of 2 Nodes
2. i insert 2 facts
3. the 2 facts match the condition in rule for the second node, so
when inserting an activation is generated
4. but the rule in the first node will retract one of the 2 facts
5. it seems the activation for the second node is not cancelled also i
do a retract in the rule
6. now the activation in second node tries to execute and results in a
NullpointerException

What do i do wrong?

Cheers

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


Re: [rules-users] RuleFlow Groups and retraction

2008-06-18 Thread Markus Helbig
i'll try to make a simple example and send it, currently i found a dirty hack.

Cheers

Markus

On Wed, Jun 18, 2008 at 2:13 PM, Kris Verlaenen
<[EMAIL PROTECTED]> wrote:
>> it seems the activation for the second node is not cancelled also i
>> do a retract in the rule
>
> The activation should have been removed from the ruleflow group.  I just
> tested this with a small example and I do not seem to be able to reproduce
> this error, the retracted object seems to have resulted in a removal of the
> activation from the ruleflow group in my example.
>
> If you could provide me with a simple, self-contained example showing the
> error (you could email it to me directly if you would like to keep it
> private) I'll take a look.
>
> Kris
> ___
> 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] RuleFlow Groups and retraction

2008-06-19 Thread Markus Helbig
Here the situtation in my application (small sample application works,
i checked that, so up to 99% there's a fault in my implementation but
currently i'm stuck, maybe someone has an idea what can be wrong):

-> startProcess results in 2 Activations

-> first: Fact 1 and Fact 2 on rulenode1
-> second: Fact1 and Fact 2 on rulenode2

-> firing

-> first activation retracts fact 2, so clearly second activation has
to be canceled

so i debugged my application and i clearly see that the activation on
rulenode2 is not canceled, the ReteTuple on rulenode2 is never fetched
from the nodememory to set to cancel ...

I checked my hashCode and equality methods but they seem to be ok.

The rules resolve to a very big rete network because of complicated
conditions. The conditions of rule1 and rule2 are nearly the same.

Anyone has an idea whatelse i can check to fix this issue,

any help is appreciated,

Cheers

Markus

BTW: the only thing i can't do is show my application, i'm also sure
no one wants to see a WebSphere EAR with lots of classes ...

On Wed, Jun 18, 2008 at 2:13 PM, Kris Verlaenen
<[EMAIL PROTECTED]> wrote:
>> it seems the activation for the second node is not cancelled also i
>> do a retract in the rule
>
> The activation should have been removed from the ruleflow group.  I just
> tested this with a small example and I do not seem to be able to reproduce
> this error, the retracted object seems to have resulted in a removal of the
> activation from the ruleflow group in my example.
>
> If you could provide me with a simple, self-contained example showing the
> error (you could email it to me directly if you would like to keep it
> private) I'll take a look.
>
> Kris
> ___
> 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] drools-eclipse sources?

2008-07-02 Thread Markus Helbig
Hi everybody,

where can i get the sources for drools-eclipse? I remember they were
in svn but currently i can't find them there.

Cheers

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