Re: [rules-users] WorkflowProcessInstance in DRL

2011-02-28 Thread Gareth Evans
I'll try to make my questions less verbose:

1) When you change a flow variable what is the best way to update the
WorkflowProcessInstance object in working memory if you are using
subflows and hence have multiple WorkflowProcessInstances?

2) If I insert the WorkflowProcessInstance for both a parent flow and
child subflow and reference it in the LHS of a rule using
"processInstance : WorkflowProcessInstance()" I get activations for
both instances of the object. The documentation says that this should
only match the current process instance. Am I doing something wrong?

Cheers!
Gareth

On 25 February 2011 08:48, Gareth Evans  wrote:
> Hello,
>
> I am having some problems using WorkflowProcessInstance in rules. I
> have searched and not been able to find an answer to my question.
>
> I am attempting to use rule flows to define business processes and
> rules both in ruleflow groups to be executed on demand of the process
> and outside of a ruleflow group for "global" rules and to potentially
> direct the ruleflow(/process) is to run. Many of these processes are
> comprised of subprocesses which I have been using sub flows to model.
>
> I have used flow variables to store some minimal information about the
> process such as what the process ID corresponds to in the existing
> data model I am working with. My intent was so that I could use a
> single rule flow group in many rule flows to extract information from
> the database for the corresponding process ID in the working memory
> (this extraction would also depend on other facts in the working
> memory).
>
> I've inserted the WorkflowProcessInstance by using an action node in
> the "parent" process and it seems to work fine. My problem arises when
> I am then in a "child" process/subflow and try to invoke this single
> rule flow group with a different process ID in the flow variable,
> there are no activations. I think this happens because the
> WorkflowProcessInstance has not been updated in working memory so it
> will not know that there might be a new process ID stored in the flow
> variable (it has the same name in both flows as it is meant to
> represent the same thing).
>
> If I insert the WorkflowProcessInstance again in the sub flow I get
> activations in the rule flow group for facts in the working memory
> associated with both the parent and child sub flow which almost makes
> sense except for this:
>
> "We have added special logic to make sure that a variable
> processInstance of type WorkflowProcessInstance will only match to the
> current process instance and not to other process instances in the
> Working Memory."
>
> It seems that it is matching both instances of
> WorkflowProcessInstance. I use the convention of starting variable
> names from the LHS of a rule with a $ but I have tested it without and
> I get the same result. Is this expected behaviour?
>
> An alternative I've been trying to figure out is how to update the
> WorkflowProcessInstance in working memory in the child process. Since
> it is actually a different object I'm unsure how to do this. Should I
> retract all instances and then insert the current? Is there a way to
> do this more cleanly than looking through all working memory objects
> and checking their type in an action node?
>
> Finally (or perhaps firstly...), am I going about this correctly?
>
> Cheers,
> Gareth
>

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


Re: [rules-users] Unable to start drools-server 5.1.1 or 5.2.0.M1 under Tomcat 6.0.30

2011-02-28 Thread A R
I'm just using a stock build from http://www.jboss.org/drools/downloads.html,
and it has  defined in 5.1.1. When I remove it, I
just get a error on the next xml tag.

I tried again with the JBoss AS included with Drools Guvnor Standalone
5.2.0.M1, copying drools-5.2.0.M1-server.war to
jboss-5.1.0.GA/server/default/deploy/drools-server.war, but get the
following error:

14:19:57,160 INFO  [PersistenceUnitDeployment] Starting persistence unit
persistence.unit:unitName=#org.drools.grid
14:19:57,165 ERROR [AbstractKernelController] Error installing to Start:
name=persistence.unit:unitName=#org.drools.grid state=Create
java.lang.RuntimeException: Specification violation [EJB3 JPA 6.2.1.2] - You
have not defined a jta-data-source for a JTA enabled persistence context
named: org.drools.grid


On Mon, Feb 28, 2011 at 4:04 AM, Esteban Aliverti <
esteban.alive...@gmail.com> wrote:

