[rules-users] drools migration

maunakea satishnryn at gmail.com
Tue Jul 2 15:04:39 EDT 2013


This seems to be an equivalent rule removing the need for collect...

when
  $trx : TransactionWrapper(ignoreSourceLocation == false) &&
  $fromState : TAWrapper ( authorityType == TAType.STATE || authorityType ==
TAType.COUNTRY, locationType == LocationType.ORIGIN ) &&
  $toState   : TAWrapper ( authorityType == TAType.STATE || authorityType ==
TAType.COUNTRY, locationType == LocationType.DESTINATION, code !=
$fromState.code ) &&
  $removableAuthority : TAWrapper( locationType == LocationType.ORIGIN )
then
  retract ($removableAuthority);
end 

You know your domain better :) but maybe this is what was meant?...
when
  $trx : TransactionWrapper(ignoreSourceLocation == false) &&
  $fromState : TAWrapper ( authorityType == TAType.STATE || authorityType ==
TAType.COUNTRY, locationType == LocationType.ORIGIN ) &&
  $toState   : TAWrapper ( authorityType == TAType.STATE || authorityType ==
TAType.COUNTRY, locationType == LocationType.DESTINATION, code !=
$fromState.code ) &&
then
  retract (fromState);
end 

Good luck!!!



--
View this message in context: http://drools.46999.n3.nabble.com/rules-users-drools-migration-tp4024691p4024719.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list