Re: [rules-users] [rules-dev] Technical Rules

2010-09-14 Thread Leonardo Gomes
I might be wrong, but I think DRL - BRL is still not possible.


Just had a look at org.drools.ide.common.server.util.BRDRLPersistence, and
we have the following:

public RuleModel unmarshal(String str) {
 throw new UnsupportedOperationException(
 Still not possible to convert pure DRL to RuleModel);
 }


Leo.

2010/9/14 Wolfgang Laun wolfgang.l...@gmail.com

 There is a short hint in the Expert Manual, subsection 4.11.3, where
 conversion between DRL and XML using classes such as DrlParser and XmlDumper
 is discussed. A .brk is just the native Drools XML format.

 -W


 On 14 September 2010 01:17, Leonardo Gomes leonardo.f.go...@gmail.comwrote:

 Hi Amisha,

 You should use the user's list: rules-users@lists.jboss.org for this
 sort of question.

 AFAIK, no you can't convert technical rules (manually written drl) to
 business rules (.brl) generated with the graphical editor using Guvnor.

 Cheers,
 Leo.


 On Mon, Sep 13, 2010 at 10:42 PM, apatel apa...@ondeckcapital.comwrote:


 Hi,

 Is it possible to port Technical Rules in Drools to Business Rules? Is
 the
 procedure posted somewhere?

 Also is it possible to apply Drools Categories to Technical Rules?

 Thanks for your help,
 Amisha
 --
 View this message in context:
 http://drools-java-rules-engine.46999.n3.nabble.com/Technical-Rules-tp1468563p1468563.html
 Sent from the Drools - Dev mailing list archive at Nabble.com.
 ___
 rules-dev mailing list
 rules-...@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-dev



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



 ___
 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] User Permissions - at rules/DSL level possible?

2010-09-14 Thread Vignesh

Hi,

I am aware that we can provide user permissions at Package/Category level
and restrict the users, but i want to know whether its possible to restrict
the users by providing permissions at rules/DSL level, because we dont want
the user to modify the DSL which would be defined by the Admin and other
users would simply be using the entries in DSL for defining their rules. 

Is there any way to achieve this kind of permissions and also what is the
minimum granular level of permission that we can restrict a user from? if
any one has tried this kindly help me in this regard.

Thanks,
Vignesh
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/User-Permissions-at-rules-DSL-level-possible-tp1471856p1471856.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] Verify if an objects attribute exists

2010-09-14 Thread Mark Proctor
  Pattern( field != null, eval( someFunc( field ) ) )

