Re: [rules-users] Drl to Xml conversion

2011-01-12 Thread Mark Proctor

On 13/01/2011 07:42, ADITYA CHITRE wrote:

Hi,
I am trying to convert a drl file to an xml file using drool xml 
language. In there a way to convert the drool fusion operators 
(temporal) from the drl file to an xml equivalent? For eg. the time 
information (3m30s, 4m) in the fusion temporal operator "before[ 
3m30s, 4m ]" is being ignored when the xml conversion is done. Is it 
possible to preserve this time information using xml drool api's?
Do not post to both the user and dev mailing lists. This is a user 
question, keep it to the user list. Please read 17 points listed here:

http://www.jboss.org/drools/lists.html

Mark

Regards,
Aditya


___
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] Drl to Xml conversion

2011-01-12 Thread ADITYA CHITRE
Hi,

I am trying to convert a drl file to an xml file using drool xml language. In 
there a way to convert the drool fusion operators (temporal) from the drl file 
to an xml equivalent? For eg. the time information (3m30s, 4m) in the fusion 
temporal operator "before[ 3m30s, 4m ]" is being ignored when the xml 
conversion is done. Is it possible to preserve this time information using xml 
drool api's?

Regards,
Aditya

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


[rules-users] Finding the approver for an employee (1) Is this a good problem for rules? (2) How you would do it?

2011-01-12 Thread dc tech
(Note: This was cross-posted earlier to the Jess User Group as well)

We wrote code to solve this problem (described later) many years ago, when I
was not aware of rule based approaches. However, I wonder if a rules based
solution  might represent a better  approach to solve this problem... and if
so, how would one do it?

*BACKGROUND*
We have departments setup in a hierarchical structure (i.e. parent
departments)
An employee can belong to one and only one department.
An employee can  be the manager of one or more departments; a manager  may
or not belong to that department.
A department can have many employees and many managers.

*PROBLEM*
Find the approver for an employee's expenses.
An approver is a 'higher level' manager relative to employee in the
organizational hierarchy.
Note that since the manager is employee as well, this includes the problem
of finding the manager of a manager.

*RULES*
1. The approver  the nearest manager to the employee (traversing up the
department hierarchy)
Typical cases then are:
- for a non-manager employee, the approver is the manager of the employee's
department
- for a manager who manages a single department and belongs to that
department, the approver is the manager of the parent unit

2. The approver for a manager cannot the manager himself or a peer manager
(in the same department).

3. An approver cannot report to the employee
This sometimes happens when the manager is an employee in one department but
manager for a department a few levels up in the hierarchy

3a. An approver cannot be the peer to someone who reports to the manager



*SAMPLE DATA*
A  (manager Hillary)
   A1 (manager John  and Jane )
   A11
   A12   (manager Mike; employees John and Mike)
   A13
   A2  (manager Kate)
   A21(manager Jessica, employee Janet)
   A22(manager Erica, employee Jane)

1. Approver for Janet is Jessica
2. Approver for Jessica is Kate
3.Approver for John  is Hillary (cannot be Mike, John himself or Jane)
4. Approver for Jane is Erica via A22 (no reporting relationship).

*ALGORITHMIC SOLUTION*
Define the department  reporting vector  starting from the employee
department
e.g. for (1) it would be A21 -> A2 -> A and
   for (3) it would be A12 -> A1 -> A
Then for each, define managers and then employees
(1) : A21( jessica/ janet )-> A2: ( Kate)  -> A(  Hillary)
(2):  A12 (Mike/  John, Mike)   -> A1 (John, Jane)  -> A (Hillary)
Then starting from the top (i.e. A), move down looking for the employee (in
manager or employee list)
If  the employee is found in  the manager list, approver is the manager of
the parent department
If the employee is found in the employee list, the approver is the manager
of this unit (not the parent)
(I may have missed a few rules in the algorithmic solution)


*RULE BASED SOLUTION?*
Is this a good problem for rule bases solution?
I started to model this and will post my solution if I can come up with
something useful but would absolutely welcome your inputs.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Real World Examples Wanted!!!!!!

2011-01-12 Thread Mark Proctor

On 13/01/2011 03:36, Allan Terry wrote:

Mark,
  Does this help you?  It is an example of an interesting problem 
solved with drools. Helps people get an idea of where rule systems are 
useful and why.   Since we used Drools mainly as a compilation target 
instead of working in it directly, I can't give you a case study of 
pure drools development and integration.  If you think it is still 
useful, you want me to post it as text to the forum?  Post it 
somewhere on the wiki with a note in the forum?  if you prefer to post 
it to the blog, that is OK too.
While this probably isn't suitable for step by step examples, it solves 
our other major problem. We have so few case studies, which is the first 
thing any new customers ask. Who uses Drools, where and how?


