Re: [rules-users] [Optaplanner] Help on drl

2013-11-29 Thread Wolfgang Laun
On 28/11/2013, Tales Costa ta...@ibiseng.com wrote:
 Hi,

 I am new to Drools and Optaplanner and have built a first model and
 succeeded running with java score calculation. Now am struggling trying to
 use rules for score.

 Have read Drools Expert User Guide and looked through Optaplanner
 examples but am still confused. Main difficult is discovering what can do
 and can´t do with java dialect within the when and then blocks. Are
 there tutorial and/or other references I could look into for more
 information on this ?

The rules are actually quite simple.

LHS: Any boolean expression is valid, with the shortcuts for accessing
members. If the parser misbehaves, try eval() - there it's pure Java.

RHS: Java code, as in any method, plus the macros defined in Expert.

That said, some things should not be done:
   * Never use side effects in LHS expressions that modifies anything
in working memory.
   * Don't write long then parts; calling static methods is preferred.

-W






 regards

 Tales


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


[rules-users] Guvnor 6.0.0.Final: Unable to connect to guvnor repository using JBoss Dev Studio

2013-11-29 Thread nelson.wan

Using Drools/Guvnor 5.5.0.Final eclipse plugins, we can connect to guvnor
repository.

But not the case when using Drools/Guvnor 6.0.0.Final eclipse plugins.

See if anyone has tried the same in Eclipse.

Guvnor6_Repository_URL.doc
http://drools.46999.n3.nabble.com/file/n4027002/Guvnor6_Repository_URL.doc  



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-6-0-0-Final-Unable-to-connect-to-guvnor-repository-using-JBoss-Dev-Studio-tp4027002.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] Optaplanner with Apache Commons Collections 4.0

2013-11-29 Thread Geoffrey De Smet

On 27-11-13 22:12, jonathan.labin wrote:
 Apache Commons Collections 4.0 has been released and has some data structures
 that I'm interested in using in my application.

 To your knowledge can Optaplanner function with version 4.0 swapped in place
 of 3.2.1?
I am not of anyone that tried besides you.
If you want to be confident it's safe, do the following:

git clone optaplanner
cd optaplanner
gedit pom.xml
// in dependencyManagement overwrite the commons-collections 
dependency to 4.0 and save
mvn clean install
// runs all unit and integration tests in about 8 minutes (without the 
stress test that take 30 hours but don't cover more code)

If the build succeeds, its fine.

 I have tried this and not encountered any issues at build or run time but
 that of course doesn't mean they aren't there.

 Will the next release of Optaplanner leverage this more recent release of
 Collections?
Probably not in the next release. IIRC Hibernate, EAP 6, etc are still 
using commons-collections 3.x,
so it would be too early to jump to a new major release (a minor or 
hotfix release would be less trouble).
Sooner or later, we will upgrade though.

Side note: I am seriously considering of adding a guava dependency in 
optaplanner 6.1 and dump the commons-collections dependency altogether.
   https://issues.jboss.org/browse/PLANNER-209
Wdyt?


 Thanks,

 Jon



 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Optaplanner-with-Apache-Commons-Collections-4-0-tp4026958.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] BEST_FIT Null Pointer Exception

2013-11-29 Thread Geoffrey De Smet
 Exception in thread main java.lang.NullPointerException
   at
 com.example.domain.solver.MyVariableStrengthComparator.compare(MyVariableStrengthComparator.java:30)
That's an NPE in your code :)
(if that doesn't make any sense, any decent Java Programming 
course/tutorial should cover how to diagnose and fix that)