Mark
On 14/09/2010 05:18, lnguyen wrote:
 Sorry here is some additional details...I hope I'm not making this sound more
 complicated than it really is but I am attempting to restrict access to view
 an account based on the logged in user.

 public class User
 {
   private Long id;

   ...
   
   private UserProfile userProfile;

 }


 public class UserProfile
 {

   private Long id;

   
   
   private User supervisor;

 }


 So I created a function called isUserMatching to determine if the
 currentUser is looking at their own account or if their supervisor is
 looking at an employees account:

 function boolean isUserMatching(User user)
 {
  User currentUser = (User) Component.getInstance(currentUser);

  User supervisor = (User) user.getUserProfile().getSupervisor();

  boolean result = false;  


  if(currentUser == user)
  {
  System.out.println(## currentUser = user is
 TRUE #);
  result = true;
  }
  else if((supervisor != null)
 (currentUser.getId().equals(supervisor.getId(
  {
   System.out.println(## currentUser = supervisor is 
 TRUE
 #);
  result = true;
  }
  else
  {
  System.out.println(## currentUser/supervisor !=
 user is FALSE #);
  }

  return result;


 }

 This function works as desired but not all users have a supervisor. What I'd
 like to know is how can I check if a supervisor is null so that I can
 prevent passing null values into functions?

 Doing this eval (isUserMatching($supervisor)) results in an runtime error
 of course when there is no supervisor.


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


Re: [rules-users] Drools 5.1.1 KnowledgeAgent and SecurityRules

2010-09-14 Thread Robert Morse
This is good to know.  I was just in the middle of converting to 5.1.1 but will 
not stop.  By the way the 5.1.1 version of Guvnor appears to be unstable under 
JBoss 5.1.
Verify operations just hang.  Error messages (with no message) get displayed, 
Inability to sign out, etc.   
Back to 5.0.1.

On Sep 9, 2010, at 7:53 AM, Tihomir Surdilovic wrote:

  Inguyen, I assume you are using Seam2 in your client app. In Seam 
 2.2.0.CR1 (http://relation.to/Bloggers/Seam220CR1Released ) we replaced 
 the Drools 4 jars with Drools 5.0 jars, however the internal integration 
 was not changed to use the Drools 5 API.
 Raise a JBSEAM (https://jira.jboss.org/browse/JBSEAM) Jira and we can 
 see what can be done, otherwise now your option is is to pull from 
 Guvnor 5.0.1 in your Seam applications until Seam3 becomes available as 
 this will be a non-issue in our Drools module for Seam3 
 (http://seamframework.org/Seam3).
 
 Tihomir
 On 9/9/10 9:21 AM, lnguyen wrote:
 I recently upgraded from drools guvnor 5.0.1 to 5.1.1 but I haven't seen any
 examples on how to change securityRules now that RuleBase has been replaced
 with KnowledgeBase.
 
 Originally I had...
 
 drools:rule-agent
 name=securityRules
 
 url=https://127.0.0.1:7002/drools-guvnor-5.0.1/org.drools.guvnor.Guvnor/package/Security/LATEST;
 local-cache-dir=/tmp/
 poll=60
 auto-create=true/
 
 security:rule-based-permission-resolver security-rules=#{securityRules}/
 
 I tried to leave this way but then i get an error but the 5.1.1 guvnor
 secures the URL so I get the following: RuleAgent(default) EXCEPTION
 Response: '401: Unauthorized' for url: ...
 
 How do configure the application security to use the KnowledgeBase?
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

The human mind is an iterative processor, it never does anything right the 
first time.  What it does well is to make improvements on every iteration 
(deMarco)




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


Re: [rules-users] [rules-dev] Technical Rules

2010-09-14 Thread Wolfgang Laun
You are right, of course.  The BRL editor has its own XML format.

I just wonder whether going through a DrlParser - DrlDumper cycle might
produce a sufficiently well-behaved DRL text that could be easily enough
transformed to the BRL XML. But nothing of this is in the stable API, so
it would be wobbly in more than one way.

-W


2010/9/14 Leonardo Gomes leonardo.f.go...@gmail.com

 I might be wrong, but I think DRL - BRL is still not possible.


 Just had a look at org.drools.ide.common.server.util.BRDRLPersistence, and
 we have the following:

 public RuleModel unmarshal(String str) {
 throw new UnsupportedOperationException(
 Still not possible to convert pure DRL to RuleModel);
 }


 Leo.

 2010/9/14 Wolfgang Laun wolfgang.l...@gmail.com

 There is a short hint in the Expert Manual, subsection 4.11.3, where
 conversion between DRL and XML using classes such as DrlParser and XmlDumper
 is discussed. A .brk is just the native Drools XML format.

 -W


 On 14 September 2010 01:17, Leonardo Gomes leonardo.f.go...@gmail.comwrote:

 Hi Amisha,

 You should use the user's list: rules-users@lists.jboss.org for this
 sort of question.

 AFAIK, no you can't convert technical rules (manually written drl) to
 business rules (.brl) generated with the graphical editor using Guvnor.

 Cheers,
 Leo.


 On Mon, Sep 13, 2010 at 10:42 PM, apatel apa...@ondeckcapital.comwrote:


 Hi,

 Is it possible to port Technical Rules in Drools to Business Rules? Is
 the
 procedure posted somewhere?

 Also is it possible to apply Drools Categories to Technical Rules?

 Thanks for your help,
 Amisha
 --
 View this message in context:
 http://drools-java-rules-engine.46999.n3.nabble.com/Technical-Rules-tp1468563p1468563.html
 Sent from the Drools - Dev mailing list archive at Nabble.com.
 ___
 rules-dev mailing list
 rules-...@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-dev



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



 ___
 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] Problem with DroolsFlow transaction

2010-09-14 Thread HMandic

Anyone?

I found out that JBoss AS doesn't know which TransactionManager to use here.
I have:

Environment env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, myEmFactory);
env.set(EnvironmentName.TRANSACTION_MANAGER, );
session = JPAKnowledgeService.newStatefulKnowledgeSession(knowledgeBase,
null, env);

So, what goes in place of  in EJB3 application on JBoss 5.1.0.GA?

In persistence.xml I have this line

property name=hibernate.transaction.manager_lookup_class
value=org.hibernate.transaction.JBossTransactionManagerLookup/

in both persistence units (one for org.drools.persistence.jpa and the
other for org.drools.task).


I also tried this:

TransactionManager tm = (TransactionManager) new
InitialContext().lookup(java:/TransactionManager);
env.set(EnvironmentName.TRANSACTION_MANAGER, tm);

but it doesn't work either.

Is this something obvious that I don't see?

Please help, I'm stuck on this for too long...
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Problem-with-DroolsFlow-transaction-tp1439637p1473330.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


[rules-users] Drools reflection problem.

2010-09-14 Thread tom ska
Hi,
in my package definition I have two kinds of facts. I use stateFullSession
and I send to ksession facts of two different types. For each type I have
one rule using only this type. So what I am doing is processing two
different fact's types in one session. I start fireAllRules, and I know it
fires good rules, and all is working fine. But problem appears later - when
I want to get my fact's back using Drools reflection API.

With first type (facts of first type) all is working fine, but when I change
factType object to point into another type (the second one), I get
problems:

[ERROR] package.Type2 cannot be cast to package.Type2
java.lang.reflect.InvocationTargetException

It is thrown when I call

kbase.getFactType(package, Type2).get(factObject , filed1_name);

I know that factObject is good, because when I use syso (factObject) I get
what I want.

What surprises me is when I call it for Type1 it works. Also, if I process
in ksession only one fact type using my code, I don't get this error (for
first and second fact type).

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


[rules-users] Performance differeneces using before or after

2010-09-14 Thread Tina Vießmann

 Hi,

I've mentioned the test case I'm working on before. It's: If a certain 
value exceeds a limit more than X times within Y minutes/hours, do 
something.

  ~ Count = X  ,  time = Y

During a talk with other developers it came up that by intuition the men 
would have chosen a other approach than the women. We can not agree if 
in Drools both approaches are the same in performance or if one is more 
performant.


   Male approach: If a new event with a limit violation is received,
   check if within the last time Y already X events with limit
   violations are contained in the knowledge base .

   Female approach: If a new event with a limit violation is received,
   check if the following events contain X events with limit violation.
   This is limited to a monitoring time of /maximal /Y. (If there have
   been X events registered, before the time Y is elapsed, the window
   will be closed right away.)


In code with Y = 1h it would be:
Male:

   // determine new event as $triggeringEvent
   $otherEvent : Value (this before[0ms,1h] $triggeringEvent)

Female:

   // determine event that opened the window as $triggeringEvent
   $otherEvent : Value (this after[0ms,1h] $triggeringEvent)


This is just a extract so that that the comments are in fact 
meaningless. The focus lies on _before_ and _after_.



Is one solution more efficient?


Thanks! :)
Tina

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


[rules-users] How to remove a persisted session from the database ?

2010-09-14 Thread Gustavo Tenrreiro
Hi,

I am using persistence, and since the sessions don't seem to have a
standard way of getting removed from the database when they are not
needed anymore, I am wondering how to do that.
I am using JPA but if I call :

em.remove(someSessionInfo);

where em is the JPA EntityManager, that does not remove the entry from
the database.

if I try to use a Query returned by the em.createQuery(delete from
SessionInfo where id = 1) it complains that it needs a transaction,
and since I don't know how to get around the issue I am stuck.

Any help would be appreciated.

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


[rules-users] Guvnor declarative model and ASM deserialization

2010-09-14 Thread Abdel Dridi
In my application I am using the following flow:

   1. I am using Guvnor to allow customer to define business event structure
   through the Declarative Model feature.
   2. After defining the model, customers write rules and package them into
   a snapshot where my event-driven-application-server can see.
   3. My server load successfully the customer packages (couple hundreds of
   them).
   4. Customer uses HornetQ client to produce events that respects the model
   that has been created using Guvnor.
   5. I have HornetQ listeners in my application that listens to new events.
   6. HornetQ listeners tries to deserialize the message bytes to an event
   object to insert it to the customer ksession

The problem is that my server classloader has no idea about the model, so I
use ASM to inject the class definition when ClassNotFoundException is thrown
however this was not enough as serialVersionUID of client side object is
going to be different from the ASM default injected one.

I know some of you might say why cant I use the same static final
serialVersionUID in the client side as well as in the server side - the
answer is I want to give control to customers to define whatever business
model they want using Guvnor.
Using jar file model will not give freedom to business users that Guvnor
provide.

I am wondering if some of you were facing the same issue while using the
fusion message queue streaming gate?

I am thinking to extend the Java ObjectInputStream and implement my own
deserialization.
Could Drools ksession accept bytes along side with objects (I mean in the
future)  - Something like; ksession.insert(bytes)

Any ideas?

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


[rules-users] Guvnor war 5.1

2010-09-14 Thread d.mridul

We are currently using drools guvnor 5.0.1 deplyed in Weblogic 10.3. We
needed to multithread the call to the rule engine. We were facing the issue
of Concurrent modification as described in
https://jira.jboss.org/browse/JBRULES-1888. 
It seemed to have been fixed and we tried upgrading it to 5.1. I updated the
jars in the client side to 5.1 and that resolved the problem of the
concurrent modification exception. We thought we would also upgrade the
drools-guvnor.war to 5.1.However it seems that access to the rules package
http://localhost:7001/drools-guvnor/org.drools.guvnor.Guvnor/package/usage/LATEST.drl
returned 401(HTTP) response code. The earlier 5.0.1 didn't require
authentication. And the credentials are the same with which the weblogic
domain is created. 
I am new to drools so not sure of a lot of things.
Is there some configuration change required to disable authentication. 
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Guvnor-war-5-1-tp1474465p1474465.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] Performance differeneces using before or after

2010-09-14 Thread Edson Tirelli
   For a pair of events, the performance will be the same with
before/after. If you have more than 2, though, best would be to use
sliding windows.

   Edson

2010/9/14 Tina Vießmann tviessm...@stud.hs-bremen.de:
 Hi,

 I've mentioned the test case I'm working on before. It's: If a certain value
 exceeds a limit more than X times within Y minutes/hours, do something.
   ~ Count = X  ,  time = Y

 During a talk with other developers it came up that by intuition the men
 would have chosen a other approach than the women. We can not agree if in
 Drools both approaches are the same in performance or if one is more
 performant.

 Male approach: If a new event with a limit violation is received, check if
 within the last time Y already X events with limit violations are contained
 in the knowledge base .

 Female approach: If a new event with a limit violation is received, check if
 the following events contain X events with limit violation. This is limited
 to a monitoring time of maximal Y. (If there have been X events registered,
 before the time Y is elapsed, the window will be closed right away.)

 In code with Y = 1h it would be:
 Male:

 // determine new event as $triggeringEvent
 $otherEvent : Value (this before[0ms,1h] $triggeringEvent)

 Female:

 // determine event that opened the window as $triggeringEvent
 $otherEvent : Value (this after[0ms,1h] $triggeringEvent)

 This is just a extract so that that the comments are in fact meaningless.
 The focus lies on before and after.


 Is one solution more efficient?


 Thanks! :)
 Tina


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





-- 
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com

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


Re: [rules-users] Performance differeneces using before or after

2010-09-14 Thread Tina Vießmann
  Thank you, Edson.

I've thought about it. There are some inconsistencies in the application 
integrating my application. Therefore using sliding windows is kind of 
problematic. There for I'm using the events timestamps as a compromise ...
I know, its very critizisable, but I can't change it.

Thanks anyway :)


 For a pair of events, the performance will be the same with
 before/after. If you have more than 2, though, best would be to use
 sliding windows.

 Edson

 2010/9/14 Tina Vießmanntviessm...@stud.hs-bremen.de:
 Hi,

 I've mentioned the test case I'm working on before. It's: If a certain value
 exceeds a limit more than X times within Y minutes/hours, do something.
~  Count = X  ,  time = Y

 During a talk with other developers it came up that by intuition the men
 would have chosen a other approach than the women. We can not agree if in
 Drools both approaches are the same in performance or if one is more
 performant.

 Male approach: If a new event with a limit violation is received, check if
 within the last time Y already X events with limit violations are contained
 in the knowledge base .

 Female approach: If a new event with a limit violation is received, check if
 the following events contain X events with limit violation. This is limited
 to a monitoring time of maximal Y. (If there have been X events registered,
 before the time Y is elapsed, the window will be closed right away.)

 In code with Y = 1h it would be:
 Male:

 // determine new event as $triggeringEvent
 $otherEvent : Value (this before[0ms,1h] $triggeringEvent)

 Female:

 // determine event that opened the window as $triggeringEvent
 $otherEvent : Value (this after[0ms,1h] $triggeringEvent)

 This is just a extract so that that the comments are in fact meaningless.
 The focus lies on before and after.


 Is one solution more efficient?


 Thanks! :)
 Tina


 ___
 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] EntityManager is closed

2010-09-14 Thread drooRam

Hi

 I am using the statefulknowledgesession with jpa persistence with
spring...exactly configured as per in the section : Example 2.5. JPA
configuration for StatefulKnowledgeSessions

http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-introduction/html_single/index.html#d0e47

I am using, spring 3.0.3 release, hibernate 3.5.1, drools 5.1.1.  Spring is
closing the entity manager upon invoking ksession.startProcess()  and got
the exception EntityManager is closed , 

actually in drools, the class
org.drools.persistence.processinstance.persisters.JPAVariablePersister is
using entitymanager from cmd_scoped_entity_manager ( in my case, it is
org.hibernate.ejb.EntityManagerImpl) 

but this is being closed by spring aop transaction surrounded on my calling
method for ksession.startProcess().

Any help would be appreciated... thx

I attached the complete stack trace of the exception in this message.

http://drools-java-rules-engine.46999.n3.nabble.com/file/n1475301/exception.txt
exception.txt 
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/EntityManager-is-closed-tp1475301p1475301.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] [rules-dev] Technical Rules

