}
context.writeShort( PersisterEnums.END );
LinkedList<AgendaGroup> focusStack = agenda.getStackList();
for ( Iterator<AgendaGroup> it = focusStack.iterator(); it.hasNext(); ) {
AgendaGroup group = it.next();
context.writeShort( PersisterEnums.AGENDA_GROUP );
context.writeUTF( group.getName() );
}
context.writeShort( PersisterEnums.END );
RuleFlowGroupImpl[] ruleFlowGroups = (RuleFlowGroupImpl[]) agenda.getRuleFlowGroupsMap().values().toArray( new RuleFlowGroupImpl[agenda.getRuleFlowGroupsMap().size()] );
Arrays.sort( ruleFlowGroups,
RuleFlowGroupSorter.instance );
for ( RuleFlowGroupImpl group : ruleFlowGroups ) {
context.writeShort( PersisterEnums.RULE_FLOW_GROUP );
//group.write( context );
context.writeUTF( group.getName() );
context.writeBoolean( group.isActive() );
context.writeBoolean( group.isAutoDeactivate() );
Map<Long, String> nodeInstances = group.getNodeInstances();
context.writeInt( nodeInstances.size() );
for (Map.Entry<Long, String> entry: nodeInstances.entrySet()) {
context.writeLong( entry.getKey() );
context.writeUTF( entry.getValue() );
}