Re: [rules-users] Fill dependent dropdown lists based on a web decision table

2013-02-28 Thread peach_wyss
ok thanks, all is much clearer now...

What I don't understand:
- When I see examples of enumerations in guvnor like:
'Car.color' : ['red', 'blue','green']

-> In all of this examples, there seems to be a text editor in guvnor. But when 
I create a new enumeration in guvnor (5.5. final), there isn't a text editor. 
What I see are three text-fields ("Fact", "Field", 'Context'), which I don't 
understand. Is there a way, to switch to the text editor view?

Sorry, maybe this is a stupid question, but couldn't really find a description 
of this in the web.

Thanks for your help.

Kind regards,
Peter





 From: manstis [via Drools] 
To: peach_wyss  
Sent: Thursday, February 28, 2013 1:58 PM
Subject: Re: [rules-users] Fill dependent dropdown lists based on a web 
decision table
 

Did you read the "Advanced" section?

This talks about how you can use an external source of data for enumerations in 
Guvnor.

I thought this is what you wanted?


On 28 February 2013 10:16, peach_wyss <[hidden email]> wrote:

hy
>
>thanks for your answer.
>
>1) I think you have misunderstood me. I don't want this dropdown list in 
>guvnor, we're having our dropdown list on our own form in our application. So 
>guvnor should only provide a way to define this dependencies.
>
>2) Where can I define an enum like this 
>http://docs.jboss.org/drools/release/5.5.0.Final/drools-guvnor-docs/html_single/index.html#d0e1903
> in the Guvnor-Webclient? When I click on Knowledge Bases > Create New > New 
>Enumeration, I can type in something like Fact, Field and Context...which I 
>don't understand. Is there a text view for enumerations in guvnor?
>
>Thanks for your help.
>Peter
>
>
>
>
>
>
> From: manstis [via Drools] <[hidden email]>
>To: peach_wyss <[hidden email]> 
>Sent: Tuesday, February 26, 2013 8:40 AM
>Subject: Re: [rules-users] Fill dependent dropdown lists based on a web 
>decision table
> 
>
>Look at how to use advanced enums in Guvnor's User Guide.
>sent on the move
>On 26 Feb 2013 07:33, "peach_wyss" <[hidden email]> wrote:
>
>Hi
>>
>>I'm using Drools and Guvnor in our project. We have the following Data Model
>>(simplified):
>>- Object C
>>-> has a List
>>-> has a List
>>
>>I need to build an easy to edit web decision table in guvnor. We need the
>>table to fill a dropdown list (Object B) in dependency of another dropdown
>>list (Object A), when for example creating a new Object C on a form. The
>>table should look something like this:
>>
>>[Object A] [Object B]
>>
>>Test A1     Test B1
>>
>>                Test B2
>>
>>                Test B3
>>
>>Test A2     Test B4
>>
>>Test A3     Test B5
>>
>>                Test B6
>>
>>Test A4     Test B7
>>
>>                Test B8
>>
>>                Test B9
>>
>>                Test B10
>>
>>...so when a User creates a new Object C (Create-Form) and select on for
>>example "Test A3" in a dropdown list (Object A), Drools should be firing and
>>result "Test B5" and "Test B6", which then can be filled in the second
>>dropdown list (Object B).
>>
>>How can I achieve such a scenario? We have already Drools Guvnor in use and
>>the requirement is, to have such a table to easy edit the dependencies of
>>this two dropdown lists.
>>
>>Some thoughts:
>>- Is there a way to fill Objects in a List as a Action-Column in a web
>>decision table?
>>- Is there a way to add Objects to a List (global variable) in a web
>>decision table?
>>- Is there a way to achieve this with rule templates?
>>- Are there other ways to achieve this?
>>
>>Thanks for your help.
>>
>>Kind regards,
>>Peter
>>
>>
>>
>>--
>>View this message in context: 
>>http://drools.46999.n3.nabble.com/Fill-dependent-dropdown-lists-based-on-a-web-decision-table-tp4022589.html
>>Sent from the Drools: User forum mailing list archive at Nabble.com.
>>___
>>rules-users mailing list
>>[hidden email]
>>https://lists.jboss.org/mailman/listinfo/rules-users
>>
>___ 
>rules-users mailing list 
>[hidden email] 
>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/Fill-dependent-dropdown-lists-based-on-a-web-decision-table-or-other-type-of-rules-tp4022589p4022590.html
 