So this solves that brilliantly, especially as it is for the Navy.

Initially we can blog this, but maybe we should make a section in the 
documentation for high level case studies. If people are willing to 
contribute? Bonus points if you write it in docbook for us :) XMLMind is 
recommended.


If anyone else has high level case studies, send them in :)

Mark

  cheers,
Allan Terry


On 1/12/2011 10:06 AM, Mark Proctor wrote:

We often get complaints about not enough real world examples in Drools.
We have a large community now, so surely a few of you must be able to
write up examples based on your work? So please, please, please, please
take the time to help us here.

Thanks

Mark

___
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] Using GlobalArea in Guvnor

2011-01-12 Thread Jervis Liu
You may want to back up your old data first then clean up the repository 
storage directory (the default location in JBOSS AS is /bin/repository 
directory and repository.xml). Then restart your guvnor and import data 
back. Let me know if this doesn't solve the problem. The snanpshot 
version can be unstable sometimes.

Cheers,
Jervis
> The specific error message I was getting is:  
>
> "Unable to save this asset, as it has been recently updated by [admin]"
>
> -Original Message-
> From: rules-users-boun...@lists.jboss.org 
> [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Dean Whisnant
> Sent: Monday, January 10, 2011 3:36 PM
> To: Rules Users List
> Subject: Re: [rules-users] Using GlobalArea in Guvnor
>
> As a follow-on to this question, will anything need to be done with the 
> current repository if I grabbed a more current drools-guvnor.war file from 
> the snapshot?
>
> I downloaded 
> https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/target/drools-5.2.0-SNAPSHOT-guvnor.war
>  and replaced my old war file (5.1).  Everything comes up, but when I tried 
> to import a new POJO into a new package it wouldn't allow me to save.  
>
> Could this be an artifact that I need to reset (convert) the repository?  Or 
> is it because I didn't unpack the war file and reset the security to what I 
> had it as before?
>
> Thanks
>
> Dean
>
> -Original Message-
> From: rules-users-boun...@lists.jboss.org 
> [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Jervis Liu
> Sent: Thursday, December 16, 2010 9:29 PM
> To: Rules Users List
> Subject: Re: [rules-users] Using GlobalArea in Guvnor
>
> On 2010/12/17 0:41, Dean Whisnant wrote:
>   
>> Jervis,
>>
>> I see that it looks like you worked on and resolved this in drools-5.2.M1 
>> this morning.
>>
>> This is a noob question, but when or how can I get my hands on this fix?  
>> It's funny because I ran into this same issue today while trying to do 
>> something similar to John.
>>
>> 
> You can grab the latest snapshot from this place: 
> https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/
>
> Or you can wait for Drools 5.2.M1. It should come out next week if things go 
> well.
>
> Cheers,
> Jervis
>
>   
>> Thanks
>>
>> Dean
>>
>> -Original Message-
>> From: rules-users-boun...@lists.jboss.org
>> [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Jervis Liu
>> Sent: Wednesday, December 15, 2010 8:30 AM
>> To: rules-users@lists.jboss.org
>> Subject: Re: [rules-users] Using GlobalArea in Guvnor
>>
>> This is a bug. I've filed jira
>> https://issues.jboss.org/browse/GUVNOR-1124. I will take a look into this 
>> jira next week.
>>
>> Thanks,
>> Jervis
>>
>> On 2010/12/15 2:24, John Peterson wrote:
>> 
 I'm working with Guvnor 5.1.1 and I'm having an issue accessing
 
> Declarative Models defined in the Global Area in the Packages.  Is 
> it possible to create a shared model in the Global Area and then 
> write rules against them in other packages?  It would seem to me 
> that the answer would be yes (why else have a "Global" area), but, 
> for some reason, it doesn't seem to recognize them.
>
> Here's a scenario:
>
> I declare a DeclarativeModel in GlobalArea:
>
> GenericFact
> id: Integer
> valueOne: Integer
> label: String
> end
>
> I have a package called com.experiment.  I'd like to write Business
>   
>>> Rule
>>>   
> in it using that GenericFact.  However, when I click the "+" sign 
> to
>   
>>> add
>>>   
> a Fact, I see a yellow background over "Note: No model has been 
> defined."  Is there something that needs to be done to make the 
> GlobalArea stuff viewable from the individual packages?
>   
>> ___
>> 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] Real World Examples Wanted!!!!!!

2011-01-12 Thread Mark Proctor

On 13/01/2011 01:49, Mark Proctor wrote:

On 12/01/2011 20:20, Patrick van Kann wrote:

Hi Mark,

I'm not sure if this the kind of example you mean, but here is a blog 
article I wrote describing how I integrated Drools, JSR 303 and 
Spring to deliver rules-based bean validation for use in a Spring MVC 
web app, for example.


http://nonrepeatable.blogspot.com/2010/11/rules-based-validation-using-drools.html 



Maybe this could be useful to some users.

That would probably be good for the integration documentation:
http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-integration/html_single/index.html

I'll reference in our blog for now, would be great if you could write 
this up in docbook for us,  so we can commit it as part of the main 
documentation build:

https://github.com/droolsjbpm/droolsjbpm/tree/master/drools-docs/drools-docs-integration
Was in the process of reposting this on our blog. However I notice that 
some of the code snippets are wrong, I looked at the source. You need to 
escape any < and > for things like xml, less than and generics.


Otherwise you get things like:
|||public| |Collaborators(Map collaborators) {

Mark
|



Thanks

Mark


Cheers,

Pat

On Wed, Jan 12, 2011 at 7:06 PM, Mark Proctor > wrote:


We often get complaints about not enough real world examples in
Drools.
We have a large community now, so surely a few of you must be able to
write up examples based on your work? So please, please, please,
please
take the time to help us here.

Thanks

Mark

___
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] Real World Examples Wanted!!!!!!

2011-01-12 Thread Mark Proctor

On 12/01/2011 20:20, Patrick van Kann wrote:

Hi Mark,

I'm not sure if this the kind of example you mean, but here is a blog 
article I wrote describing how I integrated Drools, JSR 303 and Spring 
to deliver rules-based bean validation for use in a Spring MVC web 
app, for example.


http://nonrepeatable.blogspot.com/2010/11/rules-based-validation-using-drools.html 



Maybe this could be useful to some users.

That would probably be good for the integration documentation:
http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-integration/html_single/index.html

I'll reference in our blog for now, would be great if you could write 
this up in docbook for us,  so we can commit it as part of the main 
documentation build:

https://github.com/droolsjbpm/droolsjbpm/tree/master/drools-docs/drools-docs-integration

Thanks

Mark


Cheers,

Pat

On Wed, Jan 12, 2011 at 7:06 PM, Mark Proctor > wrote:


We often get complaints about not enough real world examples in
Drools.
We have a large community now, so surely a few of you must be able to
write up examples based on your work? So please, please, please,
please
take the time to help us here.

Thanks

Mark

___
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] Real World Examples Wanted!!!!!!

2011-01-12 Thread Mark Proctor
On 12/01/2011 20:35, Ansgar Konermann wrote:
> On 12.01.2011 19:06, Mark Proctor wrote:
>> We often get complaints about not enough real world examples in Drools.
>> We have a large community now, so surely a few of you must be able to
>> write up examples based on your work? So please, please, please, please
>> take the time to help us here.
>>
> We do mortgage risk assessment using drools. Want a story?
Absolutely. There was a start to a mortgage example, but it was very 
minimal. Would be great if that could be extended and written up properly.

The idea is we would run it as a single, or set of blog articles, and 
then have it added to the main documentation examples. So if it can be 
made step by step, including debugging, looking at audit view to show 
what's going on etc.
http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html_single/index.html#d0e6973

Mark
> Regards Ansgar
>
> ___
> 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] Problems with BigDecimal on LHS