On 28-11-13 13:32, newbie wrote:
 Exception in thread main java.lang.NullPointerException
   at
 com.example.domain.solver.MyVariableStrengthComparator.compare(MyVariableStrengthComparator.java:30)
   at
 com.example.domain.solver.MyVariableStrengthComparator.compare(MyVariableStrengthComparator.java:1)
   at java.util.Arrays.mergeSort(Arrays.java:1270)
   at java.util.Arrays.mergeSort(Arrays.java:1282)
   at java.util.Arrays.mergeSort(Arrays.java:1282)
   at java.util.Arrays.mergeSort(Arrays.java:1282)
   at java.util.Arrays.mergeSort(Arrays.java:1282)
   at java.util.Arrays.sort(Arrays.java:1210)
   at java.util.Collections.sort(Collections.java:159)
   at
 org.optaplanner.core.impl.heuristic.selector.common.decorator.ComparatorSelectionSorter.sort(ComparatorSelectionSorter.java:28)
   at
 org.optaplanner.core.impl.heuristic.selector.value.decorator.SortingValueSelector.constructCache(SortingValueSelector.java:43)
   at
 org.optaplanner.core.impl.heuristic.selector.common.SelectionCacheLifecycleBridge.phaseStarted(SelectionCacheLifecycleBridge.java:48)
   at
 org.optaplanner.core.impl.phase.event.SolverPhaseLifecycleSupport.firePhaseStarted(SolverPhaseLifecycleSupport.java:41)
   at
 org.optaplanner.core.impl.heuristic.selector.AbstractSelector.phaseStarted(AbstractSelector.java:47)
   at
 org.optaplanner.core.impl.phase.event.SolverPhaseLifecycleSupport.firePhaseStarted(SolverPhaseLifecycleSupport.java:41)
   at
 org.optaplanner.core.impl.heuristic.selector.AbstractSelector.phaseStarted(AbstractSelector.java:47)
   at
 org.optaplanner.core.impl.heuristic.selector.value.decorator.ReinitializeVariableValueSelector.phaseStarted(ReinitializeVariableValueSelector.java:52)
   at
 org.optaplanner.core.impl.phase.event.SolverPhaseLifecycleSupport.firePhaseStarted(SolverPhaseLifecycleSupport.java:41)
   at
 org.optaplanner.core.impl.heuristic.selector.AbstractSelector.phaseStarted(AbstractSelector.java:47)
   at
 org.optaplanner.core.impl.phase.event.SolverPhaseLifecycleSupport.firePhaseStarted(SolverPhaseLifecycleSupport.java:41)
   at
 org.optaplanner.core.impl.heuristic.selector.AbstractSelector.phaseStarted(AbstractSelector.java:47)
   at
 org.optaplanner.core.impl.phase.event.SolverPhaseLifecycleSupport.firePhaseStarted(SolverPhaseLifecycleSupport.java:41)
   at
 org.optaplanner.core.impl.constructionheuristic.placer.AbstractEntityPlacer.phaseStarted(AbstractEntityPlacer.java:41)
   at
 org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicSolverPhase.phaseStarted(DefaultConstructionHeuristicSolverPhase.java:120)
   at
 org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicSolverPhase.solve(DefaultConstructionHeuristicSolverPhase.java:62)
   at
 org.optaplanner.core.impl.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:190)
   at
 org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:155)



 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/BEST-FIT-Null-Pointer-Exception-tp4026935p4026977.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] Fwd: [ljc] Call for Help - OSS projects

2013-11-29 Thread Stephen Masters
Hi Mark and the gang,

Not sure whether you guys have seen this already (I’m guessing some of you must 
in in LJC), but if you’re looking for more London-based developers to get 
involved in the community side of Drools/KIE related projects, then it might be 
worth checking this out.

Steve


