Could you please elaborate a bit more on the scenario your implement?
If you're trying to connect to the OCLTool, as described in Part 6, with
ocltool.consume_checkUML2(testmodel,constraints);
in constraints you should put a java String with a valid OCL constraint
expression,
testmodel is a java Collection where you should put top level elements of
your EMF model.