[rules-users] Hello and my first question

2013-01-14 Thread Bojan Janisch
Hello everybody,

this is my first post and also my first question to you.
I've searched the net for quite some hours now, but don't get any information 
regarding optionally conditions.

I'm using drools to annotate some textobjects and I'm stucking with the 
following rule:

When there are two named entities, one body side and one anatomy in a text 
(they're defined earlier by a textannotating system, so I'm working on 
annotated objects) and there is a optionally anatomic side (it contains 
generally something like lateral oder medial and so on), then generate me a 
new annotation. 

So up to now I'm on this state:

Rule Anatomic Side

when 

 $NE1 : NE(Type.contains(body))
 $NE2 : NE(Type.contains(anatomy))

 //So here starts the problem
 [$NE3 : NE(Type.contains(anatomic))]

then
 ...

How can I set a condition as optionally or is there no such way?

Thanks everyone to who reads this.
Janisch
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Hello and my first question

2013-01-14 Thread Esteban Aliverti
You can take a look at 'Conditional named consequences' to see if that is
what you need:
http://docs.jboss.org/drools/release/5.5.0.Final/droolsjbpm-introduction-docs/html_single/#releaseNotes_5.5.0_Expert

Best Regards,




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


On Mon, Jan 14, 2013 at 11:45 AM, Bojan Janisch 
bojan.jani...@scai.fraunhofer.de wrote:

 Hello everybody,

 this is my first post and also my first question to you.
 I've searched the net for quite some hours now, but don't get any
 information regarding optionally conditions.

 I'm using drools to annotate some textobjects and I'm stucking with the
 following rule:

 When there are two named entities, one body side and one anatomy in a text
 (they're defined earlier by a textannotating system, so I'm working on
 annotated objects) and there is a optionally anatomic side (it contains
 generally something like lateral oder medial and so on), then generate
 me a new annotation.

 So up to now I'm on this state:

 Rule Anatomic Side

 when

  $NE1 : NE(Type.contains(body))
  $NE2 : NE(Type.contains(anatomy))

  //So here starts the problem
  [$NE3 : NE(Type.contains(anatomic))]

 then
  ...

 How can I set a condition as optionally or is there no such way?

 Thanks everyone to who reads this.
 Janisch
 ___
 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] New object in XLS ACTION

2013-01-14 Thread Michael Anstis
What result do you get with the following (on a single row):-

ACTION| ACTION|
ACTION
--+---+-
FeeDTO feeDTO = new FeeDTO(); | feeDTO.setAmount(new BigDecimal($1)); |
feeDTO.setReason($1)



On 7 January 2013 15:11, aleste moisesvent...@gmail.com wrote:

 I'm trying to create a new object, populate a number of attributes in it
 and
 insert it in memory as part of the ACTION in a decision table XLS.

 I was able to do that in a single XLS column:

 ACTION
 insertLogical( new RuleError(t, Constants.ErrorType.PROMOTION, $1, $2));

 Or using the guided decision tables in Guvnor:

 FeeDTO [f3]
 amount
 10
 20
 (...)

 But I have not been able to do it using an XLS and having multiple ACTION
 columns. Something like:

 ACTION  ACTION
 FeeDTO feeDTO = new FeeDTO();
 feeDTO.setAmount(new BigDecimal($1));   feeDTO.setReason($1);


 This is the rule that I'd be expecting as result of the XLS compilation:

 //from row number: 3
 rule Row 3 FeesTest
 dialect mvel
 when
 f1 : FinancialTransactionDTO( transactionType ==
 TRANSACTION_TYPE.DEPOSIT
 )
 then
 FeeDTO f3 = new FeeDTO();
 f3.setAmount( 20 );
 f3.setType( Some Description );
 f3.setOverrideable (true);
 insert( f3 );
 end




 --
 View this message in context:
 http://drools.46999.n3.nabble.com/New-object-in-XLS-ACTION-tp4021374.html
 Sent from the Drools: User forum 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] Hello and my first question

2013-01-14 Thread Wolfgang Laun
I take optional to mean don't care whether it is there or not - so
why don't you simply omit this condition?

-W

On 14/01/2013, Bojan Janisch bojan.jani...@scai.fraunhofer.de wrote:
 Hello everybody,

 this is my first post and also my first question to you.
 I've searched the net for quite some hours now, but don't get any
 information regarding optionally conditions.

 I'm using drools to annotate some textobjects and I'm stucking with the
 following rule:

 When there are two named entities, one body side and one anatomy in a text
 (they're defined earlier by a textannotating system, so I'm working on
 annotated objects) and there is a optionally anatomic side (it contains
 generally something like lateral oder medial and so on), then generate
 me a new annotation.

 So up to now I'm on this state:

 Rule Anatomic Side

 when

  $NE1 : NE(Type.contains(body))
  $NE2 : NE(Type.contains(anatomy))

  //So here starts the problem
  [$NE3 : NE(Type.contains(anatomic))]

 then
  ...

 How can I set a condition as optionally or is there no such way?

 Thanks everyone to who reads this.
 Janisch
 ___
 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] Hello and my first question

2013-01-14 Thread Bojan Janisch
Because the annotation should extract most of the unstructured information, 
into a structured object. So if there is optionally such an information like an 
anatomic side, I would want to add this information to my structured object.

- Ursprüngliche Mail -
Von: Wolfgang Laun wolfgang.l...@gmail.com
An: Rules Users List rules-users@lists.jboss.org
Gesendet: Montag, 14. Januar 2013 12:22:37
Betreff: Re: [rules-users] Hello and my first question

I take optional to mean don't care whether it is there or not - so
why don't you simply omit this condition?

-W

On 14/01/2013, Bojan Janisch bojan.jani...@scai.fraunhofer.de wrote:
 Hello everybody,

 this is my first post and also my first question to you.
 I've searched the net for quite some hours now, but don't get any
 information regarding optionally conditions.

 I'm using drools to annotate some textobjects and I'm stucking with the
 following rule:

 When there are two named entities, one body side and one anatomy in a text
 (they're defined earlier by a textannotating system, so I'm working on
 annotated objects) and there is a optionally anatomic side (it contains
 generally something like lateral oder medial and so on), then generate
 me a new annotation.

 So up to now I'm on this state:

 Rule Anatomic Side

 when

  $NE1 : NE(Type.contains(body))
  $NE2 : NE(Type.contains(anatomy))

  //So here starts the problem
  [$NE3 : NE(Type.contains(anatomic))]

 then
  ...

 How can I set a condition as optionally or is there no such way?

 Thanks everyone to who reads this.
 Janisch
 ___
 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] Which libs should I update after update?

2013-01-14 Thread Andre Froes
Hello everyone,

in order to update from drools 5.4 to 5.5 which lib should I update? Or must
I replace them all?

Thanks



--
View this message in context: 
http://drools.46999.n3.nabble.com/Which-libs-should-I-update-after-update-tp4021500.html
Sent from the Drools: User forum 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] Hello and my first question

2013-01-14 Thread Wolfgang Laun
Then the approach depends on the way $NE1, $NE2 and $NE3 are to be added
to the structured object. If the two or three values need to be
combined (e.g., concatenated in some specific order), you might use
two distinct rules as extensions of the common part:

rule body-anatomy
when
   $NE1 : NE(Type.contains(body))
   $NE2 : NE(Type.contains(anatomy))
then
end

