Re: [rules-users] Long pattern for Nurse Rostering

2013-08-09 Thread Wolfgang Laun
See for comments inline.

On 09/08/2013, john poole  wrote:
> I'm trying to create a rule for a 15 day pattern. When the patterns uses
> the
> same shift for all 15 days, I do this:
>
> rule "unWanted15DayPattern"
> when
> $pattern : U15DayPattern(
> $numberOfDays : numberOfDays,

This binding is never used.

> $shiftType : shiftType
> )
>
> ShiftAssignment(
> shiftType == $shiftType,
> $employee : employee,
> $firstDayIndex : shiftDateDayIndex

The constraint shiftDateDayIndex % 15 == 0 should be used here.
(Principle: Avoid partial matches as early as possible.)

> )
>
> ShiftDate( $firstDayIndex == dayIndex, dayIndex % 15 == 0)

If the constraint is moved up: what is the purpose of this pattern? Is
it necessary to make sure that there *is* a ShiftDate with a matching
dayIndex? This won't work well, if there isn't, so I guess there
always is a matching ShiftDate - and then the pattern is now useless.

>
> //Check for different employee working that shift in the next N days
>
>$shiftAssignment : ShiftAssignment(
> shiftType == $shiftType,
> employee != $employee,
> shiftDateDayIndex > $firstDayIndex,
> shiftDateDayIndex < $firstDayIndex + 15
> )
>
> then
>
>  insertLogical(new IntConstraintOccurrence("unWanted15DayPattern",
> ConstraintType.NEGATIVE_SOFT,
>$pattern.getWeight(),
> $firstDayIndex));
> end
>
> But I'm having a hard time figuring out how to do it with different
> shiftTypes for each day, because it means having to use a loop.

Not necessarily. It depends how a U15DayPattern with more than one
shiftType in these days is represented. (Or what, exactly, do you mean
by "different shiftTypes for each day"?) A little more explanation
about the data model is indicated...

-W


> Not sure if that makes sense, but it anyone has used a long pattern that
> stores items in a list/array I'd love to hear how they did it.
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Long-pattern-for-Nurse-Rostering-tp4025432.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-wb-6 / Guvnor on Tomcat 7 behind firewall

2013-08-09 Thread kappert
Hello!

I have just tried to deploy drools-wb-6.0.0.Beta5-tomcat7.0.war on Tomcat 7
on a Windows 7 PC behind a corporate firewall. The application won't launch,
and in Tomcat's localhost.2013-08-09.log I get the stack trace pasted below.

I think this is the same problem already encountered with Beta2: 
http://drools.46999.n3.nabble.com/Guvnor-6-0-0-Beta2-and-Beta3-on-Tomcat-7-should-problems-be-reported-td4024142.html

  

Does somebody have an explanation for what is going on here?
*Is there any hope that we will be able to use Guvnor 6 behind a corporpate
firewall?*









--
View this message in context: 
http://drools.46999.n3.nabble.com/drools-wb-6-Guvnor-on-Tomcat-7-behind-firewall-tp4025434.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] WorkingMemoryListener & Declared Types

2013-08-09 Thread droolster
Thanks!

I will use your helper classes.



--
View this message in context: 
http://drools.46999.n3.nabble.com/WorkingMemoryListener-Declared-Types-tp4025391p4025435.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 in Reselliency environment : Assets stored in DB not visible in Secondary server

2013-08-09 Thread maunakea
Looks like you have not configured clustering. Once you setup clustering, you
will see these tables...
GLOBAL_VERSION
JOURNAL
LOCAL_VERSIONS




--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-Guvnor-in-Reselliency-environment-Assets-stored-in-DB-not-visible-in-Secondary-server-tp4025062p4025436.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] Mapping complex objects info Guvnor compatible shim classes?

2013-08-09 Thread Mark Bennett
We want our domain experts to be able to create Guided Rules in Guvnor (5.5)

But Guvnor seems pretty limited about what it will accept, and how it will 
render it.

We're attempting to create adapter classes that will:
* Allow us to expose a rich set of fields and methods in UI
* Use as injected facts into the engine

Main issues we're having:
* Native objects are nested, but Guvnor seems to want shallow
* Our native objects can have different attributes (different schemas)
 - And you can't say getField( fieldName )
* Some returned items can be multivalued, vs. singular

Our idea is:
* Have admin send a prototypical request & schema event into our native system
* Scrape and flatten that into a java class that exposes Guvnor friendly methods
* Send that class into Guvnor
* Keep a copy of that class to create instances of when injecting facts into 
the engine

Is there some type of easy way to map complex objects to/from the simpler 
Guvnor/Drools model?  Some type of reflection based mapper with some simple 
rules or a template?  We're wondering what others have done in this situation?

Thanks,
Mark

--
Mark Bennett / LucidWorks: Search & Big Data / mark.benn...@lucidworks.com
Office: 408-898-4201 / Telecommute: 408-733-0387 / Cell: 408-829-6513


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


Re: [rules-users] calling kbuilder API from jsp and servlet

2013-08-09 Thread sunil
Put the Drools related dependency jars in your Lib Folder of Dynamic web
project. It will surely work.



--
View this message in context: 
http://drools.46999.n3.nabble.com/calling-kbuilder-API-from-jsp-and-servlet-tp4025431p4025438.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