[rules-users] shiftAssignment change

john poole jdpoole at gmail.com
Tue Apr 2 16:57:14 EDT 2013


I'm trying to write a simple web application that uses much of the code from
the NurseRostering example. It all works great except when I try to do a
"change move" after terminating solving. 

In: DroolScoreDirector.afterVariableChanged() for the ShiftAssignment, I get
a null back from this:
FactHandle factHandle = workingMemory.getFactHandle(entity);

My guess is that it's because it's a different copy of the workingMemory
than the entity is coming from, but I'm not sure how to access the correct
copy.

I'm getting the ShiftAssigment from:
	NurseRoster nurseRoster = (NurseRoster) solutionBusiness.getSolution();

List<ShiftAssignment>shiftAssignmentList=nurseRoster.getShiftAssignmentList();

and then attempting the move from:
solutionBusiness.doMove(new EmployeeChangeMove(shiftAssignment,
toEmployee));

Is there something else I need to do after terminating solving before doing
a changemove?



--
View this message in context: http://drools.46999.n3.nabble.com/shiftAssignment-change-tp4023179.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list