rule body-anatomy anatomic
extends  body-anatomy
when
   $NE3: NE(Type.contains(anatomic))
then
combine $NE1, $NE2, $NE3 as required, add to...
end

rule body-anatomy no anatomic
extends  body-anatomy
when
not NE(Type.contains(anatomic))
then
combine $NE1, $NE2 as required, add to...
end

If $NE1 + $NE2 and $NE3 can be added individually, you might omit the
third rule and add $NE1 + $NE2 in the first rule. Or use the named
consequence feature.

-W



On 14/01/2013, Bojan Janisch bojan.jani...@scai.fraunhofer.de wrote:
 Because the annotation should extract most of the unstructured information,
 into a structured object. So if there is optionally such an information like
 an anatomic side, I would want to add this information to my structured
 object.

 - Ursprüngliche Mail -
 Von: Wolfgang Laun wolfgang.l...@gmail.com
 An: Rules Users List rules-users@lists.jboss.org
 Gesendet: Montag, 14. Januar 2013 12:22:37
 Betreff: Re: [rules-users] Hello and my first question

 I take optional to mean don't care whether it is there or not - so
 why don't you simply omit this condition?

 -W

 On 14/01/2013, Bojan Janisch bojan.jani...@scai.fraunhofer.de wrote:
 Hello everybody,

 this is my first post and also my first question to you.
 I've searched the net for quite some hours now, but don't get any
 information regarding optionally conditions.

 I'm using drools to annotate some textobjects and I'm stucking with the
 following rule:

 When there are two named entities, one body side and one anatomy in a text
 (they're defined earlier by a textannotating system, so I'm working on
 annotated objects) and there is a optionally anatomic side (it contains
 generally something like lateral oder medial and so on), then generate
 me a new annotation.

 So up to now I'm on this state:

 Rule Anatomic Side

 when

  $NE1 : NE(Type.contains(body))
  $NE2 : NE(Type.contains(anatomy))

  //So here starts the problem
  [$NE3 : NE(Type.contains(anatomic))]

 then
  ...

 How can I set a condition as optionally or is there no such way?

 Thanks everyone to who reads this.
 Janisch
 ___
 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] Stuck on simple testcase

2013-01-14 Thread Michiel Vermandel
Hi,

I wrote a quite simple unit test which I expected to succeed.
But it does not, it ends with a negative score.
Though, it is easy to see on sight that there is a zero-score solution possible.
So... something must be wrong in some of my rules.

I was wondering if it is possible to manually set all planning variables to 
what I expected them to be and then see which rule(s) break(s)?
So planning variables should not be changed anymore while solving.

I'm using drools planner 5.5.0.Final.

Thanks,

Michiel

 
-
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Which libs should I update after update?

2013-01-14 Thread Geoffrey De Smet
If you're using maven/gradle/ivy/buildr, just update the version and let 
it figure out the transitive dependencies.
Although you might want to use the enforcer plugin to check if you 
haven't overwritten any transitive dependency to a lower version:
http://maven.apache.org/enforcer/enforcer-rules/requireUpperBoundDeps.html

If you're using ant, basically replace all of them with those from the 
5.5 lib zip.
If you want to get rid of dead deps, compare the 5.4 lib zip with the 
5.5 lib zip afterwards (= painful).
If you just want the subset of deps that you need (like with maven, for 
example if you only use drools-core, you don't need most of the deps in 
the lib zip), don't use ant.

Op 14-01-13 12:44, Andre Froes schreef:
 Hello everyone,

 in order to update from drools 5.4 to 5.5 which lib should I update? Or must
 I replace them all?

 Thanks



 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Which-libs-should-I-update-after-update-tp4021500.html
 Sent from the Drools: User forum 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] Hello and my first question

2013-01-14 Thread Bojan Janisch
Solution:

So I've decided for a third solution. First was using the named consequence 
feature, 
but I did not want to have multiple consequence-blocks, that would only make 
confusing 
code. The second solution was extending the rule, that would have been a nice 
solution, 
but also confusing by growing optionally conditions. So I used the third 
solution, 
I've splitted the rule into two rules. It's almost the same as the extending 
version 
with a slight difference in the time when it comes for passing the condition.

I think the hierarchy will give a better overview by understanding the rules, 
thats 
why I choosed separation instead of extension rules.

State of my rules:

rule Annotate Anatomy
when
$NE1 : NE(Type.contains(body))
$NE2 : NE(Type.contains(anatomy))
then
$anno : Annotation($NE1 +   $NE2);
anno.setType(Anatomy);
list.add(anno);
end


rule Add AnatomicSide to Anatomy
when
$AN : Annotation(Type.contains(Anatomy))
$NE : NE(Type.contains(anatomic))
then
$anno : Annotation($AN +   $NE)
anno.setType(Anatomy);
list.add(anno);
list.remove(AN);
end


Thanks for solving this problem.
Janisch

- Ursprüngliche Mail -
Von: Wolfgang Laun wolfgang.l...@gmail.com
An: Rules Users List rules-users@lists.jboss.org
Gesendet: Montag, 14. Januar 2013 12:56:58
Betreff: Re: [rules-users] Hello and my first question

Then the approach depends on the way $NE1, $NE2 and $NE3 are to be added
to the structured object. If the two or three values need to be
combined (e.g., concatenated in some specific order), you might use
two distinct rules as extensions of the common part:

rule body-anatomy
when
   $NE1 : NE(Type.contains(body))
   $NE2 : NE(Type.contains(anatomy))
then
end

rule body-anatomy anatomic
extends  body-anatomy
when
   $NE3: NE(Type.contains(anatomic))
then
combine $NE1, $NE2, $NE3 as required, add to...
end

rule body-anatomy no anatomic
extends  body-anatomy
when
not NE(Type.contains(anatomic))
then
combine $NE1, $NE2 as required, add to...
end

If $NE1 + $NE2 and $NE3 can be added individually, you might omit the
third rule and add $NE1 + $NE2 in the first rule. Or use the named
consequence feature.

-W



On 14/01/2013, Bojan Janisch bojan.jani...@scai.fraunhofer.de wrote:
 Because the annotation should extract most of the unstructured information,
 into a structured object. So if there is optionally such an information like
 an anatomic side, I would want to add this information to my structured
 object.

 - Ursprüngliche Mail -
 Von: Wolfgang Laun wolfgang.l...@gmail.com
 An: Rules Users List rules-users@lists.jboss.org
 Gesendet: Montag, 14. Januar 2013 12:22:37
 Betreff: Re: [rules-users] Hello and my first question

 I take optional to mean don't care whether it is there or not - so
 why don't you simply omit this condition?

 -W

 On 14/01/2013, Bojan Janisch bojan.jani...@scai.fraunhofer.de wrote:
 Hello everybody,

 this is my first post and also my first question to you.
 I've searched the net for quite some hours now, but don't get any
 information regarding optionally conditions.

 I'm using drools to annotate some textobjects and I'm stucking with the
 following rule:

 When there are two named entities, one body side and one anatomy in a text
 (they're defined earlier by a textannotating system, so I'm working on
 annotated objects) and there is a optionally anatomic side (it contains
 generally something like lateral oder medial and so on), then generate
 me a new annotation.

 So up to now I'm on this state:

 Rule Anatomic Side

 when

  $NE1 : NE(Type.contains(body))
  $NE2 : NE(Type.contains(anatomy))

  //So here starts the problem
  [$NE3 : NE(Type.contains(anatomic))]

 then
  ...

 How can I set a condition as optionally or is there no such way?

 Thanks everyone to who reads this.
 Janisch
 ___
 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] Solution