2011-01-12 Thread Jason Mihalick

I searched on the forum before I posted this and looked in JIRA.  It appears
that all problems like this with BigDecimal are thought to be resolved. 
However, I am having a problem that appears it may be attributed to Drools
using the BigDecimal( double ) constructor when converting decimal numbers
in the rules to a BigDecimal.

If you are able to reproduce this problem, what is the work around?  Use an
eval statement?

The rule does not fire in the following test:

package org.test;

import java.math.BigDecimal;

import org.drools.KnowledgeBase;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.runtime.StatelessKnowledgeSession;

public class BigDTest {

  public final static String RULE = 
"package mypackage; " +
"import org.test.BigDTest;" +
"rule \"BigDecimal compare problem\" " +
"   when " +
"   BigDTest( bigDValue == 6.3 ) " +
"   then " +
"   System.out.println( \"Matched!\" ); " +
"   end"
;
  
  private BigDecimal bigDValue = new BigDecimal( "6.3" ) ; // Rule will fire
if this is changed to BigDecimal( 6.3 )
  
  public BigDecimal getBigDValue() {
return bigDValue;
  }

  public void setBigDValue( BigDecimal bigDValue ) {
this.bigDValue = bigDValue;
  }

  public static void main( String[] args ) {
KnowledgeBuilder kbuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newByteArrayResource( RULE.getBytes() ),
ResourceType.DRL );
if ( kbuilder.hasErrors() ) {
System.err.println( kbuilder.getErrors().toString() );
}

KnowledgeBase kbase = kbuilder.newKnowledgeBase();

StatelessKnowledgeSession ksession =
kbase.newStatelessKnowledgeSession();
BigDTest bigDTest = new BigDTest();
ksession.execute( bigDTest );
  }
}