>To unsubscribe from Fill dependent dropdown lists based on a web decision 
>table (or other type of rules), click here.
>NAML 
>
>
>>
> View this message in context: Re: [rules-users] Fill dependent dropdown lists 
> based on a web decision table
>
>Sent from the Drools: User forum mailing list archive at Nabble.com.
>
>___
>rules-users mailing list
>[hidden email]
>https://lists.jboss.org/mailman/listinfo/rules-users
>

___ 
rules-users mailing list 
[hidden email] 

Re: [rules-users] Extended rule doesn't have reference to variable created in super rule

2013-02-28 Thread Wolfgang Laun
On 01/03/2013, arul.prasha...@gmail.com  wrote:
> I have the below rules written but $xyz isn't available or visible in Rule
> 2.
> Is this the way extends keyword works?
>
> rule "test 1"
> when
> $xyz : XYZ(value == 0);
> then
> // do somethings
>
> rule "test 2" extends "test 1"
> when
>  eval($xyz.reference == 1)

Try this:
eval($xyz.getReference() == 1)

-W

> then
>  // do something.
>
> Exception:
>
> Error: unable to resolve method using strict-mode: java.lang.Object.$xyz()
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Extended-rule-doesn-t-have-reference-to-variable-created-in-super-rule-tp4022647.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] Extended rule doesn't have reference to variable created in super rule

2013-02-28 Thread arul.prasha...@gmail.com
I have the below rules written but $xyz isn't available or visible in Rule 2.
Is this the way extends keyword works?

rule "test 1"
when 
$xyz : XYZ(value == 0);
then
// do somethings

rule "test 2" extends "test 1"
when
 eval($xyz.reference == 1)
then
 // do something.

Exception:

Error: unable to resolve method using strict-mode: java.lang.Object.$xyz()



--
View this message in context: 
http://drools.46999.n3.nabble.com/Extended-rule-doesn-t-have-reference-to-variable-created-in-super-rule-tp4022647.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] Tree iteration with accumulate: is it possible ?

2013-02-28 Thread Davide Sottara
The not-so-immediate solution would be to use queries,
for example something along the following lines:

declare Node
  id : String
  children : Node[]
  value : Integer
end

rule "Init"
when
then
  Node n1 = new Node( "l1", new Node[] {}, 10 );
  Node n2 = new Node( "l2", new Node[] {}, 7 );
  Node n3 = new Node( "l3", new Node[] {}, 9 );

  Node x1 = new Node( "x1", new Node[] { n1, n2 }, -1 );
  Node x2 = new Node( "x2", new Node[] { n3 }, -2 );

  Node rt = new Node( "00", new Node[] { x1, x2 }, -3 );

  insert( n1 );
  insert( n2 );
  insert( n3 );
  insert( x1 );
  insert( x2 );
  insert( rt );
end


query score( Node $node, Integer $score )
  // either the node is a leaf, so just return its value
  $node := Node( children.length == 0, $score := value )

  or
 
  ( // or it is not, so let's pick the children
$node := Node( $children : children, $sz : children.length > 0, $val
: value )
and
  accumulate (
  // for each child...
  $child : Node( this memberOf $children ) 
  and 
  // ... calculate the partial child's score recursively
  score( $child, $x ; ),
  // sum all the partial scores
  $tot : sum( $x ) 
)
and
// add the local parent value and return
$score := Integer() from $tot.intValue() + $val
  ) 
end

rule "Check"
when
  $n : Node()
  score( $n, $x ; )
then
  System.out.println( "Query-ed value from node " + $n + " >>> " + $x );
end


In the last rule, you can replace $x with a literal (also remove it from
the printout) :
score( $n, 20 ; )
and the rule will fire only for those nodes whose "deep sum" is 20



