{
PetriNetModelProcessor pnp = (PetriNetModelProcessor) editor
.getModelProcessor();
// Generate BPEL Model
BpelParserModel m = new BpelParserModel();
m.createModel(pnp.getElementContainer());
ProcessDocument doc = ProcessDocument.Factory.newInstance();
TProcess process = doc.addNewProcess();
// BPEL.genBpelProcess();
// BPEL.Process.set(m.generate_bpel());
// setGlobals(BPEL.Process, pnp);
process.set(m.generate_bpel());
setGlobals(process,pnp);
// File Output
XmlOptions opt = new XmlOptions();
//opt.setSavePrettyPrintIndent(2);