> I'm not sure about this, but I think there is no need to define
>  any more. Please try to remove the definition and
> all its usages from knowledge-services.xml and see what happens. If somebody
> else could confirm this behaviour, please let us know.
>
> By the way, did you try to deploy drools-server in a JBoss AS?
>
> Best Regards,
>
> 
>
> Esteban Aliverti
> - Developer @ http://www.plugtree.com
> - Blog @ http://ilesteban.wordpress.com
>
>
> 2011/2/27 A R 
>
>> execution-node
>
>
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools and JBoss Seam proxies

2011-02-28 Thread Wolfgang Laun
But casting does not really change the class?

Besides, if
   class Proxy extends Pojo
you can still write your rules using Pojo and its fields, even if the
actual object is of type Proxy.

-W

On 28 February 2011 15:34, Tihomir Surdilovic  wrote:
> When you request components from Seam container, Seam wires those
> objects with interceptors completely wrapping it into a proxy. So yes,
> what you get is a proxy which has a different class signature than what
> the import statements define in your DRL. However since Seam uses Cglib
> to create these proxies, they end up being subclasses of the concrete
> class, and you should be able to simply cast them back before inserting
> into the WM.
>
> Hope this helps.
>
> Thanks.
> Tihomir
>
> On 2/27/11 2:52 AM, sherlock wrote:
>> Hi,
>>
>> a newbie question.
>>
>> I am asserting references to JBoss Seam beans (SFSB) as Drools facts and
>> it looks that the rule engine does not recognize them as instances of
>> the original bean POJO class - it looks that it sees the JBoss Seam proxies.
>>
>> When I use an intermediate non-Seam enabled wrapper POJO class which
>> wraps the Seam bean everything works, but now there will be an
>> additional need to maintain set of wrapper classes and in addition DRL
>> conditions code is cluttered with statements to access the JBoss Seam
>> beans...
>>
>> Surely I am missing something, but I cannot find out so far. Googling
>> didn't seem to find anything helpful.
>>
>> The environment is: Seam 2.2.0.GA, Drools 5.1.1
>>
>> Thank you in advance!
>>
>> sherlock
>> ___
>> 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] Drools and JBoss Seam proxies

2011-02-28 Thread Tihomir Surdilovic
When you request components from Seam container, Seam wires those 
objects with interceptors completely wrapping it into a proxy. So yes, 
what you get is a proxy which has a different class signature than what 
the import statements define in your DRL. However since Seam uses Cglib 
to create these proxies, they end up being subclasses of the concrete 
class, and you should be able to simply cast them back before inserting 
into the WM.

Hope this helps.

Thanks.
Tihomir

On 2/27/11 2:52 AM, sherlock wrote:
> Hi,
>
> a newbie question.
>
> I am asserting references to JBoss Seam beans (SFSB) as Drools facts and
> it looks that the rule engine does not recognize them as instances of
> the original bean POJO class - it looks that it sees the JBoss Seam proxies.
>
> When I use an intermediate non-Seam enabled wrapper POJO class which
> wraps the Seam bean everything works, but now there will be an
> additional need to maintain set of wrapper classes and in addition DRL
> conditions code is cluttered with statements to access the JBoss Seam
> beans...
>
> Surely I am missing something, but I cannot find out so far. Googling
> didn't seem to find anything helpful.
>
> The environment is: Seam 2.2.0.GA, Drools 5.1.1
>
> Thank you in advance!
>
> sherlock
> ___
> 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] Drools.NET active?

2011-02-28 Thread Sean Su
Thanks both of you.

We found the Microsoft workflow rule engine is the good candidate within the
.NET framework.

Thanks

Sean

On Mon, Feb 28, 2011 at 5:56 AM, FrankVhh wrote:

