ObjectMarshallingStrategyStore objectMarshallingStrategyStore = context.objectMarshallingStrategyStore;
List<InternalFactHandle> matchFactHandles = null;
if ( ((InternalAgenda) wm.getAgenda()).isDeclarativeAgenda() ) {
ActivationIterator it = ActivationIterator.iterator( wm );
matchFactHandles = new ArrayList<InternalFactHandle>( 100 );
for ( Activation item = (Activation) it.next(); item != null; item = (Activation) it.next() ) {
matchFactHandles.add( item.getFactHandle() );
}
}
stream.writeInt( objectStore.size() + ((matchFactHandles == null) ? 0 : matchFactHandles.size()) );