-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Problems-with-BigDecimal-on-LHS-tp2244966p2244966.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] Real World Examples Wanted!!!!!!

2011-01-12 Thread Ansgar Konermann
On 12.01.2011 19:06, Mark Proctor wrote:
> We often get complaints about not enough real world examples in Drools.
> We have a large community now, so surely a few of you must be able to
> write up examples based on your work? So please, please, please, please
> take the time to help us here.
>

We do mortgage risk assessment using drools. Want a story?

Regards Ansgar

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


Re: [rules-users] Real World Examples Wanted!!!!!!

2011-01-12 Thread Patrick van Kann
Hi Mark,

I'm not sure if this the kind of example you mean, but here is a blog
article I wrote describing how I integrated Drools, JSR 303 and Spring to
deliver rules-based bean validation for use in a Spring MVC web app, for
example.

http://nonrepeatable.blogspot.com/2010/11/rules-based-validation-using-drools.html

Maybe this could be useful to some users.

Cheers,

Pat

On Wed, Jan 12, 2011 at 7:06 PM, Mark Proctor  wrote:

> We often get complaints about not enough real world examples in Drools.
> We have a large community now, so surely a few of you must be able to
> write up examples based on your work? So please, please, please, please
> take the time to help us here.
>
> Thanks
>
> Mark
>
> ___
> 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] Real World Examples Wanted!!!!!!

2011-01-12 Thread Mark Proctor
We often get complaints about not enough real world examples in Drools. 
We have a large community now, so surely a few of you must be able to 
write up examples based on your work? So please, please, please, please 
take the time to help us here.

Thanks

Mark

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


Re: [rules-users] Guvnor - archival option

2011-01-12 Thread Rob Fisher
After further review, I discovered that the rule I was trying to create
did indeed exist in the archival section.  I deleted it and was able to
then create the rule with the preferred name.

Sorry to send you on a wild goose chase.  I'm very new to this.  Every
day is a learning experience.

Rob 


Message: 3
Date: Mon, 10 Jan 2011 12:03:10 +0800
From: Jervis Liu 
Subject: Re: [rules-users] Guvnor - archival option
To: Rules Users List 
Message-ID: <4d2a84fe.8060...@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 2011/1/6 22:39, Rob Fisher wrote:
> I'm using version 5.1.1
>
> I can't find any reference to the rule anywhere in the package, yet it

> seems to be seeing it when trying to create a rule with the same name.
>
Hi, I verified guvnor 5.1.1, still can not reproduce the problem you
reported. If you believe you still have this problem, you can send me a
repository dump with detailed instruction on how to reproduce so that I
can take a further look. Thanks.

Cheers,
Jervis

> Rob Fisher
> Systems Analyst, Agency Awards
> Desk 309-735-4136
> Cell  309-660-4957
>
>
> -Original Message-
> From: rules-users-boun...@lists.jboss.org
> [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Jervis Liu
> Sent: Thursday, January 06, 2011 1:58 AM
> To: Rules Users List
> Subject: Re: [rules-users] Guvnor - archival option
>
> What version of Guvnor are you using? I am not able to reproduce this 
> problem on trunk.
>
> Thanks,
> Jervis
>
> Rob Fisher wrote:
>>
>> I archived a rule, then deleted it within Administration\Archive 
>> (using the "Delete selected asset" option). However, when trying to 
>> create a rule with the same name, I receive the following message: 
>> "An
>
>> asset with that name already exists in the chosen package. Please use

>> another name". I do not see the rule under Archive any longer (since 
>> it was deleted). It seems, however, to still be recognized within the

>> repository.
>>
>> Anyone know how to solve this?
>>
>> Thanks
>>
>> Rob Fisher**
>>
>> -
>> -
>> --