On 02/28/2013 01:20 PM, Wolfgang Laun wrote:
> I think that the simplest solution would be to either store the sum of
> the children's values into each Node, or to create and insert
> additional facts containing these sums, in parallel to non-leaf Node
> facts.
> -W
>
> On 28/02/2013, mcyrb  wrote:
>> Hello.
>>
>> I have a tree, with each leaf containing a random value.
>> The value of each node is the sum of its children value.
>>
>> I would like to write a rule which looks like this:
>> when
>>nodeValue == 18 (e.g.)
>> then
>>// do something with this node
>> end
>>
>> The accumulate conditional element looked adequate for this, so I wrote
>> something like this
>> when
>>n: Node()
>>accumulate( Leaf( parentNode == n, v : value ); nodeValue : sum( v );
>> nodeValue == 18 )
>> then
>>// do something with n
>> end
>>
>> So... the problem is that this works only for nodes where its direct childs
>> are leafs, and not for upper nodes.
>> Have you got an idea to solve this ?
>>
>> Thank you
>>
>>
>>
>> --
>> View this message in context:
>> http://drools.46999.n3.nabble.com/Tree-iteration-with-accumulate-is-it-possible-tp4022639.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] Drools / Guvnor 6

2013-02-28 Thread Mark Proctor
I would hope before end of this year.

Mark
On 28 Feb 2013, at 22:39, kurrent93  wrote:

> When can expect Drools 6 to make it into Enterprise support?
> 
> I understand this is a long way off, but generally, is this 1 year,
> 18months, or longer?
> 
> 
> 
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/rules-users-Drools-Guvnor-6-tp4022638p4022644.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] Drools / Guvnor 6

2013-02-28 Thread kurrent93
When can expect Drools 6 to make it into Enterprise support?

I understand this is a long way off, but generally, is this 1 year,
18months, or longer?



--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-Drools-Guvnor-6-tp4022638p4022644.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] How to integrate Declarative Fact created using Guvnor in Java

2013-02-28 Thread IPatel
I was able to fix the problem but now I am with more questions then answers.

Here is what i had before defined in my DSL

[when] The transcation is zero dollar = trans:Transcation (Indicator == "N")


[when] System description one field is ABC= $trans1:Filter(Field1 == "ABC")
[then] Filter out the records = Transcation trans2 = new Transcation();
trans2.setFilterOutRecords( true );insert(trans2)

Now in the business rules i created following rules
Rule 1:
When
The transcation is zero dollar
Then
 Filter out the records

Rule2:
When
System description one field is ABC
Then
Filter out the records

Both test cases are passing in guvnor

However when i fire these rules using Java, i was not able to get expected
results.

This is how i fixed it.

For each When defined in DSL i have appropriate Then. 

So the question is can we not have a generic Then statement where i can set
a value of the field and then use that with When condition as appropriate.

Your help will be appreciated?





--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-integrate-Declarative-Fact-created-using-Guvnor-in-Java-tp4022625p4022643.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 / Guvnor 6

2013-02-28 Thread Mark Proctor
6.0 stuff is still raw, there are alphas, but they are not really got general 
use. We'll put out a beta shortly, I'd recommend you wait until then.

Also a lot has changed in 6.0, especially around deployment, so it won't be an 
easy switch.

Mark
On 28 Feb 2013, at 17:50, Stephen Masters  wrote:

> Hi folks,
> 
> Just wondering whether there's a download available yet for Guvnor v6, or 
> whether I need to build from source.
> 
> As mentioned previously I'm tinkering with it on WebSphere, and so far (using 
> WAS 8.5 Liberty Profile) I am experiencing zero issues. It just works! I'm 
> using the Tomcat distribution of Guvnor 5.3. So I'm downloading 5.5 as we 
> speak, and I might as well try out 6 while I'm at it. :)
> 
> Steve
> ___
> 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] Tree iteration with accumulate: is it possible ?

2013-02-28 Thread Wolfgang Laun
I think that the simplest solution would be to either store the sum of
the children's values into each Node, or to create and insert
additional facts containing these sums, in parallel to non-leaf Node
facts.
-W

On 28/02/2013, mcyrb  wrote:
> Hello.
>
> I have a tree, with each leaf containing a random value.
> The value of each node is the sum of its children value.
>
> I would like to write a rule which looks like this:
> when
>nodeValue == 18 (e.g.)
> then
>// do something with this node
> end
>
> The accumulate conditional element looked adequate for this, so I wrote
> something like this
> when
>n: Node()
>accumulate( Leaf( parentNode == n, v : value ); nodeValue : sum( v );
> nodeValue == 18 )
> then
>// do something with n
> end
>
> So... the problem is that this works only for nodes where its direct childs
> are leafs, and not for upper nodes.
> Have you got an idea to solve this ?
>
> Thank you
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Tree-iteration-with-accumulate-is-it-possible-tp4022639.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] constraints lacking and in excess