Begin forwarded message:

 From: Barry Cranford b...@recworks.co.uk
 Subject: [ljc] Call for Help - OSS projects
 Date: 29 November 2013 06:39:11 GMT
 To: ljc-l...@meetup.com
 Reply-To: ljc-l...@meetup.com
 
 TL;DR
 
 - We have had 44 LJC events this year. Woo!
 - We need to connect with more OSS projects for an upcoming Meet a Project 
 event
 
 
 Hi All,
 
 We are nearly at the end of our year of events (we have had 44 LJC events so 
 far this year). Our very last one of the year is a 'Meet a Project' event 
 scheduled and are looking for some budding project leads that are going to 
 come down and present their projects to small groups of developers, eager to 
 find a new OSS project or similar to get their teeth into.
 
 Date: 11th December
 Time: 6:30
 Venue:UCL, London
 
 If you are interested please reply to me directly.
 
 To give you a bit of background to these events and why we started this 
 initiative - one thing I have observed over the years, both as a recruiter 
 and as a community leader is that there is a gap in the software industry, 
 around open source software. There are a lot of developers in the industry, 
 from students to experienced developers that are interested to get involved 
 in something in addition to their day time position, but aren't really sure 
 where to start. There are also a great deal of interesting projects covering 
 everything from popular open source frameworks to the Adopt a JSR program 
 launched by the LJC. Many of these projects rely on support/enthusiasm from 
 developers and are keen to get more enthusiastic people involved. Not to 
 mention that most candidates that get involved in personal projects seem to 
 escalate their careers, salaries, day rates and passion for the industry 
 (which all makes our job easier ;-)).
 
 Having been involved in several sporadic events over the last few years that 
 aim to plug this gap, we started a series of events called LJC Meet a Project 
 (#LJCMaP). They are run in a speed networking style, similar to the GDC Meet 
 a Mentor events, they involve Project Ambassadors speaking to small groups of 
 3-6 developers. Giving a pitch of the project, then answering questions 
 before moving on to another group. The events are intended to answer 
 potential committers' questions around the projects, focussed mainly around 
 starting points. These are not recruitment events or opportunities for 
 companies to find new employees, but to help offer a way for developers to 
 work alongside their existing positions to gain experience and develop 
 communications and technical skills. The events are organised by RecWorks, 
 the events team here will take care of all of the organisation/facilitation 
 of the events to ensure that all is well organised and the process is as 
 smooth as possible, so all you need to do is turn up on the day.
 
 Thanks all, let me know if you have any questions.
 
 Warm regards,
 Barry
 
 
 
 
 | recworks.co.uk | b...@recworks.co.uk | LinkedIn | Skype barrycranford | +44 
 7876 355215 |
 | Office +44 20 7866 8155 |  Fax: +44 20 7379 0801 | 
 
 If you like what we do please tweet about it. Just use the hashtag 
 #recworksreco
 
 RecWorks Ltd  |  Registered in England and Wales. Registered No. 05864437 
 
 Email disclaimer: This email contains information which may be confidential. 
 It is for the exclusive use of the intended recipient(s). If you are not the 
 intended recipient(s) do not copy this communication, or disclose it to any 
 other person. If you have received this email in error please notify the 
 sender immediately, delete the message from your computer system and destroy 
 any copies.  Except where this email is sent in the usual course of our 
 business, any views or opinions presented are solely those of the author and 
 do not necessarily represent those of RecWorks Ltd. Although RecWorks Ltd 
 operates anti-virus programs, it does not accept responsibility for any 
 damage whatsoever that is caused by viruses being passed. Replies to this 
 email may be monitored and/or recorded by RecWorks Ltd for operational or 
 business reasons.
 
 
 
 
 
 
 
 
 
 
 
 
 
 --
 Please Note: If you hit REPLY, your message will be sent to everyone on 
 this mailing list (ljc-l...@meetup.com)
 This message was sent by Barry Cranford (b...@recworks.co.uk) from LJC - 
 London Java Community.
 To learn more about Barry Cranford, visit his/her member profile
 To report this message or block the sender, please click here
 Set my mailing list to email me As they are sent | In one daily email | Don't 
 send me mailing list messages 
 
 Meetup, POB 4668 #37895 NY NY USA 10163 | supp...@meetup.com 

Re: [rules-users] Guvnor 6.0.0.Final: Unable to connect to guvnor repository using JBoss Dev Studio

2013-11-29 Thread Michael Anstis
Are you using the Drools 6.0.0 Eclipse plugin?

Drools Workbench 6.0 (old Guvnor) doesn't support WEBDAV since it now uses
a GIT backend (and not JCR).

You can clone the repository from within Eclipse and access it using normal
GIT functions.


On 29 November 2013 08:39, nelson.wan nelson@hotmail.com wrote:


 Using Drools/Guvnor 5.5.0.Final eclipse plugins, we can connect to guvnor
 repository.

 But not the case when using Drools/Guvnor 6.0.0.Final eclipse plugins.

 See if anyone has tried the same in Eclipse.

 Guvnor6_Repository_URL.doc
 
 http://drools.46999.n3.nabble.com/file/n4027002/Guvnor6_Repository_URL.doc
 



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Guvnor-6-0-0-Final-Unable-to-connect-to-guvnor-repository-using-JBoss-Dev-Studio-tp4027002.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] Guvnor 6.0.0.Final: How to assign package and category permissions?

2013-11-29 Thread Michael Anstis
Drools Workbench 6.0 doesn't support the same granularity of permissions as
Guvnor 5.5.

Drools Workbench supports user permissions at the Organizational Unit,
Repository and Project level: users either have access, or do not.

You can use the kie-cli-config tool to add required roles to the foregoing
logical entities; and assign roles to users using whatever mechanism suits
your runtime container.

