}
private static ProtobufMessages.NodeMemory writeRIANodeMemory(final int nodeId,
final Memory memory) {
// for RIA nodes, we need to store the ID of the created handles
RIAMemory mem = (RIAMemory) memory;
if( ! mem.memory.isEmpty() ) {
ProtobufMessages.NodeMemory.RIANodeMemory.Builder _ria = ProtobufMessages.NodeMemory.RIANodeMemory.newBuilder();
final org.drools.core.util.Iterator it = mem.memory.iterator();
// iterates over all propagated handles and assert them to the new sink