// count how many instances/steps should current path have
int instancesOfPath = (int) (numberOfAllInstances * probability);
for (int i = 0; i < instancesOfPath; i++) {
f.newStep( interval * i )
.newKieSession( releaseId, "TestKbase.KSession1" )
.end(World.ROOT, StatefulKnowledgeSession.class.getName())
.addCommand(new SimulateProcessPathCommand("defaultPackage.test", context, path));
}