Rob Fisher


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


Re: [rules-users] process-designer deserialization error

2011-01-12 Thread alim

Hello Kris,
I was wondering if there's already a Guvnor version with the connection to
the designer being configurable?
Greetings, Audrey



Kris Verlaenen wrote:
> 
> Yes, the GuvnorAPIServlet seems to be connecting hardcoded to 
> "http://localhost:8080/designer/bpmn2_0deserialization";.  I'll see if I 
> can update this to something better or at least configurable.
> 

-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/process-designer-deserialization-error-tp1833481p2240944.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] Not able to achieve NOT & FROM keyword in a brl through Guvnor

2011-01-12 Thread Harshit Bapna
Hello All,

>From the Expert documentation, I am trying to create the rule(below) in
Guvnor
 Guvnor Version : 5.1.1

I am not able to build a rule which has 'from' keyword. Is it supported in
Guvnor ?
Also I am not able to achieve the combination of NOT & FROM in a business
rule.
Is it possible ?


package org.drools;

rule "Avoid NPE on wrong syntax"
   when
 not( Cheese( ( type == "stilton" && price == 10 ) || ( type == "brie"
&& price == 15 ) ) from $cheeseList )
   then
 System.out.println("OK");
end

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


Re: [rules-users] XML to DRL

2011-01-12 Thread T-Otte


Wolfgang Laun-2 wrote:
> 
> On 11 January 2011 22:25, T-Otte  wrote:
> 
>>
>> Sry i am new to this mailing list system.
>> Since my edit doesn't get send to the mailing list i will mention it
>> again:
>>
>> The output .drl gets created and looks valid despite the errors.
>>
> 
> 
> Most of the error messages go away if you simply omit
> xs:schemaLocation="http://drools.org/drools-5.0 drools.org/drools-5.0.xsd"
> 
> There is no file drools-5.0.xsd, either in drools 5.1.x or in the current
> developers' code base.
> 
> The remaining error
> (null: 4, 54): cvc-elt.1: Cannot find the declaration of element
> 'package'.
> appears to be from the SAX parser. As you have found out, none of this
> matters.
> 
> -W
> 
> 
> 
>> --
>> View this message in context:
>> http://drools-java-rules-engine.46999.n3.nabble.com/XML-to-DRL-tp2236936p2236959.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 mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> 


Thank you both for your answers.
I found a solution that solves all of the errors:
http://drools.org/drools-5.0";
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance";
xs:schemaLocation="http://drools.org/drools-5.0 drools.org/drools-4.0.xsd">

The target schema is drools-5.0 but the file that contains the 5.0 schema is
still named drools-4.0.xsd.
I find it very confusing that this is wrong in all of the example xmls, but
changing it to 4.0 works.
Is there a reason why the file is still named 4.0 instead of 5.0 or 5.1?

Best regards
Tobias

-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/XML-to-DRL-tp2236936p2240770.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] XML to DRL

2011-01-12 Thread Wolfgang Laun
On 11 January 2011 22:25, T-Otte  wrote:

>
> Sry i am new to this mailing list system.
> Since my edit doesn't get send to the mailing list i will mention it again:
>
> The output .drl gets created and looks valid despite the errors.
>


Most of the error messages go away if you simply omit
xs:schemaLocation="http://drools.org/drools-5.0 drools.org/drools-5.0.xsd"

There is no file drools-5.0.xsd, either in drools 5.1.x or in the current
developers' code base.

The remaining error
(null: 4, 54): cvc-elt.1: Cannot find the declaration of element 'package'.
appears to be from the SAX parser. As you have found out, none of this
matters.

-W



> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/XML-to-DRL-tp2236936p2236959.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] XML to DRL

2011-01-12 Thread Bruno Freudensprung


Hi,

I don't know if it is related but it reminds me a problem I had with the 
changet-set XML.

Drools 5.1 documentation mentions (example 3.8):

   xs:schemaLocation='http://drools.org/drools-5.0/change-set*.xsd* 
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd'>


  



But it refused to work until I changed it to (please note the removal):

http://drools.org/drools-5.0/change-set";
   xmlns:xs="http://www.w3.org/2001/XMLSchema-instance";
   xs:schemaLocation="http://drools.org/drools-5.0/change-set 
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd";>


  



Hope that helps,

Bruno.

T-Otte a écrit :

Sry i am new to this mailing list system.
Since my edit doesn't get send to the mailing list i will mention it again:

The output .drl gets created and looks valid despite the errors.
  


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