}
public Collection< ? extends WorkingMemoryEntryPoint> execute(Context context) {
StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) context).getStatefulKnowledgesession();
Collection< ? extends WorkingMemoryEntryPoint> eps = ksession.getWorkingMemoryEntryPoints();
WorkingMemoryEntryPointBuilder epBuilder = (WorkingMemoryEntryPointBuilder)context.get(WorkingMemoryEntryPointBuilder.class.getName());
if (epBuilder == null) {
return eps;
}
Collection<WorkingMemoryEntryPoint> result = new ArrayList<WorkingMemoryEntryPoint>();
for (WorkingMemoryEntryPoint ep : eps) {
result.add(epBuilder.getWorkingMemoryEntryPoint(ep.getEntryPointId()));
}
return result;
}