for (SimulationPathModel path : simulation.getPaths().values()) {
simulationFluent.newPath(path.getName());
simulationFluent.newKnowledgeBuilder() // TODO only do once, for the root
.add(ResourceFactory.newByteArrayResource(moduleItem.getCompiledBinaryBytes()), ResourceType.PKG)
.end();
simulationFluent.newKnowledgeBase()
.addKnowledgePackages()
.end(World.ROOT, KnowledgeBase.class.getName());
simulationFluent.newStatefulKnowledgeSession().end();
for (SimulationStepModel step : path.getSteps().values()) {
simulationFluent.newStep(step.getDistanceMillis());