public void addItemToActivationGroup ( final AgendaItem item ) { if ( item . isRuleAgendaItem ( ) ) { throw new UnsupportedOperationException ( "defensive programming, making sure this isn't called, before removing" ) ; } String group = item . getRule ( ) . getActivationGroup ( ) ; if ( group != null && group . length ( ) > 0 ) { InternalActivationGroup actgroup = getActivationGroup ( group ) ; // Don't allow lazy activations to activate, from before it's last trigger point if ( actgroup . getTriggeredForRecency ( ) != 0 && actgroup . getTriggeredForRecency ( ) >= item . getPropagationContext ( ) . getFactHandle ( ) . getRecency ( ) ) { return ; } actgroup . addActivation ( item ) ; } }
If the item belongs to an activation group add it