2010-09-14 Thread Leonardo Gomes
The thing is that, afaik, the DrlParser in itself doesn't give you something
that you can use to generate the BRL XML, even for a well-behaved DRL. You
would have to do some sort of model-to-model transformation that would have
RuleModel as an outcome. With the RuleModel at hand you can easily marshal
it to BRL XML.

There are visitors for the RuleModel that generate BRL XML (quite simple
with XStream) and pure DRL, and when you want to compile a BRL rule package
today, it uses the DRL visitor to generate the DRL that can be used to
compile.

BRL XML: hasn't evolved lately mainly because Mark and the others are
waiting for RuleML to become the canonical XML representation. I think that
the BRL Schema misses a lot of things that you have today in a DRL and
that's why nobody wanted to make the effort to have a DRL - BRL parser.
This part risk to be completely rewritten the day they decide to use RuleML.

Having said that, I still thing that I might be wrong since I haven't looked
much at the 5.x code except for the parts that I already knew from 4.0.7 :)

Cheers,
Leo.

On Tue, Sep 14, 2010 at 2:00 PM, Wolfgang Laun wolfgang.l...@gmail.comwrote:

 You are right, of course.  The BRL editor has its own XML format.

 I just wonder whether going through a DrlParser - DrlDumper cycle might
 produce a sufficiently well-behaved DRL text that could be easily enough
 transformed to the BRL XML. But nothing of this is in the stable API, so
 it would be wobbly in more than one way.

 -W


 2010/9/14 Leonardo Gomes leonardo.f.go...@gmail.com

 I might be wrong, but I think DRL - BRL is still not possible.


 Just had a look at org.drools.ide.common.server.util.BRDRLPersistence, and
 we have the following:

 public RuleModel unmarshal(String str) {
 throw new UnsupportedOperationException(
 Still not possible to convert pure DRL to RuleModel);
 }


 Leo.

 2010/9/14 Wolfgang Laun wolfgang.l...@gmail.com

 There is a short hint in the Expert Manual, subsection 4.11.3, where
 conversion between DRL and XML using classes such as DrlParser and XmlDumper
 is discussed. A .brk is just the native Drools XML format.

 -W


 On 14 September 2010 01:17, Leonardo Gomes 
 leonardo.f.go...@gmail.comwrote:

 Hi Amisha,

 You should use the user's list: rules-users@lists.jboss.org for this
 sort of question.

 AFAIK, no you can't convert technical rules (manually written drl) to
 business rules (.brl) generated with the graphical editor using Guvnor.

 Cheers,
 Leo.


 On Mon, Sep 13, 2010 at 10:42 PM, apatel apa...@ondeckcapital.comwrote:


 Hi,

 Is it possible to port Technical Rules in Drools to Business Rules? Is
 the
 procedure posted somewhere?

 Also is it possible to apply Drools Categories to Technical Rules?

 Thanks for your help,
 Amisha
 --
 View this message in context:
 http://drools-java-rules-engine.46999.n3.nabble.com/Technical-Rules-tp1468563p1468563.html
 Sent from the Drools - Dev mailing list archive at Nabble.com.
 ___
 rules-dev mailing list
 rules-...@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-dev



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



 ___
 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] [rules-dev] Technical Rules