For example, if you're using the AS7 distribution you can assign roles to
users with adduser.sh within AS7's /bin folder.

We will add the ability to assign roles to Organizational Units,
Repositories and Projects through the UI in a future release.

In Guvnor 5.5 the deployment unit was a proprietary PKG file generated
from individual packages. Drools Workbench 6.0 uses JAR (which equates to a
project) as the deployment unit.

If you wish to restrict access to different packages you should split your
rules etc into different projects; setting up dependencies between them as
you require.

With kind regards,

Mike



On 29 November 2013 07:34, nelson.wan nelson@hotmail.com wrote:

 In guvnor 5.5.0.Final, there is User Permission feature to create user
 mapping, assign package / category permissions to user.

 However, we cannot see such feature.

 For user mapping, we found that it can be achived by editing
 user.properties
 in guvnor WAR file.

 However, we are unable to identify how to assign package / category
 permisions to user.

 Pls see anyone can help on this.
 Guvnor6_UserPermisson.doc
 http://drools.46999.n3.nabble.com/file/n4027000/Guvnor6_UserPermisson.doc
 



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Guvnor-6-0-0-Final-How-to-assign-package-and-category-permissions-tp4027000.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] Guvnor 6.0.0.Final: What is the deployment flow?

2013-11-29 Thread nelson.wan

With Guvnor 5.5.0.Final, we can build the binary package, create snapshot
for deployment, download the PKG file for use by drools runtime.

With Guvnor 6.0.0.Final, we cannot locate such kind of deployment flow. Hope
to see any help on this.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-6-0-0-Final-What-is-the-deployment-flow-tp4027008.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 6.0.0.Final: What is the deployment flow?

2013-11-29 Thread Michael Anstis
Hello,

In Drools 6.0 the deployment unit is a JAR. It is built when you Build
and Deploy the project (from the Project Editor).

Drools Workbench deploys the JAR to the workbench's Maven repository; that
can be added to your projects pom.xml as an additional repository and the
JAR added as a dependency.

The Repository URL will be of the format:
http://hostname:port/webcontext/maven2/
where hostname, port and webcontext reflect your deployment
configuration.

There have been other emails to this mailing list asking similar questions
over the last couple of days. Please read those too, as they embellish on
this answer.

With kind regards,

Mike




On 29 November 2013 09:46, nelson.wan nelson@hotmail.com wrote:


 With Guvnor 5.5.0.Final, we can build the binary package, create snapshot
 for deployment, download the PKG file for use by drools runtime.

 With Guvnor 6.0.0.Final, we cannot locate such kind of deployment flow.
 Hope
 to see any help on this.



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Guvnor-6-0-0-Final-What-is-the-deployment-flow-tp4027008.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] Optaplanner ShiftAssignment Employee is null

2013-11-29 Thread ns
Hi,

I have a strange error. When I get my final roster, I do:

System.out.println(final_roster.getShiftAssignmentList());

I get a list of all the employees (with their names) assigned to a certain
shift on a certain date.

Now I would like to iterate over this list to save it to my database, so I
do the following to test:

for (ShiftAssignment shiftAssignment : roster.getShiftAssignmentList())
{
 System.out.println(Shift assignment:  + shiftAssignment.getEmployee()
+  -  + shiftAssignment.getShiftDate() +  -  +
shiftAssignment.getShift().getLabel());
}

But now the shiftAssignment.getEmployee() returns null. How can this happen?
Thanks



--
View this message in context: 
http://drools.46999.n3.nabble.com/Optaplanner-ShiftAssignment-Employee-is-null-tp4027010.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] Optaplanner ShiftAssignment Employee is null

2013-11-29 Thread Geoffrey De Smet

On 29-11-13 11:47, ns wrote:
 Hi,

 I have a strange error. When I get my final roster, I do:

 System.out.println(final_roster.getShiftAssignmentList());
Look at this line (final_roster)

 I get a list of all the employees (with their names) assigned to a certain
 shift on a certain date.

 Now I would like to iterate over this list to save it to my database, so I
 do the following to test:

 for (ShiftAssignment shiftAssignment : roster.getShiftAssignmentList())
