oclexp = "(self.getRepresents())"; EObjectCondition condition = new OCLConstraintCondition(oclexp, UMLPackage.Literals.LIFELINE); Set queryresult = Collections.EMPTY_SET; try { queryresult = UMLModeler.getQueryHelper().executeQuery(model, condition, new NullProgressMonitor()); } catch (InterruptedException e) { //do not care }