2010-09-14 Thread Mark Proctor

 On 14/09/2010 21:17, Leonardo Gomes wrote:
The thing is that, afaik, the DrlParser in itself doesn't give you 
something that you can use to generate the BRL XML, even for a 
well-behaved DRL. You would have to do some sort of model-to-model 
transformation that would have RuleModel as an outcome. With the 
RuleModel at hand you can easily marshal it to BRL XML.


There are visitors for the RuleModel that generate BRL XML (quite 
simple with XStream) and pure DRL, and when you want to compile a BRL 
rule package today, it uses the DRL visitor to generate the DRL that 
can be used to compile.


BRL XML: hasn't evolved lately mainly because Mark and the others are 
waiting for RuleML to become the canonical XML representation. I think 
that the BRL Schema misses a lot of things that you have today in a 
DRL and that's why nobody wanted to make the effort to have a DRL - 
BRL parser. This part risk to be completely rewritten the day they 
decide to use RuleML.
Exactly, we don't want to mature and promote a proprietary XML and waste 
the time and create the confusion from not following a standard.


I think people working on the guided editor are just doing hacks to limp 
the current xml along for the purposes of the guided editor until we can 
move to something more long term.


Mark


Having said that, I still thing that I might be wrong since I haven't 
looked much at the 5.x code except for the parts that I already knew 
from 4.0.7 :)