2013-02-28 Thread Michiel Vermandel
Hi,

I have written a custom move implementation.
At first I got the exception:

java.lang.IllegalStateException: The moveClass (class 
my.planner.solver.MoveGroupToPeriod)'s move (PROJECT Period GroupChange:{T= 
Inspect 55871.I#0 [4->4] Bart DE BIE IV XI} => (P5)  [i1]) probably has a 
corrupted undoMove (my.planner.solver.util.TaskChangeListMove@35e8df37). Or 
maybe there are corrupted score rules.
...


I found out that I did not undo all changes that I made in the move.
After fixing this, I now often get Score corruption as below.
I checked and all changes are preceded with director.beforeVariableChanged(...) 
and followed by director.afterVariableChanged(...);

What could cause this corruption?


java.lang.IllegalStateException: Score corruption: the workingScore 
(-286hard/-30601soft) is not the uncorruptedScore (-286hard/-30401soft):
  The workingMemory has 3 ConstraintOccurrence(s) in excess:
    preferedRegion/NEGATIVE_SOFT:[{T= Inspect 115519.I#0 [8->8] Dirk JANSSENS 
IV V}, Johan LAMOTE, 99, V]=99
    taskSpreading/NEGATIVE_HARD:[(P7) , 77]=100
    preferedRegion/NEGATIVE_SOFT:[{T= Inspect 115519.I#1 [8->8] Erik VERHOEVEN 
TL V}, Dirk JANSSENS, 99, V]=99
  The workingMemory has 6 ConstraintOccurrence(s) lacking:
    preferedRegion/NEGATIVE_SOFT:[{T= Inspect 115519.I#0 [8->8] Dirk JANSSENS 
IV V}, Dirk JANSSENS, 99, V]=99
    taskSpreading/NEGATIVE_HARD:[(P7) , 75]=36
    preferedRegion/NEGATIVE_SOFT:[{T= Inspect 115519.I#1 [8->8] Erik VERHOEVEN 
TL V}, Erik VERHOEVEN, 99, V]=99
    preferedRegion/NEGATIVE_SOFT:[{T= Inspect 4747.I#0 [10->10] Johan LAMOTE IV 
V}, Johan LAMOTE, 99, V]=99
    taskSpreading/NEGATIVE_HARD:[(P8) , 74]=16
    preferedRegion/NEGATIVE_SOFT:[{T= Inspect 4747.I#1 [10->10] Dirk JANSSENS 
TL V}, Dirk JANSSENS, 99, V]=99
  Check the score rules who created those ConstraintOccurrences. Verify that 
each ConstraintOccurrence's causes and weight is correct.
    at 
org.drools.planner.core.score.director.AbstractScoreDirector.assertWorkingScore(AbstractScoreDirector.java:249)
    at 
org.drools.planner.core.solver.scope.DefaultSolverScope.assertWorkingScore(DefaultSolverScope.java:96)
    at 
org.drools.planner.core.phase.AbstractSolverPhaseScope.assertWorkingScore(AbstractSolverPhaseScope.java:124)
    at 
org.drools.planner.core.localsearch.DefaultLocalSearchSolverPhase.solve(DefaultLocalSearchSolverPhase.java:86)
    at 
org.drools.planner.core.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:190)
    at 
org.drools.planner.core.solver.DefaultSolver.solve(DefaultSolver.java:155)
    at my.planner.app.InspectionSchedule.solve(InspectionSchedule.java:275)
    at 
my.planner.testcore.AbstractPlanningTestClass.solve(AbstractPlanningTestClass.java:444)
    at 
my.planner.testcore.AbstractPlanningTestClass.solve(AbstractPlanningTestClass.java:469)
    at my.planner.RealBaoTest.datasetBAO20122013(RealBaoTest.java:226)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at 
org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
    at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
    at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Thanks,

Michiel


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

[rules-users] Tree iteration with accumulate: is it possible ?

2013-02-28 Thread mcyrb
Hello.

I have a tree, with each leaf containing a random value.
The value of each node is the sum of its children value.