> Hi,
>
> Drools .NET indeed isn't active any more and using it isn't encouraged.
>
> However there are some alternatives to use Drools and .NET together.
>
> Either use IKVM, which is some sort of conversion tool. On this forum, a
> person called Corneil has tried it with success.
>
> Or use jni4net, which is a bridge between Java and .NET, developed by Pavel
> Savara. A sample project of drools is available on via his website.
>
> http://zamboch.blogspot.com/
>
> I have used both methods and succeeded twice in generating results. Given
> the choicce, I think a jnibridge is preferable over IKVM. Imo, it allows
> for
> a bit more flexibility and it seems to perform a bit faster as well.
>
> Caution, these info is based on limited testing :-)
>
> Good luck.
>
> Regards,
> Frank
>
>
> ge0ffrey wrote:
> >
> > No one at JBoss works on Drools.NET, as far as I know.
> >
> > It looks indeed like the project is inactive and it's been forked from
> > the java Drools long ago.
> > If you need to connect to Drools from .NET, you might better off looking
> > at the camel integration... or switch to java :)
> >
> > Op 25-02-11 15:01, Sean Su schreef:
> >> Does anyone know if Drools.NET is something Drools team in JBoss works
> >> on? Or it is maintained by other team which just named the product
> >> Drools.NET.
> >>
> >> The website and document seem to me that the project is not active.
> >> Does anyone know?
> >>
> >> Thanks
> >>
> >> Sean
> >>
> >> --
> >> "But beware of the Dark Side. Anger, fear, aggression - the Dark Side
> >> of the Force are they." -Yoda
> >>
> >>
> >> ___
> >> rules-users mailing list
> >> rules-users@lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/rules-users
> >
> > --
> > With kind regards,
> > Geoffrey De Smet
> >
> >
> > ___
> > rules-users mailing list
> > rules-users@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
>
>
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/Drools-NET-active-tp2575350p2594095.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
>



-- 
"But beware of the Dark Side. Anger, fear, aggression - the Dark Side of the
Force are they." -Yoda
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Unable to start drools-server 5.1.1 or 5.2.0.M1 under Tomcat 6.0.30

2011-02-28 Thread Esteban Aliverti
I'm not sure about this, but I think there is no need to define
 any more. Please try to remove the definition and
all its usages from knowledge-services.xml and see what happens. If somebody
else could confirm this behaviour, please let us know.

By the way, did you try to deploy drools-server in a JBoss AS?

Best Regards,



Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


2011/2/27 A R 

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


Re: [rules-users] Drools.NET active?

2011-02-28 Thread FrankVhh
Hi,

Drools .NET indeed isn't active any more and using it isn't encouraged.

However there are some alternatives to use Drools and .NET together.

Either use IKVM, which is some sort of conversion tool. On this forum, a
person called Corneil has tried it with success.

Or use jni4net, which is a bridge between Java and .NET, developed by Pavel
Savara. A sample project of drools is available on via his website.

http://zamboch.blogspot.com/

I have used both methods and succeeded twice in generating results. Given
the choicce, I think a jnibridge is preferable over IKVM. Imo, it allows for
a bit more flexibility and it seems to perform a bit faster as well.

Caution, these info is based on limited testing :-)

Good luck.

Regards,
Frank


ge0ffrey wrote:
> 
> No one at JBoss works on Drools.NET, as far as I know.
> 
> It looks indeed like the project is inactive and it's been forked from 
> the java Drools long ago.
> If you need to connect to Drools from .NET, you might better off looking 
> at the camel integration... or switch to java :)
> 
> Op 25-02-11 15:01, Sean Su schreef:
>> Does anyone know if Drools.NET is something Drools team in JBoss works 
>> on? Or it is maintained by other team which just named the product 
>> Drools.NET.
>>
>> The website and document seem to me that the project is not active. 
>> Does anyone know?
>>
>> Thanks
>>
>> Sean
>>
>> -- 
>> "But beware of the Dark Side. Anger, fear, aggression - the Dark Side 
>> of the Force are they." -Yoda
>>
>>
>> ___
>> rules-users mailing list
>> rules-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> -- 
> With kind regards,
> Geoffrey De Smet
> 
> 
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> 


-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Drools-NET-active-tp2575350p2594095.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