2013-01-14 Thread Wolfgang Laun
On 14/01/2013, Bojan Janisch bojan.jani...@scai.fraunhofer.de wrote:

 so if someone has the same problem, to get some options how to solve this
 problem.

Posting code that's grossly syntactically invalid isn't going to help.

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


Re: [rules-users] Web services and Drools

2013-01-14 Thread Stephen Masters
Personally, I use the Spring framework to provide SOAP (and REST) web services 
to other applications. It's relatively simple to set it up and I'm fond of the 
contract-first approach which it encourages.

With regards integration with Drools, it's easy enough in Spring. You just need 
to create a Spring bean to act as the interface to your knowledge base. That 
way, Spring ensures that you have only one knowledge base instance in play, so 
it is configured and compiled when the application starts.

I'd be happy to answer any Spring/Drools integration questions (I don;t tend to 
use other web frameworks), and I can provide some code examples if Spring is 
the way you wish to go.

Steve


On 14 Jan 2013, at 13:50, riri irina.a...@gmail.com wrote:

 Hello everyone,
 
 I need to develop a web application that includes Drools as its rule engine
 and would like to expose its functionality as web services. I would
 appreciate some expert opinion on which framework would be easiest to learn
 and to work with. Some of the posts I have seen regarding Drools and OSGi
 refer to it as a nightmare. Is that still true with the current version?
 If anyone has had any experience with Spring, EJB or other and would like to
 share I would be very interested since I am new to this domain. If there is
 a case to be made about not using a framework at all then I would also like
 to hear you out.
 
 Best regards, 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Web-services-and-Drools-tp4021509.html
 Sent from the Drools: User forum 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] Web services and Drools

2013-01-14 Thread Mauricio Salatino
You can also take advantage of the Drools and Camel integration. Apache
Camel is an integration framework that does exactly that, expose the
services via different transports.

Cheers


On Mon, Jan 14, 2013 at 3:00 PM, Stephen Masters stephen.mast...@me.comwrote:

 Personally, I use the Spring framework to provide SOAP (and REST) web
 services to other applications. It's relatively simple to set it up and I'm
 fond of the contract-first approach which it encourages.

 With regards integration with Drools, it's easy enough in Spring. You just
 need to create a Spring bean to act as the interface to your knowledge
 base. That way, Spring ensures that you have only one knowledge base
 instance in play, so it is configured and compiled when the application
 starts.

 I'd be happy to answer any Spring/Drools integration questions (I don;t
 tend to use other web frameworks), and I can provide some code examples if
 Spring is the way you wish to go.

 Steve


 On 14 Jan 2013, at 13:50, riri irina.a...@gmail.com wrote:

  Hello everyone,
 
  I need to develop a web application that includes Drools as its rule
 engine
  and would like to expose its functionality as web services. I would
  appreciate some expert opinion on which framework would be easiest to
 learn
  and to work with. Some of the posts I have seen regarding Drools and OSGi
  refer to it as a nightmare. Is that still true with the current
 version?
  If anyone has had any experience with Spring, EJB or other and would
 like to
  share I would be very interested since I am new to this domain. If there
 is
  a case to be made about not using a framework at all then I would also
 like
  to hear you out.
 
  Best regards,
 
 
 
  --
  View this message in context:
 http://drools.46999.n3.nabble.com/Web-services-and-Drools-tp4021509.html
  Sent from the Drools: User forum 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




-- 
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jugargentina.org
 - Co-Founder @ http://www.jbug.com.ar

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


Re: [rules-users] Hello and my first question

2013-01-14 Thread Bojan Janisch
To your questions/marks:

is anno global?

Not it is not. I've forgot to declare the variable.
The line should be like this:
Annotation anno = new Annotation($NE1 +   + $NE2);

Annotation is a Type I import and the beginning of the file. 


Is list global?

Yes list is declared as a global variable. In list I store 
each different annotation, so even if I change an attribute 
to an annotation, I will have only the latest annotation, 
which contains most of the extracted information.


You don't have any gurantee that the other rule has alread fired and
added some Annotation to list and so the remove may fail, and
you'll get the other Annotation object added later.

There is a guarantee that I have the annotation before I delete it. 

Until there is no Annotation of Anatomy, the second rule will not pass 
the condition, because there exists no annotation with a type of Anatomy.

But maybe you thought there would be no guarantee because I forgot to add
the annotation (created from the first rule) to the list. If so then sorry 
for my mistake, there should also something like:

list.add(anno);

in the first rule.

- Ursprüngliche Mail -
Von: Wolfgang Laun wolfgang.l...@gmail.com
An: Rules Users List rules-users@lists.jboss.org
Gesendet: Montag, 14. Januar 2013 13:57:42
Betreff: Re: [rules-users] Hello and my first question

On 14/01/2013, Bojan Janisch bojan.jani...@scai.fraunhofer.de wrote:
 Solution:

You may want to review the syntax...

 State of my rules:

 rule Annotate Anatomy
 when
 $NE1 : NE(Type.contains(body))
 $NE2 : NE(Type.contains(anatomy))
 then
 $anno : Annotation($NE1 +   $NE2);

A pattern, not a statement.
Invalid expression in the parenthesis.

 anno.setType(Anatomy);

Is anno global?

 list.add(anno);

Is list global?

 end


 rule Add AnatomicSide to Anatomy
 when
 $AN : Annotation(Type.contains(Anatomy))
 $NE : NE(Type.contains(anatomic))
 then
 $anno : Annotation($AN +   $NE)

As above.

 anno.setType(Anatomy);
 list.add(anno);
 list.remove(AN);

You don't have any gurantee that the other rule has alread fired and
added some Annotation to list and so the remove may fail, and
you'll get the other Annotation object added later.

It's not quite so simple. Take care!
-W


 end


 Thanks for solving this problem.
 Janisch

 - Ursprüngliche Mail -
 Von: Wolfgang Laun wolfgang.l...@gmail.com
 An: Rules Users List rules-users@lists.jboss.org
 Gesendet: Montag, 14. Januar 2013 12:56:58
 Betreff: Re: [rules-users] Hello and my first question

 Then the approach depends on the way $NE1, $NE2 and $NE3 are to be added
 to the structured object. If the two or three values need to be
 combined (e.g., concatenated in some specific order), you might use
 two distinct rules as extensions of the common part:

 rule body-anatomy
 when
$NE1 : NE(Type.contains(body))
$NE2 : NE(Type.contains(anatomy))
 then
 end

 rule body-anatomy anatomic
 extends  body-anatomy
 when