I would like to write a rule which looks like this:
when
   nodeValue == 18 (e.g.)
then
   // do something with this node
end

The accumulate conditional element looked adequate for this, so I wrote
something like this
when
   n: Node()
   accumulate( Leaf( parentNode == n, v : value ); nodeValue : sum( v );
nodeValue == 18 )
then
   // do something with n
end

So... the problem is that this works only for nodes where its direct childs
are leafs, and not for upper nodes.
Have you got an idea to solve this ?

Thank you



--
View this message in context: 
http://drools.46999.n3.nabble.com/Tree-iteration-with-accumulate-is-it-possible-tp4022639.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] Drools / Guvnor 6

2013-02-28 Thread Stephen Masters
Hi folks,

Just wondering whether there's a download available yet for Guvnor v6, or 
whether I need to build from source.

As mentioned previously I'm tinkering with it on WebSphere, and so far (using 
WAS 8.5 Liberty Profile) I am experiencing zero issues. It just works! I'm 
using the Tomcat distribution of Guvnor 5.3. So I'm downloading 5.5 as we 
speak, and I might as well try out 6 while I'm at it. :)

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


Re: [rules-users] How to integrate Declarative Fact created using Guvnor in Java

2013-02-28 Thread IPatel
Thank you for your response.

I was able to follow your instruction and  created newInstance of the facts.

Quick question: I have 2 facts defined in Guvnor:
Conditions
Variable: Source (this variable is text/string)
Variable: SourceType (this variable is text/string)

Transcation
Variable: filter (this variable is boolean)

I have 2 rules as follows:
If source =ABC then filter = true

if source =ABC then hasIntegrated = true

In my main method
I created and inserted new instance of each Source as well as Transcation
I set the variables of the source instance so that i can fire above rules.
Source = ABC

Rule 1 fires fine. I get the expected result

However for Rule 2 the value of hasIntegrated is false instead of true. I
run the test in Guvnor and it passes. However in my main method it
fails/give me unexpected result.

Any idea why this is happening???



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-integrate-Declarative-Fact-created-using-Guvnor-in-Java-tp4022625p4022637.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] Newbie question. Possibilities for optimizing Employee Schedules

2013-02-28 Thread Geoffrey De Smet

Op 28-02-13 16:16, sanger schreef:
> I have an application that requires optimizing an Employee schedule. One of
> the criteria is that the schedule must remain as static as possible. In
> other words, when conditions change the system must make the minimum number
> of adjustments to the schedule to accomodate the new conditions. We would
> not want the entire schedule to be shuffled just because one person is off
> sick.
>
> Is this a criteria that can be easily handled with Drools Planner?
Yes
Give each entity an extra property: the original value of the planning 
variable property.
For example:

class ShiftAssignment {
Shift shift;
Employee originalEmployee; // Just a normal problem fact
Employee employee; // Planning variable
}

then add a rule which adds a cost for every entity that moved

when
ShiftAssignment( originalEmployee != employee, $employee : employee)
then
// add soft constraint for -(employee.getMoveCost()).

You can make the move cost depend on all sort of factors.
>
>
>
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/Newbie-question-Possibilities-for-optimizing-Employee-Schedules-tp4022634.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] Bad Gateway at http://www.jboss.org/drools

2013-02-28 Thread Geoffrey De Smet
They say it's fixed now.