Cheers,
Leo.

On Tue, Sep 14, 2010 at 2:00 PM, Wolfgang Laun 
wolfgang.l...@gmail.com mailto:wolfgang.l...@gmail.com wrote:


You are right, of course.  The BRL editor has its own XML format.

I just wonder whether going through a DrlParser - DrlDumper cycle
might produce a sufficiently well-behaved DRL text that could be
easily enough transformed to the BRL XML. But nothing of this is
in the stable API, so it would be wobbly in more than one way.

-W


2010/9/14 Leonardo Gomes leonardo.f.go...@gmail.com
mailto:leonardo.f.go...@gmail.com

I might be wrong, but I think DRL - BRL is still not possible.


Just had a look at
org.drools.ide.common.server.util.BRDRLPersistence, and we
have the following:

public RuleModel unmarshal(String str) {
throw new UnsupportedOperationException(
Still not possible to convert pure DRL to
RuleModel);
}


Leo.

2010/9/14 Wolfgang Laun wolfgang.l...@gmail.com
mailto:wolfgang.l...@gmail.com

There is a short hint in the Expert Manual, subsection
4.11.3, where conversion between DRL and XML using classes
such as DrlParser and XmlDumper is discussed. A .brk is
just the native Drools XML format.

-W


On 14 September 2010 01:17, Leonardo Gomes
leonardo.f.go...@gmail.com
mailto:leonardo.f.go...@gmail.com wrote:

Hi Amisha,

You should use the user's list:
rules-users@lists.jboss.org
mailto:rules-users@lists.jboss.org for this sort of
question.

AFAIK, no you can't convert technical rules (manually
written drl) to business rules (.brl) generated with
the graphical editor using Guvnor.

Cheers,
Leo.


On Mon, Sep 13, 2010 at 10:42 PM, apatel
apa...@ondeckcapital.com
mailto:apa...@ondeckcapital.com wrote:


Hi,

Is it possible to port Technical Rules in Drools
to Business Rules? Is the
procedure posted somewhere?

Also is it possible to apply Drools Categories to
Technical Rules?

Thanks for your help,
Amisha
--
View this message in context:

http://drools-java-rules-engine.46999.n3.nabble.com/Technical-Rules-tp1468563p1468563.html
Sent from the Drools - Dev mailing list archive at
Nabble.com.
___
rules-dev mailing list
rules-...@lists.jboss.org
mailto:rules-...@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev



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



___
rules-users mailing list
rules-users@lists.jboss.org
mailto:rules-users@lists.jboss.org

[rules-users] Guvnor Asset versioning vs Package snapshot versioning

2010-09-14 Thread Abdel Dridi
I am using Guvnor packaging and snapshot creation.
I have three environment DEV, UAT and Production, I configured each
environment with a package snapshot to listen to, each time the package
change, I build it then overwrite the snapshot for that particular
environment. This was working great for me, however when my server fail to
deploy the new updated snapshot package, I want to roll back to the old
working one which was overwritten already - this is a problem.