$NE3: NE(Type.contains(anatomic))
 then
 combine $NE1, $NE2, $NE3 as required, add to...
 end

 rule body-anatomy no anatomic
 extends  body-anatomy
 when
 not NE(Type.contains(anatomic))
 then
 combine $NE1, $NE2 as required, add to...
 end

 If $NE1 + $NE2 and $NE3 can be added individually, you might omit the
 third rule and add $NE1 + $NE2 in the first rule. Or use the named
 consequence feature.

 -W



 On 14/01/2013, Bojan Janisch bojan.jani...@scai.fraunhofer.de wrote:
 Because the annotation should extract most of the unstructured
 information,
 into a structured object. So if there is optionally such an information
 like
 an anatomic side, I would want to add this information to my structured
 object.

 - Ursprüngliche Mail -
 Von: Wolfgang Laun wolfgang.l...@gmail.com
 An: Rules Users List rules-users@lists.jboss.org
 Gesendet: Montag, 14. Januar 2013 12:22:37
 Betreff: Re: [rules-users] Hello and my first question

 I take optional to mean don't care whether it is there or not - so
 why don't you simply omit this condition?

 -W

 On 14/01/2013, Bojan Janisch bojan.jani...@scai.fraunhofer.de wrote:
 Hello everybody,

 this is my first post and also my first question to you.
 I've searched the net for quite some hours now, but don't get any
 information regarding optionally conditions.

 I'm using drools to annotate some textobjects and I'm stucking with the
 following rule:

 When there are two named entities, one body side and one anatomy in a
 text
 (they're defined earlier by a textannotating system, so I'm working on
 annotated objects) and there is a optionally anatomic side (it contains
 generally something like lateral oder medial and so on), then
 generate
 me a new annotation.

 So up to now I'm on this state:

 Rule Anatomic Side

 when

  $NE1 : NE(Type.contains(body))
  $NE2 : NE(Type.contains(anatomy))

  //So here starts the problem
  [$NE3 : NE(Type.contains(anatomic))]

 then
  ...

 How can I set a condition as 

[rules-users] Guvnor model with 'Comparable' not working

2013-01-14 Thread Sandjaja, Dominik
Hi everybody,

I use Guvnor 5.4 and have a model which consists of classes and subclasses.

@Entity
public class TestClass {
@Id
private long id;

@Embedded
private TestEmbeddable embedded;
}

@Embeddable
public class TestEmbeddable implements ComparableTestEmbeddable {
@Column
private String testProperty;

@Override
public int compareTo(TestEmbeddable o) {...}
}

Now, in Guvnor I use the guided Editor and create a new WHEN condition:

There is a TestClass with:
embedded ...

Usually, when I click on embedded, I can select
  Apply a constraint to a sub-field of 'embedded': Show sub fields ...

This line does NOT show if that subclass (here: TestEmbeddable) implements 
Comparable. It does however work if I don't use Comparable or if I select 
TestEmbeddable directly (which I can't as I don't inject those into my working 
environment).

Is this a known bug? I couldn't find anything about this.

TIA
Dominik


...
mit freundlichen Gr??en / kind regards
Dominik Sandjaja
Fon: +49 (0) 203 60878 183
Fax: +49 (0) 203 60878 222
e-mail: dominik.sandj...@it-motive.de

it-motive AG
Zum Walkm?ller 10-12
47269 Duisburg
i...@it-motive.de
http://www.it-motive.de
..
Vorsitzender des Aufsichtsrats: Dipl.-Ing. Klaus Straub
Vorstand: Horst-Dieter Deelmann (Vors.), Matthias Heming, Christoph Tim Klose
HRB 9207, Amtsgericht Duisburg
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Stuck on simple testcase

2013-01-14 Thread Michiel Vermandel
Hi,

I hope this is ok: https://issues.jboss.org/browse/JBRULES-3716

Regards,

Michiel Vermandel

 
-
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials



 From: Geoffrey De Smet ge0ffrey.s...@gmail.com
To: Michiel Vermandel mverm...@yahoo.com; Rules Users List 
rules-users@lists.jboss.org 
Sent: Monday, January 14, 2013 2:34 PM
Subject: Re: Stuck on simple testcase
 



Op 14-01-13 14:16, Michiel Vermandel schreef:

Hi Geoffrey,


Putting the entityTabuSizeto 3 did fix the issue, indeed.
Many thanks for the tip.
With Feel free to make an issue about this., do you mean I should register 
an Issue here?: https://issues.jboss.org/issues/?jql=project%20%3D%20DROOLS

Do it in https://issues.jboss.org/browse/JBRULES in component drools-planner 
for now.

 
Thanks


-
http://www.codessentials.com - Your essential software, for
  free!
Follow us at http://twitter.com/#!/Codessentials



 From: Geoffrey De Smet ge0ffrey.s...@gmail.com
To: Michiel Vermandel mverm...@yahoo.com; Rules Users List 
rules-users@lists.jboss.org 
Sent: Monday, January 14, 2013 1:48 PM
Subject: Re: Stuck on simple testcase
 



Op 14-01-13 13:08, Michiel Vermandel schreef:

Hi,


I wrote a quite simple unit test which I expected to succeed.
But it does not, it ends with a negative score.
Enable logging trace (logging != environmentMode) and check if you can see the 
moves that it should take and why it doesn't take them.
A very small problem can't work with entityTabuSize 7
for example.
There are some idea's to auto-tweak the entityTabuSize
or at least automatically lower it if there are too
little entities.
Feel free to make an issue about this.

Though, it is easy to see on sight that there is a zero-score solution 
possible.
So... something must be wrong in some of my rules.


I was wondering if it is possible to manually set all planning variables to 
what I expected them to be and then see which rule(s) break(s)?
Yes, see Solver.getScoreDirectorFactory (see docs).

So planning variables should not be changed anymore while solving.


I'm using drools planner 5.5.0.Final.


Thanks,


Michiel
 
-
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials


___
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] Web services and Drools

2013-01-14 Thread riri
Thank you for your very quick replies. 


 You just need to create a Spring bean to act as the interface to your
 knowledge
 base. That way, Spring ensures that you have only one knowledge base
 instance in play, so it is configured and compiled when the application
 starts.

Does this mean that you can not have more than one knowledge base
configured? My application basically needs to offer the ability to edit and
test a user's own rules and facts (in a way similar to what Guvnor does but
much more simplified) and I do not know if that can be done using just one
knowledge base and sessions. I was thinking of having a separate knowledge
base per user and using a KnowledgeAgent for updating but I have yet to test
this approach.





--
View this message in context: 
http://drools.46999.n3.nabble.com/Web-services-and-Drools-tp4021509p4021515.html
Sent from the Drools: User forum 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] Stuck on simple testcase

2013-01-14 Thread Geoffrey De Smet

  
  

Op 14-01-13 15:42, Michiel Vermandel
  schreef:


  
Hi,

  
I hope this is ok:
https://issues.jboss.org/browse/JBRULES-3716
  

Looks good, thanks.

  

  
Regards,

  
Michiel Vermandel

-
  http://www.codessentials.com - Your essential software, for
  free!
  Follow us at http://twitter.com/#!/Codessentials


  
 
 From:
Geoffrey De Smet ge0ffrey.s...@gmail.com
To:
Michiel Vermandel mverm...@yahoo.com; Rules
Users List rules-users@lists.jboss.org 
Sent:
Monday, January 14, 2013 2:34 PM
Subject:
Re: Stuck on simple testcase
   


   
Op 14-01-13
  14:16, Michiel Vermandel schreef:


  
Hi Geoffrey,

  
Putting
the entityTabuSizeto 3 did fix the
  issue, indeed.
Many
  thanks for the tip.
With
  "Feel free to make an issue about this.", do you
  mean I should register an Issue here?: https://issues.jboss.org/issues/?jql=project%20%3D%20DROOLS

  

Do it in https://issues.jboss.org/browse/JBRULES
in component drools-planner for now.

  

  Thanks
  