Op 27-02-13 15:53, Geoffrey De Smet schreef:
> Forwarded to our internal jboss.org team.
> Thanks for reporting.
>
> Op 27-02-13 14:15, Syargey schreef:
>> I can't access  http://www.jboss.org/drools 
>> for two days :-(
>>
>> The error message is sjown:
>>
>>
>> Bad Gateway
>>
>> We're experiencing a problem with one of the servers behind our gateway.
>>
>> Please try again in a while.
>>
>>
>>
>>
>>
>> --
>> View this message in context: 
>> http://drools.46999.n3.nabble.com/Bad-Gateway-at-http-www-jboss-org-drools-tp4022614.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] Newbie question. Possibilities for optimizing Employee Schedules

2013-02-28 Thread sanger
I have an application that requires optimizing an Employee schedule. One of
the criteria is that the schedule must remain as static as possible. In
other words, when conditions change the system must make the minimum number
of adjustments to the schedule to accomodate the new conditions. We would
not want the entire schedule to be shuffled just because one person is off
sick.

Is this a criteria that can be easily handled with Drools Planner?




--
View this message in context: 
http://drools.46999.n3.nabble.com/Newbie-question-Possibilities-for-optimizing-Employee-Schedules-tp4022634.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] Fill dependent dropdown lists based on a web decision table

2013-02-28 Thread Michael Anstis
Did you read the "Advanced" section?

This talks about how you can use an external source of data for
enumerations in Guvnor.

I thought this is what you wanted?

On 28 February 2013 10:16, peach_wyss  wrote:

> hy
>
> thanks for your answer.
>
> 1) I think you have misunderstood me. I don't want this dropdown list in
> guvnor, we're having our dropdown list on our own form in our application.
> So guvnor should only provide a way to define this dependencies.
>
> 2) Where can I define an enum like this
> http://docs.jboss.org/drools/release/5.5.0.Final/drools-guvnor-docs/html_single/index.html#d0e1903in
>  the Guvnor-Webclient? When I click on Knowledge Bases > Create New > New
> Enumeration, I can type in something like Fact, Field and Context...which I
> don't understand. Is there a text view for enumerations in guvnor?
>
> Thanks for your help.
> Peter
>
>
>   --
> *From:* manstis [via Drools] <[hidden 
> email]
> >
> *To:* peach_wyss <[hidden 
> email]>
>
> *Sent:* Tuesday, February 26, 2013 8:40 AM
> *Subject:* Re: [rules-users] Fill dependent dropdown lists based on a web
> decision table
>
>  Look at how to use advanced enums in Guvnor's User Guide.
> sent on the move
> On 26 Feb 2013 07:33, "peach_wyss" <[hidden email]> wrote:
>
> Hi
>
> I'm using Drools and Guvnor in our project. We have the following Data
> Model
> (simplified):
> - Object C
> -> has a List
> -> has a List
>
> I need to build an easy to edit web decision table in guvnor. We need the
> table to fill a dropdown list (Object B) in dependency of another dropdown
> list (Object A), when for example creating a new Object C on a form. The
> table should look something like this:
>
> [Object A] [Object B]
>
> Test A1 Test B1
>
> Test B2
>
> Test B3
>
> Test A2 Test B4
>
> Test A3 Test B5
>
> Test B6
>
> Test A4 Test B7
>
> Test B8
>
> Test B9
>
> Test B10
>
> ...so when a User creates a new Object C (Create-Form) and select on for
> example "Test A3" in a dropdown list (Object A), Drools should be firing
> and
> result "Test B5" and "Test B6", which then can be filled in the second
> dropdown list (Object B).
>
> How can I achieve such a scenario? We have already Drools Guvnor in use and
> the requirement is, to have such a table to easy edit the dependencies of
> this two dropdown lists.
>
> Some thoughts:
> - Is there a way to fill Objects in a List as a Action-Column in a web
> decision table?
> - Is there a way to add Objects to a List (global variable) in a web
> decision table?
> - Is there a way to achieve this with rule templates?
> - Are there other ways to achieve this?
>
> Thanks for your help.
>
> Kind regards,
> Peter
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Fill-dependent-dropdown-lists-based-on-a-web-decision-table-tp4022589.html
> Sent from the Drools: User forum mailing list archive at 
> Nabble.com
> .
> ___
> rules-users mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> ___
> rules-users mailing list
> [hidden email]
> 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/Fill-dependent-dropdown-lists-based-on-a-web-decision-table-or-other-type-of-rules-tp4022589p4022590.html
>  To unsubscribe from Fill dependent dropdown lists based on a web decision
> table (or other type of rules), click here.
> NAML
>
>
>
> --
> View this message in context: Re: [rules-users] Fill dependent dropdown
> lists based on a web decision 
> table
>
> Sent from the Drools: User forum mailing list 
> archiveat 
> 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] add guvnor-webapp-core as a dependency to project