Why Guvnor does not provide package versioning, just like asset versioning?
I took a look at the code and was thinking to add a control before
overwriting the package snapshot to prevent the user to backup his package
snapshot before overwriting it which will lead to a package clone before the
overwrite happen.

What do you guys think?
I will volunteer to add this feature if you think it make sense.

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


Re: [rules-users] EntityManager is closed

2010-09-14 Thread Eugenio Abello
I have the same problem with drools 5.2 Using JPA with tomcat on bitronix.
I temporarily resolved with:
env.set (EnvironmentName.CMD_SCOPED_ENTITY_MANAGER, emf.createEntityManager
());
Every time I use the session.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] [rules-dev] Technical Rules

2010-09-14 Thread Wolfgang Laun
2010/9/14 Mark Proctor mproc...@codehaus.org


  Exactly, we don't want to mature and promote a proprietary XML and waste
 the time and create the confusion from not following a standard.


Any XML standard for rules and especially production system rules is way
behind what systems like Drools, Jess and others are providing. True, a
common subset comprising patterns, constraints and FOL quantifiers is there,
but other features that enhance the expressive power of a Rule Language are
missing or digressing.

As for the common subset, I'm not at all convinced that there is general
agreement of how to deal with the akward CE or with its restrictions and
pitfalls.

Also, there is the issue of data types...

From a Rule Vendor's point of view, there might be some commercial incentive
to implement an import from some standard rule XML, but not so much for an
export. And if you don't have an export from RBS x, why would you need an
import for RBS Y? But possibly I'm missing the obvious ;-)

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