public static String inject(String json, Map<String, String> constraints) throws Exception {
String xml = BPMN2ProcessHandler.serialize( "http://localhost:8080/designer/bpmn2_0serialization", json );
Reader isr = new StringReader( xml );
SemanticModules semanticModules = new SemanticModules();
semanticModules.addSemanticModule( new BPMNSemanticModule() );
semanticModules.addSemanticModule( new BPMNDISemanticModule() );
XmlProcessReader xmlReader = new XmlProcessReader( semanticModules );
RuleFlowProcess process = (RuleFlowProcess) xmlReader.read( isr );
isr.close();
if ( process == null ) {
throw new IllegalArgumentException( "Could not read process" );