2013-02-28 Thread kooper
Hi,I'm trying to add guvnor-webapp-core as a dependency to my project, but
after when deploying app to JBOSS 7(tried 7.1.1 and 7.0.2), I have following
exception:
11:19:50,138 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8)
MSC1: Failed to start service
jboss.deployment.unit."my_app-1.0-SNAPSHOT.war".WeldService:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."my_app-1.0-SNAPSHOT.war".WeldService:
org.jboss.weld.exceptions.DeploymentException: Exception List with 3
exceptions:Exception 0 :org.jboss.weld.exceptions.DeploymentException:
WELD-001408 Unsatisfied dependencies for type [RepositoryStartupService]
with qualifiers [@Default] at injection point [[field] @Inject private
org.drools.guvnor.server.repository.RulesRepositoryManager.repositoryStartupService]
at
org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:275)
at
org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:244)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:107)  at
org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:127)   at
org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:346)at
org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:331)   
at
org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)
at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83) at
org.jboss.as.weld.services.WeldService.start(WeldService.java:76)   at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)Exception 0
:org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied
dependencies for type [RepositoryStartupService] with qualifiers [@Default]
at injection point [[field] @Inject private
org.drools.guvnor.server.repository.MailboxService.repositoryStartupService]
at
org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:275)
at
org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:244)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:107)  at
org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:127)   at
org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:346)at
org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:331)   
at
org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)
at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83) at
org.jboss.as.weld.services.WeldService.start(WeldService.java:76)   at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)Exception 0
:org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied
dependencies for type [ConversionService] with qualifiers [@Default] at
injection point [[field] @Inject private
org.drools.guvnor.server.RepositoryAssetService.conversionService]  at
org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:275)
at
org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:244)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:107)  at
org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:127)   at
org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:346)at
org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:331)   
at
org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)
at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83) at
org.jboss.as.weld.services.WeldService.start(WeldService.java:76)   at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)at
org.jboss.as.weld.services.WeldService.start(WeldService.java:83)   at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]   at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]   at
java.ut

Re: [rules-users] planner: when gets a solution cloned?

2013-02-28 Thread Geoffrey De Smet

  
  

Op 28-02-13 09:15, Michiel Vermandel
  schreef:


  
>Why would you need to know that?


Well, if I understand
  everything correctly, a "Best-solution clone" is needed just
  to remember/represent that state of the solution.
It does not have to do
  anything anymore, therefor some data should not be copied
  and/or initialized upon cloning.
  

True, but that applies for the other cloning events too (at least
the ones initiated by Planner).
In the 6.0 docs, the term "clone" has been replace by the term
"planning clone",
and it's expectations have been explained.
See 4.3.5.6. Cloning a Solution.
 
https://hudson.jboss.org/hudson/view/Drools%20jBPM/job/drools-planner/lastSuccessfulBuild/artifact/drools-planner-docs/target/docbook/publish/en-US/html_single/index.html#d0e2680


  
It might be "not optimal" design that drives me to initializing
stuff upon cloning, but anyway I think there might be more
scenarios where it is useful to know if the solution object is
the working solution or a best solution.
Right?

Regards,

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


  
 
 From:
Geoffrey De Smet 
To: Rules
Users List  
Sent:
Thursday, February 28, 2013 8:28 AM
Subject:
Re: [rules-users] planner: when gets a solution cloned?
   


   
Op 27-02-13
  19:50, Michiel Vermandel schreef:


  Hi,

I think a planning solution gets cloned in two
different scenarios:
1) a better solution is found
2) the solver propagates from one solving phase to
another.

Is this right?
  

Currently this is right IIRC. But mix in multi-threading
for 6.1 or 6.2 and there will be more cases of cloning.

  
If so, how do I know (inside the cloneSolution()
method) if the clone is intended for a best-solution
or a new working-solution?
  

Why would you need to know that? Would it alter your
cloning behavior somehow?

It's probably hackable through BestSolutionRecaller, but
it will give you a hard time when upgrading to 6.0 if
you do hack it there.

  
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


  

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

Re: [rules-users] Fill dependent dropdown lists based on a web decision table

2013-02-28 Thread peach_wyss
hy

thanks for your answer.

1) I think you have misunderstood me. I don't want this dropdown list in 
guvnor, we're having our dropdown list on our own form in our application. So 
guvnor should only provide a way to define this dependencies.

2) Where can I define an enum like this 
http://docs.jboss.org/drools/release/5.5.0.Final/drools-guvnor-docs/html_single/index.html#d0e1903
 in the Guvnor-Webclient? When I click on Knowledge Bases > Create New > New 
