stream.writeShort( PersisterEnums.RULE_SET_NODE_INSTANCE );
} else if ( nodeInstance instanceof HumanTaskNodeInstance ) {
stream.writeShort( PersisterEnums.HUMAN_TASK_NODE_INSTANCE );
stream.writeLong( ((HumanTaskNodeInstance) nodeInstance).getWorkItem().getId() );
} else if ( nodeInstance instanceof WorkItemNodeInstance ) {
stream.writeShort( PersisterEnums.WORK_ITEM_NODE_INSTANCE );
stream.writeLong( ((WorkItemNodeInstance) nodeInstance).getWorkItem().getId() );
} else if ( nodeInstance instanceof SubProcessNodeInstance ) {
stream.writeShort( PersisterEnums.SUB_PROCESS_NODE_INSTANCE );
stream.writeLong( ((SubProcessNodeInstance) nodeInstance).getProcessInstanceId() );
} else if ( nodeInstance instanceof MilestoneNodeInstance ) {