-
  http://www.codessentials.com - Your essential
  software, for free!
  Follow us at http://twitter.com/#!/Codessentials


  
 
 From:
Geoffrey De Smet ge0ffrey.s...@gmail.com
To:
Michiel Vermandel mverm...@yahoo.com;
Rules Users List rules-users@lists.jboss.org

Sent:
Monday, January 14, 2013 1:48 PM
Subject:
Re: Stuck on simple testcase
   


   
Op
  14-01-13 13:08, Michiel Vermandel schreef:


  
Hi,

  
I
wrote a quite simple unit test which
I expected to succeed.
But

it does not, it ends with a negative
score.
  

Enable logging trace (logging !=
environmentMode) and check if you can see
the moves that it should take and why it
doesn't take them.
A very small problem can't work with
entityTabuSize 7 for example.
There are some idea's to auto-tweak the
entityTabuSize or at least automatically
lower it if there are too little entities.
Feel free to make an issue about this.

  
Though,

it is easy to see on sight that
there is a zero-score solution
possible.
So...

something must be wrong in some of
my rules.

  
I
was wondering if it is possible to
manually set all planning variables
to what I expected them to be and
then see which rule(s) break(s)?
  
   

Re: [rules-users] Web services and Drools

2013-01-14 Thread Stephen Masters
Oh no … I have multiple knowledge bases configured in my apps. I just use a 
separate Spring bean to wrap each. :)

Although for your purposes it shouldn't be too tricky to manage a pool of 
knowledge bases or create a reference to one per user session. The main risk 
would be memory usage if you have a large knowledge base or lots of facts, as a 
knowledge base and session is relatively memory hungry. Depends on how many 
users you have I guess.


On 14 Jan 2013, at 14:44, riri irina.a...@gmail.com wrote:

 Thank you for your very quick replies. 
 
 
 You just need to create a Spring bean to act as the interface to your
 knowledge
 base. That way, Spring ensures that you have only one knowledge base
 instance in play, so it is configured and compiled when the application
 starts.
 
 Does this mean that you can not have more than one knowledge base
 configured? My application basically needs to offer the ability to edit and
 test a user's own rules and facts (in a way similar to what Guvnor does but
 much more simplified) and I do not know if that can be done using just one
 knowledge base and sessions. I was thinking of having a separate knowledge
 base per user and using a KnowledgeAgent for updating but I have yet to test
 this approach.
 
 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Web-services-and-Drools-tp4021509p4021515.html
 Sent from the Drools: User forum 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] Web services and Drools

2013-01-14 Thread kurrent93
I am using Jboss Switchyard. It has built in support for drools services.





--
View this message in context: 
http://drools.46999.n3.nabble.com/Web-services-and-Drools-tp4021509p4021519.html
Sent from the Drools: User forum 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] Web services and Drools

2013-01-14 Thread riri
Stephen Masters wrote
 The main risk would be memory usage if you have a large knowledge base or
 lots of facts, as a knowledge base and session is relatively memory
 hungry. Depends on how many users you have I guess.

Yes, I am aware of the potential memory problems but as of now I do not have
other ideas on how to meet the requirements. Spring is a very popular
framework and I will be taking it into account into my choices, so thank you
for offering to help me out.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Web-services-and-Drools-tp4021509p4021520.html
Sent from the Drools: User forum 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] Which libs should I update after update?

2013-01-14 Thread André Fróes
I'm trying by maven, but still can't do it

modelVersion4.0.0/modelVersion
artifactIdai/artifactId
nameProj/name
packagingjar/packaging

parent
groupIdmy.new.project/groupId
artifactIdparent-pom/artifactId
version1.0.0/version
/parent
 properties
org.drools.version5.5.0.Final/org.drools.version
org.codehaus.janino.version2.5.16/org.codehaus.janino.version
/properties

!-- Dependencies --
dependencies

!-- Projects --
dependency
groupIdmy.new.project/groupId
artifactIdcommons/artifactId
version1.0.0/version
/dependency

!-- API --
dependency
groupIdorg.drools/groupId
artifactIddrools-core/artifactId
version${org.drools.version}/version
scopeprovided/scope
/dependency
dependency
groupIdorg.drools/groupId
artifactIddrools-compiler/artifactId
version${org.drools.version}/version
scopeprovided/scope
/dependency
dependency
groupIdorg.codehaus.janino/groupId
artifactIdjanino/artifactId
version${org.codehaus.janino.version}/version
scopeprovided/scope
/dependency
/dependencies

is this right?


2013/1/14 Geoffrey De Smet ge0ffrey.s...@gmail.com

 If you're using maven/gradle/ivy/buildr, just update the version and let
 it figure out the transitive dependencies.
 Although you might want to use the enforcer plugin to check if you
 haven't overwritten any transitive dependency to a lower version:
 http://maven.apache.org/enforcer/enforcer-rules/requireUpperBoundDeps.html

 If you're using ant, basically replace all of them with those from the
 5.5 lib zip.
 If you want to get rid of dead deps, compare the 5.4 lib zip with the
 5.5 lib zip afterwards (= painful).
 If you just want the subset of deps that you need (like with maven, for
 example if you only use drools-core, you don't need most of the deps in
 the lib zip), don't use ant.

 Op 14-01-13 12:44, Andre Froes schreef:
  Hello everyone,
 
  in order to update from drools 5.4 to 5.5 which lib should I update? Or
 must
  I replace them all?
 
  Thanks
 
 
 
  --
  View this message in context:
 http://drools.46999.n3.nabble.com/Which-libs-should-I-update-after-update-tp4021500.html
  Sent from the Drools: User forum 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

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


Re: [rules-users] Guvnor seems to copy assets across External RDBMS and file system

2013-01-14 Thread Yuri
Thanks for the reply Jervis.  I would like to clarify my question, however:
Guvnor uses a great deal of technologies with which I am not at all
familiar. I am new to JCR in general and jackrabbit in particular, so even
when I get something to seemingly work, I still question whether I've
broken a best practice.  Having said that, I used guvnor admin tool to
create the repository.xml file, and there are two spots where it still
points to the file system instead of the DB.  In both cases, it is the
SearchIndex element, using the lucene library.  I am pretty sure this is
what is still creating the folders in my file system.  My question is:
since the DB has its own indexes, do I still need the SearchIndex elements,
and if so, is it better to leave them pointing to the file system?  I am
asking because I assume that the repository.xml generated by the Guvnor
admin tool is more accurate than what I would create as a novice.
Thanks again for the help!
Best,
Yuri


On Thu, Jan 10, 2013 at 8:55 PM, Jervis Liu j...@redhat.com wrote:

  On 2013/1/10 23:30, Yuri wrote:

  I set up SQL Server as the external repository, and left everything else
 in guvnor and jboss AS7 configured pretty much according to defaults.

 When I create assets in guvnor, I see that changes are being made in the
 MSSQL db. Despite changes to the db, however, I'm still seeing changes to
 the Repository and Workspace folders. It gets more interesting when I
 truncate the tables in the external guvnor db, and restart guvnor, it seems
 to get all of its assets back from those two folders.

 If you truncate your external db and you still get all assets back when
 your restart Guvnor, then there must be some problems with your
 configurations. Guvnor does nothing special as far as the persistent layer
 is concerned, you should be able to follow JackRabbit document to set it up
 correctly, for example:
 http://jackrabbit.apache.org/jackrabbit-configuration.html#JackrabbitConfiguration-Persistenceconfiguration

 Cheers,
 Jervis

   Am I doing something wrong? Is it reconstructing the assets from lucene
 indexes? If MSSQL is already indexing things, is the lucene index still
 necessary? Are these basic JCR concepts that I am not grasping?

 Thanks, Yuri


 ___
 rules-users mailing 
 listrules-users@lists.jboss.orghttps://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] Guvnor seems to copy assets across External RDBMS and file system

