use of org.drools.core.common.WorkingMemoryAction in project drools by kiegroup.
the class ProtobufOutputMarshaller method writeActionQueue.
public static void writeActionQueue(MarshallerWriteContext context, ProtobufMessages.RuleData.Builder _session) throws IOException {
Iterator<? extends PropagationEntry> i = context.wm.getActionsIterator();
if (!i.hasNext()) {
return;
}
ProtobufMessages.ActionQueue.Builder _queue = ProtobufMessages.ActionQueue.newBuilder();
while (i.hasNext()) {
PropagationEntry entry = i.next();
if (entry instanceof WorkingMemoryAction) {
_queue.addAction(((WorkingMemoryAction) entry).serialize(context));
}
}
_session.setActionQueue(_queue.build());
}
Aggregations