Enumeration, I can type in something like Fact, Field and Context...which I 
don't understand. Is there a text view for enumerations in guvnor?

Thanks for your help.
Peter





 From: manstis [via Drools] 
To: peach_wyss  
Sent: Tuesday, February 26, 2013 8:40 AM
Subject: Re: [rules-users] Fill dependent dropdown lists based on a web 
decision table
 

Look at how to use advanced enums in Guvnor's User Guide.
sent on the move
On 26 Feb 2013 07:33, "peach_wyss" <[hidden email]> wrote:

Hi
>
>I'm using Drools and Guvnor in our project. We have the following Data Model
>(simplified):
>- Object C
>-> has a List
>-> has a List
>
>I need to build an easy to edit web decision table in guvnor. We need the
>table to fill a dropdown list (Object B) in dependency of another dropdown
>list (Object A), when for example creating a new Object C on a form. The
>table should look something like this:
>
>[Object A] [Object B]
>
>Test A1     Test B1
>
>                Test B2
>
>                Test B3
>
>Test A2     Test B4
>
>Test A3     Test B5
>
>                Test B6
>
>Test A4     Test B7
>
>                Test B8
>
>                Test B9
>
>                Test B10
>
>...so when a User creates a new Object C (Create-Form) and select on for
>example "Test A3" in a dropdown list (Object A), Drools should be firing and
>result "Test B5" and "Test B6", which then can be filled in the second
>dropdown list (Object B).
>
>How can I achieve such a scenario? We have already Drools Guvnor in use and
>the requirement is, to have such a table to easy edit the dependencies of
>this two dropdown lists.
>
>Some thoughts:
>- Is there a way to fill Objects in a List as a Action-Column in a web
>decision table?
>- Is there a way to add Objects to a List (global variable) in a web
>decision table?
>- Is there a way to achieve this with rule templates?
>- Are there other ways to achieve this?
>
>Thanks for your help.
>
>Kind regards,
>Peter
>
>
>
>--
>View this message in context: 
>http://drools.46999.n3.nabble.com/Fill-dependent-dropdown-lists-based-on-a-web-decision-table-tp4022589.html
>Sent from the Drools: User forum mailing list archive at Nabble.com.
>___
>rules-users mailing list
>[hidden email]
>https://lists.jboss.org/mailman/listinfo/rules-users
>
___ 
rules-users mailing list 
[hidden email] 
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/Fill-dependent-dropdown-lists-based-on-a-web-decision-table-or-other-type-of-rules-tp4022589p4022590.html
 
To unsubscribe from Fill dependent dropdown lists based on a web decision table 
(or other type of rules), click here.
NAML



--
View this message in context: 
http://drools.46999.n3.nabble.com/Fill-dependent-dropdown-lists-based-on-a-web-decision-table-or-other-type-of-rules-tp4022589p4022630.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] planner: when gets a solution cloned?

2013-02-28 Thread Michiel Vermandel
>Why would you need to know that?

Well, if I understand everything correctly, a "Best-solution clone" is needed 
just to remember/represent that state of the solution.
It does not have to do anything anymore, therefor some data should not be 
copied and/or initialized upon cloning.
It might be "not optimal" design that drives me to initializing stuff upon 
cloning, but anyway I think there might be more scenarios where it is useful to 
know if the solution object is the working solution or a best solution.
Right?

Regards,

Michiel

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



 From: Geoffrey De Smet 
To: Rules Users List  
Sent: Thursday, February 28, 2013 8:28 AM
Subject: Re: [rules-users] planner: when gets a solution cloned?
 



Op 27-02-13 19:50, Michiel Vermandel schreef:

Hi,
>
>I think a planning solution gets cloned in two different
scenarios:
>1) a better solution is found
>2) the solver propagates from one solving phase to another.
>
>Is this right?
>
Currently this is right IIRC. But mix in multi-threading for 6.1 or 6.2 and 
there will be more cases of cloning.


>If so, how do I know (inside the cloneSolution() method) if the
clone is intended for a best-solution or a new working-solution?
>
Why would you need to know that? Would it alter your cloning behavior somehow?

It's probably hackable through BestSolutionRecaller, but it will
give you a hard time when upgrading to 6.0 if you do hack it there.


>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