2013-01-14 Thread Tihomir Surdilovic
Hi Yuri, the lucene search indexes cannot be persisted to the JCR repo. 
They will always be persisted to your local file system. They can be 
removed however between server startups and will get regenerated on next 
use. The Guvnor admin tool generates Jackrabbit configs for different 
databases so its a good thing to use them, but you can always edit the 
generated configurations for your specific needs.


HTH
Tihomir
On 1/14/13 1:22 PM, Yuri wrote:
Thanks for the reply Jervis.  I would like to clarify my question, 
however: Guvnor uses a great deal of technologies with which I am not 
at all familiar. I am new to JCR in general and jackrabbit in 
particular, so even when I get something to seemingly work, I still 
question whether I've broken a best practice.  Having said that, I 
used guvnor admin tool to create the repository.xml file, and there 
are two spots where it still points to the file system instead of the 
DB.  In both cases, it is the SearchIndex element, using the lucene 
library.  I am pretty sure this is what is still creating the folders 
in my file system.  My question is: since the DB has its own indexes, 
do I still need the SearchIndex elements, and if so, is it better to 
leave them pointing to the file system?  I am asking because I assume 
that the repository.xml generated by the Guvnor admin tool is more 
accurate than what I would create as a novice.

Thanks again for the help!
Best,
Yuri


On Thu, Jan 10, 2013 at 8:55 PM, Jervis Liu j...@redhat.com 
mailto:j...@redhat.com wrote:


On 2013/1/10 23:30, Yuri wrote:


I set up SQL Server as the external repository, and left
everything else in guvnor and jboss AS7 configured pretty much
according to defaults.

When I create assets in guvnor, I see that changes are being made
in the MSSQL db. Despite changes to the db, however, I'm still
seeing changes to the Repository and Workspace folders. It gets
more interesting when I truncate the tables in the external
guvnor db, and restart guvnor, it seems to get all of its assets
back from those two folders.


If you truncate your external db and you still get all assets back
when your restart Guvnor, then there must be some problems with
your configurations. Guvnor does nothing special as far as the
persistent layer is concerned, you should be able to follow
JackRabbit document to set it up correctly, for example:

http://jackrabbit.apache.org/jackrabbit-configuration.html#JackrabbitConfiguration-Persistenceconfiguration

Cheers,
Jervis


Am I doing something wrong? Is it reconstructing the assets from
lucene indexes? If MSSQL is already indexing things, is the
lucene index still necessary? Are these basic JCR concepts that I
am not grasping?

Thanks, Yuri



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



___
rules-users mailing list
rules-users@lists.jboss.org mailto: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] not able to access Guvnor repository files when using webdav folders for Guvnor 5.4 deployed on Tomcat 7 and windows 2008 64 bit server

2013-01-14 Thread vadlam
Jervis,

Thank You for confirming the issue. 

The scenario I am having is  as such.


the first time  Guvnor 5.4.0.final in Tomcat 7 is started, I am able to
connect to both webdav folders and also through a java client using basic
authentication.

but when I disconnect the web folders  connection after a while, I can no
longer get access to the packages through the java client or reconnect the
webdav folders again unless I restart Tomcat. 



does this issue seem to be similar or close as what you have created the bug
for ?

Please let me know if I have not been clear enough in explaining my
scenario.



-
Ram
--
View this message in context: 
http://drools.46999.n3.nabble.com/not-able-to-access-Guvnor-repository-files-when-using-webdav-folders-for-Guvnor-5-4-deployed-on-Tomcr-tp4021300p4021524.html
Sent from the Drools: User forum 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] Guvnor seems to copy assets across External RDBMS and file system

2013-01-14 Thread Yuri
That is what I was looking for - thanks Tihomir!


On Mon, Jan 14, 2013 at 12:34 PM, Tihomir Surdilovic tsurd...@redhat.comwrote:

  Hi Yuri, the lucene search indexes cannot be persisted to the JCR repo.
 They will always be persisted to your local file system. They can be
 removed however between server startups and will get regenerated on next
 use. The Guvnor admin tool generates Jackrabbit configs for different
 databases so its a good thing to use them, but you can always edit the
 generated configurations for your specific needs.

 HTH
 Tihomir

 On 1/14/13 1:22 PM, Yuri wrote:

 Thanks for the reply Jervis.  I would like to clarify my question,
 however: Guvnor uses a great deal of technologies with which I am not at
 all familiar. I am new to JCR in general and jackrabbit in particular, so
 even when I get something to seemingly work, I still question whether I've
 broken a best practice.  Having said that, I used guvnor admin tool to
 create the repository.xml file, and there are two spots where it still
 points to the file system instead of the DB.  In both cases, it is the
 SearchIndex element, using the lucene library.  I am pretty sure this is
 what is still creating the folders in my file system.  My question is:
 since the DB has its own indexes, do I still need the SearchIndex elements,
 and if so, is it better to leave them pointing to the file system?  I am
 asking because I assume that the repository.xml generated by the Guvnor
 admin tool is more accurate than what I would create as a novice.
 Thanks again for the help!
 Best,
 Yuri


 On Thu, Jan 10, 2013 at 8:55 PM, Jervis Liu j...@redhat.com wrote:

  On 2013/1/10 23:30, Yuri wrote:

  I set up SQL Server as the external repository, and left everything
 else in guvnor and jboss AS7 configured pretty much according to defaults.

 When I create assets in guvnor, I see that changes are being made in the
 MSSQL db. Despite changes to the db, however, I'm still seeing changes to
 the Repository and Workspace folders. It gets more interesting when I
 truncate the tables in the external guvnor db, and restart guvnor, it seems
 to get all of its assets back from those two folders.

  If you truncate your external db and you still get all assets back when
 your restart Guvnor, then there must be some problems with your
 configurations. Guvnor does nothing special as far as the persistent layer
 is concerned, you should be able to follow JackRabbit document to set it up
 correctly, for example:
 http://jackrabbit.apache.org/jackrabbit-configuration.html#JackrabbitConfiguration-Persistenceconfiguration

 Cheers,
 Jervis

   Am I doing something wrong? Is it reconstructing the assets from
 lucene indexes? If MSSQL is already indexing things, is the lucene index
 still necessary? Are these basic JCR concepts that I am not grasping?

 Thanks, Yuri


  ___
 rules-users mailing 
 listrules-users@lists.jboss.orghttps://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 
 listrules-users@lists.jboss.orghttps://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] Which libs should I update after update?

2013-01-14 Thread Geoffrey De Smet

  
  

Op 14-01-13 18:27, Andr Fres schreef:


  I'm trying by maven, but still can't do it



  modelVersion4.0.0/modelVersion
artifactIdai/artifactId
nameProj/name
packagingjar/packaging
  
  
   parent
   groupIdmy.new.project/groupId
   artifactIdparent-pom/artifactId
   version1.0.0/version
   /parent
   
   properties
   org.drools.version5.5.0.Final/org.drools.version
   org.codehaus.janino.version2.5.16/org.codehaus.janino.version 
   /properties
   
  
  
