Re: [rules-users] JPA persistence for Drools Flow

2009-04-08 Thread Marc Dzaebel


Kris Verlaenen wrote:
> 
> Note that the model of the history information is different from the
> runtime model, and contains all the nodes that were triggered (and
> possibly completed). So new data gets added to this process instance log
> every time something new happens, there's no different versions there.
> 
If node states, process variables or the WM change (events), there should be
new rows in some history tables (which I call versions), even if
process/node refs won't change. However, I'm looking forward to your new
persistence option in the trunc.
-- 
View this message in context: 
http://www.nabble.com/JPA-persistence-for-Drools-Flow-tp22918819p22961161.html
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


Re: [rules-users] Explicit class cast in RHS

2009-04-08 Thread Edson Tirelli
   The RHS of rules contain semantic code based on the dialect you are
using. In your example, java. So, just cast it:

( (TypeA) p ).methodFromTypeA();

   []s
   Edson


2009/4/8 Alessandro Terrinoni 

>  Hello
>
> in my working memory I insert an object like this
>
> public class Foo{
>
> private IntType prop;
>
> ...
>
> }
>
> where IntType is a class, but in practice *prop* is either of type TypeA
> or TypeB, both extending the IntType class.
>
>
> then i have a rule like this:
>
> rule "abc"
>
> when
>
> Foo(p : prop, p.name == "propertyA")
>
> then
> // call some method defined only in the TypeA class
>
> end
>
>
> how do i explicitly cast p into a TypeA object to call the method defined
> only in that class?
>
> thanks in advance,
> Alessandro Terrinoni
> --
> Scegli fra più di 30 stazioni! Ascolta la radio su 
> Messenger
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
 Edson Tirelli
 JBoss Drools Core Development
 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] Vacation reply

2009-04-08 Thread nik_sharma75
Hey,how are you doing recently? I would like to introduce you a very good company and its website is www.welt188.com It can offer you all kinds of electronic products that you may be in need,such as laptops ,gps ,TV LCD,cell  phones,ps3,MP3/4,motorcycles and etc You can take some time to have a check ,there must be something interesting you 'd like to  purchase .The contact email: welt...@188.com  MSN: welt...@hotmail.com TEL:  0086+15110177918
Hope you can enjoy yourself in shopping from that company ! 

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


[rules-users] Vacation reply

2009-04-08 Thread nik_sharma75
Hey,how are you doing recently? I would like to introduce you a very good company and its website is www.welt188.com It can offer you all kinds of electronic products that you may be in need,such as laptops ,gps ,TV LCD,cell  phones,ps3,MP3/4,motorcycles and etc You can take some time to have a check ,there must be something interesting you 'd like to  purchase .The contact email: welt...@188.com  MSN: welt...@hotmail.com TEL:  0086+15110177918
Hope you can enjoy yourself in shopping from that company ! 

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


Re: [rules-users] Explicit class cast in RHS

2009-04-08 Thread David Sinclair
rule "abc"

when
 Foo($prop : prop)
 TypeA (this == $prop, name == "PropertyA")
then
...

2009/4/8 Alessandro Terrinoni 

>  Hello
>
> in my working memory I insert an object like this
>
> public class Foo{
>
> private IntType prop;
>
> ...
>
> }
>
> where IntType is a class, but in practice *prop* is either of type TypeA
> or TypeB, both extending the IntType class.
>
>
> then i have a rule like this:
>
> rule "abc"
>
> when
>
> Foo(p : prop, p.name == "propertyA")
>
> then
> // call some method defined only in the TypeA class
>
> end
>
>
> how do i explicitly cast p into a TypeA object to call the method defined
> only in that class?
>
> thanks in advance,
> Alessandro Terrinoni
> --
> Scegli fra più di 30 stazioni! Ascolta la radio su 
> Messenger
>
> ___
> 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] Explicit class cast in RHS

2009-04-08 Thread Alessandro Terrinoni

Hello

in my working memory I insert an object like this

public class Foo{
private IntType prop;

...
}

where IntType is a class, but in practice prop is either of type TypeA or 
TypeB, both extending the IntType class.


then i have a rule like this:

rule "abc"

when

Foo(p : prop, p.name == "propertyA")

then 
// call some method defined only in the TypeA class

end


how do i explicitly cast p into a TypeA object to call the method defined only 
in that class?

thanks in advance,
Alessandro Terrinoni
_
Chiama gratis dal tuo PC! Parla su Messenger
http://clk.atdmt.com/GBL/go/140630369/direct/01/___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Vacation reply

2009-04-08 Thread nik_sharma75
Hey,how are you doing recently? I would like to introduce you a very good company and its website is www.welt188.com It can offer you all kinds of electronic products that you may be in need,such as laptops ,gps ,TV LCD,cell  phones,ps3,MP3/4,motorcycles and etc You can take some time to have a check ,there must be something interesting you 'd like to  purchase .The contact email: welt...@188.com  MSN: welt...@hotmail.com TEL:  0086+15110177918
Hope you can enjoy yourself in shopping from that company ! 

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


[rules-users] Ruleflow loop until condition

2009-04-08 Thread Alessandro Terrinoni

Hello

I created a ruleflow like this one:
http://i41.tinypic.com/2efmctx.jpg

And this is the rule package (rules are demonstrative only and one per group, 
but later on more will be added in each group.

package package1

#list any import classes here.
...


#declare any global variables here
...


rule "start workflow"
salience 1000
when
eval (true)
then 
System.out.println("matchata regola start");
drools.getWorkingMemory().startProcess("rf_main");

end

rule "Preferenza"
ruleflow-group "modParams"
when
nRound : NumeroRound( n : numeroRound)
pw : PreferenceWrapper(round == n ,pref : preference)

then 
pw.setRound(n+1);
System.out.println("matchata regola pref");
System.out.println("preferenza: "+ pref.getName());

end

rule "query for results"

ruleflow-group "queryResult"
when
#conditions
nRound : NumeroRound(n : numeroRound)
then 
#actions
System.out.println("matchata regola query");
...
end

rule "fasulla"

ruleflow-group "fasullo"
when
eval (true)
then 
#actions
System.out.println("sei fasullo1");

end



In the ruleflow, the join node is XOR type.
Split node is XOR type and checks with the object NumeroRound and the variable 
numeroRound which is an int. If it is big enough it exits, else continue to 
"fasullo" group

the issue is that the matching goes through "modParams" group, then 
"queryResult" group, then "fasullo" group, but after that it freezes, instead 
of going angain in group "modParams". Note that it doesnt finish the execution, 
it waits something.

What is wrong with this ruleflow?

thanks in advance,
Alessandro Terrinoni

_
Chiama gratis dal tuo PC! Parla su Messenger
http://clk.atdmt.com/GBL/go/140630369/direct/01/___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users