Now look at this line (roster)
 {
   System.out.println(Shift assignment:  + shiftAssignment.getEmployee()
 +  -  + shiftAssignment.getShiftDate() +  -  +
 shiftAssignment.getShift().getLabel());
 }

 But now the shiftAssignment.getEmployee() returns null. How can this happen?
 Thanks



 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Optaplanner-ShiftAssignment-Employee-is-null-tp4027010.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] Optaplanner ShiftAssignment Employee is null

2013-11-29 Thread ns
Hi Geoffrey,

nice catch. I just didn't see it. Thanks!

Kind regards,

Nick



--
View this message in context: 
http://drools.46999.n3.nabble.com/Optaplanner-ShiftAssignment-Employee-is-null-tp4027010p4027012.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] Drools - sizing performance

2013-11-29 Thread danilo
Anybody has some suggestions?



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-sizing-performance-tp4026902p4027013.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 6.0.0.Final: How to assign package and category permissions?

2013-11-29 Thread nelson.wan

Using Drools Workbench, sorry that I cannot locate how to, at least, assign
user to Organization Unit. 
I can just specify the Organization Unit owner only. 

For the kie-cli-config tool, not able to locate it from Drools 6.0.0.Final
downloads. 

And in Drools 6.0.0.Final documentation, unable to locate commands to add
user to Organization Unit, Repo and Project too.

Mind to help us again with some more details?



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-6-0-0-Final-How-to-assign-package-and-category-permissions-tp4027000p4027014.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 6.0.0.Final: How to assign package and category permissions?

2013-11-29 Thread Michael Anstis
Hi,

You'll need to download kie-wb-distributions from
herehttps://hudson.jboss.org/hudson/job/kie-wb-distributions/
.

Unfortunately it appears we don't actually have a download for
kie-cli-config; so regrettably you'll need to build from
sourcehttps://github.com/droolsjbpm/kie-wb-distributions/tree/master/kie-config-cli
.

Use of kie-cli-config is documented
herehttp://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/wb.Workbench.html#wb.Configuration.
There is no UI at the moment to add roles to OUs, Repositories or Projects.

The download page is incomplete at the moment.

With kind regards,

Mike




On 29 November 2013 12:43, nelson.wan nelson@hotmail.com wrote:


 Using Drools Workbench, sorry that I cannot locate how to, at least, assign
 user to Organization Unit.
 I can just specify the Organization Unit owner only.

 For the kie-cli-config tool, not able to locate it from Drools 6.0.0.Final
 downloads.

 And in Drools 6.0.0.Final documentation, unable to locate commands to add
 user to Organization Unit, Repo and Project too.

 Mind to help us again with some more details?



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Guvnor-6-0-0-Final-How-to-assign-package-and-category-permissions-tp4027000p4027014.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] Drools Integration with Apache Camel and Spring ...

2013-11-29 Thread profversaggi
Can anyone point me to 'proper' tutorial or example of Drools web Integration
with Apache Camel and Spring that shows the soup to nuts big picture. I'm
getting solid bits and pieces of information well enough through the
standard process - the Docs, the Camel Book, web links, etc ... I just need
the larger overall 'context' with which to places all of the pieces
together, and I'm having difficulty with that 

Many thanks in advance ... :-)



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Integration-with-Apache-Camel-and-Spring-tp4027016.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] [Optaplanner] Help on drl

2013-11-29 Thread Tales Costa
Wolfgang,

Thanks for the explanation. It helps.

regards


On Fri, Nov 29, 2013 at 6:00 AM, Wolfgang Laun wolfgang.l...@gmail.comwrote:

 On 28/11/2013, Tales Costa ta...@ibiseng.com wrote:
  Hi,
 
  I am new to Drools and Optaplanner and have built a first model and
  succeeded running with java score calculation. Now am struggling trying
 to
  use rules for score.
 
  Have read Drools Expert User Guide and looked through Optaplanner
  examples but am still confused. Main difficult is discovering what can do
  and can´t do with java dialect within the when and then blocks. Are
  there tutorial and/or other references I could look into for more
  information on this ?

 The rules are actually quite simple.

 LHS: Any boolean expression is valid, with the shortcuts for accessing
 members. If the parser misbehaves, try eval() - there it's pure Java.

 RHS: Java code, as in any method, plus the macros defined in Expert.

 That said, some things should not be done:
* Never use side effects in LHS expressions that modifies anything
 in working memory.
* Don't write long then parts; calling static methods is preferred.

 -W





 
  regards
 
  Tales
 

 ___
 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