!-- Dependencies --
dependencies
  
  
  !-- Projects --
  dependency
groupIdmy.new.project/groupId
artifactIdcommons/artifactId
version1.0.0/version
  /dependency
  
  
  !-- API --
  dependency
groupIdorg.drools/groupId
   
artifactIddrools-core/artifactId
   
version${org.drools.version}/version
scopeprovided/scope

  

Why go scope provided?

  

  /dependency
  dependency
groupIdorg.drools/groupId
   
artifactIddrools-compiler/artifactId
   
version${org.drools.version}/version
scopeprovided/scope

  

Why go scope provided?

  

  /dependency
  dependency
   
groupIdorg.codehaus.janino/groupId
artifactIdjanino/artifactId

  

By default drools-compiler transitively depends on a java compiler
(I forgot if it's janino or eclipse jdt),
so you don't need to specify that dependency.
If you want to use the other one, you might want to exclude the
default.
Either way, you might want to try first with the default one, by not
declaring any janino/jdt dependency and let maven drag in the
transitive dependency automatically.

  

   
version${org.codehaus.janino.version}/version
scopeprovided/scope
  /dependency
/dependencies



is this right?
  
  

2013/1/14 Geoffrey De Smet ge0ffrey.s...@gmail.com
  
If you're using
  maven/gradle/ivy/buildr, just update the version and let
  it figure out the transitive dependencies.
  Although you might want to use the enforcer plugin to
  check if you
  haven't overwritten any transitive dependency to a lower
  version:
  http://maven.apache.org/enforcer/enforcer-rules/requireUpperBoundDeps.html
  
  If you're using ant, basically replace all of them with
  those from the
  5.5 lib zip.
  If you want to get rid of dead deps, compare the 5.4 lib
  zip with the
  5.5 lib zip afterwards (= painful).
  If you just want the subset of deps that you need (like
  with maven, for
  example if you only use drools-core, you don't need most
  of the deps in
  the lib zip), don't use ant.
  
  Op 14-01-13 12:44, Andre Froes schreef:


   Hello everyone,

 in order to update from drools 5.4 to 5.5 which lib
should I update? Or must
 I replace them all?

 Thanks



 --
 View this message in context: http://drools.46999.n3.nabble.com/Which-libs-should-I-update-after-update-tp4021500.html
 Sent from the Drools: User forum 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
  

  


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



  

___
rules-users mailing list

[rules-users] Drools KnowledgeAgent not picking up drl resource updates

2013-01-14 Thread js203
Hi,

I am looking for a way to update drools rules files in our production
environment without having to go through a full application rebuild and
redeploy to pick up .drl modifications.
To make this seamless, I'm investigating using change sets but I can't get a
KnowledgeBase to update when a .drl is updated.

Here is the code I have, all files are in the /root/com/me/drools package:
*1. DroolsConfig.java - Helper class to configure and start a
KnowledgeAgent. It references a local change-set.xml to manage the Drools
resources and scan for resource changes every 2 seconds*

package com.me.drools;

import org.drools.KnowledgeBase;
import org.drools.agent.KnowledgeAgent;
import org.drools.agent.KnowledgeAgentConfiguration;
import org.drools.agent.KnowledgeAgentFactory;
import org.drools.builder.KnowledgeBuilderConfiguration;
import org.drools.io.ResourceChangeScannerConfiguration;
import org.drools.io.ResourceFactory;

public class DroolsConfig {
public KnowledgeBase getAgentKnowledgeBase() {
ResourceFactory.getResourceChangeNotifierService().start();
ResourceFactory.getResourceChangeScannerService().start();

ResourceChangeScannerConfiguration sconf =
ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration();
sconf.setProperty(drools.resource.scanner.interval, 2);
ResourceFactory.getResourceChangeScannerService().configure(sconf);

KnowledgeAgentConfiguration aconf =
KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
aconf.setProperty(drools.agent.scanDirectories, true);
aconf.setProperty(drools.agent.scanResources, true);
aconf.setProperty(drools.agent.newInstance, true);
KnowledgeAgent knowledgeAgent =
KnowledgeAgentFactory.newKnowledgeAgent(CS, aconf);
   
knowledgeAgent.applyChangeSet(ResourceFactory.newFileResource(/root/com/me/drools/change-set.xml));

return knowledgeAgent.getKnowledgeBase();
}
}

*2. change-set.xml - Referenced from DroolsConfig and manages a local rules
file*
change-set xmlns='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.xsd
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd'
add
resource source='file:/root/com/me/drools/personrules.drl'
type='DRL' /
/add
/change-set

To test this out I have the following JUnit. The aim is to run the test and
during the loop execution, change the condition in the drl so that the
KnowledgeBase updates and rule results differ.

*3. DroolsConfigTest.java - Tests DroolsConfig. Rule results should change
during loop execution if drl is updated*

package com.me.drools;

import org.drools.KnowledgeBase;
import org.drools.runtime.StatelessKnowledgeSession;
import org.junit.Test;

public class DroolsConfigTest {
@Test
public void testGetAgentKnowledgeBase() throws Exception {
Person person = new Person();
DroolsConfig droolsConfig = new DroolsConfig();

KnowledgeBase kb = droolsConfig.getAgentKnowledgeBase();

for (int i = 0; i  10; i++) {
StatelessKnowledgeSession session =
kb.newStatelessKnowledgeSession();
session.execute(person);
Thread.currentThread().sleep(3000);
System.out.println(person.getErrors().size());
}
System.out.println(Errors:  + person.getErrors());
}
}

Just for reference here is PersonTO and the person.drl rules file.
*4. Person.java - Simple object to fire rules against*
package com.me.drools;

import java.util.ArrayList;
import java.util.List;

public class Person {
private String name;

private ListString errors = new ArrayListString();

public void addError(final String error) {
errors.add(error);
}

public ListString getErrors() {
return errors;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}

*5. personrules.drl*
package com.me.drools

import com.me.drools.Person

dialect java

rule name_is_null
when
$p : Person( name == null )
then
$p.addError(Name is null);
end


So, as mentioned when the for loop in DroolsConfigTest is running, I'm
changing the condition in the personrules.drl file from name == null to name
!= null which should mean that errors are no longer added to the errors List
in Person.class but the error count keeps on going up.
Can anybody see why the KnowledgeAgent isn't updating and how I can make
this configuration work so that I can change the drl on the fly and have the
rules behave accordingly?

Thanks



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-KnowledgeAgent-not-picking-up-drl-resource-updates-tp4021527.html
Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] Which libs should I update after update?

2013-01-14 Thread Andre Froes
Thanks for the assjstance, I managed to do it. The problem was a ljb, slf4j.

Best regards
Em 14/01/2013 17:55, ge0ffrey [via Drools] 
ml-node+s46999n4021526...@n3.nabble.com escreveu:


 Op 14-01-13 18:27, André Fróes schreef:

 I'm trying by maven, but still can't do it

  modelVersion4.0.0/modelVersion
 artifactIdai/artifactId
 nameProj/name
 packagingjar/packaging

  parent
  groupIdmy.new.project/groupId
  artifactIdparent-pom/artifactId
  version1.0.0/version
  /parent
   properties
  org.drools.version5.5.0.Final/org.drools.version
  org.codehaus.janino.version2.5.16/org.codehaus.janino.version
  /properties

  !-- Dependencies --
 dependencies

  !-- Projects --
 dependency
 groupIdmy.new.project/groupId
 artifactIdcommons/artifactId
 version1.0.0/version
 /dependency

  !-- API --
 dependency
 groupIdorg.drools/groupId
 artifactIddrools-core/artifactId
 version${org.drools.version}/version
 scopeprovided/scope

 Why go scope provided?

  /dependency
 dependency
 groupIdorg.drools/groupId
 artifactIddrools-compiler/artifactId
 version${org.drools.version}/version
 scopeprovided/scope

 Why go scope provided?

  /dependency
 dependency
 groupIdorg.codehaus.janino/groupId
 artifactIdjanino/artifactId

 By default drools-compiler transitively depends on a java compiler (I
 forgot if it's janino or eclipse jdt),
 so you don't need to specify that dependency.
 If you want to use the other one, you might want to exclude the default.
 Either way, you might want to try first with the default one, by not
 declaring any janino/jdt dependency and let maven drag in the transitive
 dependency automatically.

  version${org.codehaus.janino.version}/version
 scopeprovided/scope
 /dependency
 /dependencies

  is this right?


 2013/1/14 Geoffrey De Smet [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4021526i=0
 

 If you're using maven/gradle/ivy/buildr, just update the version and let
 it figure out the transitive dependencies.
 Although you might want to use the enforcer plugin to check if you
 haven't overwritten any transitive dependency to a lower version:
 http://maven.apache.org/enforcer/enforcer-rules/requireUpperBoundDeps.html

 If you're using ant, basically replace all of them with those from the
 5.5 lib zip.
 If you want to get rid of dead deps, compare the 5.4 lib zip with the
 5.5 lib zip afterwards (= painful).
 If you just want the subset of deps that you need (like with maven, for
 example if you only use drools-core, you don't need most of the deps in
 the lib zip), don't use ant.

 Op 14-01-13 12:44, Andre Froes schreef:
   Hello everyone,
 
  in order to update from drools 5.4 to 5.5 which lib should I update? Or
 must
  I replace them all?
 
  Thanks
 
 
 
  --
  View this message in context:
 http://drools.46999.n3.nabble.com/Which-libs-should-I-update-after-update-tp4021500.html
  Sent from the Drools: User forum mailing list archive at Nabble.com.
  ___
  rules-users mailing list
  [hidden email] http://user/SendEmail.jtp?type=nodenode=4021526i=1
  https://lists.jboss.org/mailman/listinfo/rules-users
 

 ___
 rules-users mailing list
 [hidden email] http://user/SendEmail.jtp?type=nodenode=4021526i=2
 https://lists.jboss.org/mailman/listinfo/rules-users




 ___
 rules-users mailing list[hidden email] 
 http://user/SendEmail.jtp?type=nodenode=4021526i=3https://lists.jboss.org/mailman/listinfo/rules-users



 ___
 rules-users mailing list
 [hidden email] http://user/SendEmail.jtp?type=nodenode=4021526i=4
 https://lists.jboss.org/mailman/listinfo/rules-users


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://drools.46999.n3.nabble.com/Which-libs-should-I-update-after-update-tp4021500p4021526.html
  To unsubscribe from Which libs should I update after update?, click 
 herehttp://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4021500code=YXJmbW9yYWVzQGdtYWlsLmNvbXw0MDIxNTAwfC0xNzc4ODYzNTkz
 .
 NAMLhttp://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://drools.46999.n3.nabble.com/Which-libs-should-I-update-after-update-tp4021500p4021528.html
Sent from the Drools: User forum 

[rules-users] [Switchyard RuleService] Rule doesnt fire when in FireAllRules mode

2013-01-14 Thread kurrent93
Im confused about why my rule isnt firing.

Im using Jboss SwitchYard.
This is the only difference from the switchyard perspective:
rules:action name=sendData type=FIRE_ALL_RULES
entryPoint=AccountData/ 


And when I use EXECUTE the rule fires.

When I use FIRE_ALL_RULES, it never gets activated.

This is my rule:
|   rule OpenTrade-Open
2.  |   agenda-group OpenTrade
3.  |   no-loop true
4.  |   dialect mvel
5.  |   when
6.  |   Tick( ) over window:time (1m) from entry-point 
AccountData
7.  |   then
8.  |   TradeOrder newTrade = new TradeOrder();
9.  |   newTrade.setSymbol( EURUSD );
10. |   newTrade.setVolume( 1 );
11. |   newTrade.setMt4username( 4002642 );
12. |   newTrade.setStatus( OrderStatus.OPENING );
13. |   newTrade.setOperation( OP_BUY );
14. |   newTrade.setComment( From Magick.Rhythm );
15. |   insert( newTrade );
16. |   modifiedOrderList.add(newTrade);
17. |   end



--
View this message in context: 
http://drools.46999.n3.nabble.com/Switchyard-RuleService-Rule-doesnt-fire-when-in-FireAllRules-mode-tp4021530.html
Sent from the Drools: User forum 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] not able to access Guvnor repository files when using webdav folders for Guvnor 5.4 deployed on Tomcat 7 and windows 2008 64 bit server

2013-01-14 Thread Jervis Liu
On 2013/1/15 2:55, vadlam wrote:
 Jervis,

 Thank You for confirming the issue.

 The scenario I am having is  as such.


 the first time  Guvnor 5.4.0.final in Tomcat 7 is started, I am able to
 connect to both webdav folders and also through a java client using basic
 authentication.

 but when I disconnect the web folders  connection after a while, I can no
 longer get access to the packages through the java client or reconnect the
 webdav folders again unless I restart Tomcat.



 does this issue seem to be similar or close as what you have created the bug
 for ?
Hi Ram,

I've updated https://issues.jboss.org/browse/GUVNOR-1986 with a 
how-to-reproduce section. No, what I have observed is different from 
yours, webdav can not be connected from the very beginning.  The root 
cause of the problem is the authentication info (username/pwd) didnt get 
passed into authenticator correctly. I've tested this problem on 
Windows,  but your mileage may vary if you are using a different webdav 
client. The most crucial thing to check is, it must be a same problem if 
you see following exception from the server log:

INFO 15-01 09:49:07,499 (DemoAuthenticator.java:authenticate:54) Demo lo
gin for user (null) failed: unsupported username/credential.
WARN 15-01 09:49:07,499 (AuthorizationHeaderChecker.java:loginByHeader:65)
Unable to authenticate for rest api: null

Cheers,
Jervis
 Please let me know if I have not been clear enough in explaining my
 scenario.



 -
 Ram
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/not-able-to-access-Guvnor-repository-files-when-using-webdav-folders-for-Guvnor-5-4-deployed-on-Tomcr-tp4021300p4021524.html
 Sent from the Drools: User forum 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] Difficulty determining why I have score corruption

2013-01-14 Thread megwoods
Hi Geofrey,

Yes it is 5.5.0.Final.

From the following artifacts:

group: 'org.drools.planner', name: 'drools-planner-core', version:
'5.5.0.Final'
group: 'org.drools', name: 'drools-core', version: '5.5.0.Final'
group: 'org.drools', name: 'drools-compiler', version: '5.5.0.Final'

Cheers Megan



--
View this message in context: 
http://drools.46999.n3.nabble.com/Difficulty-determining-why-I-have-score-corruption-tp4021412p4021533.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users