WfProcess process
= pmgr.createProcess(new DefaultRequester (workflowService));
chan = workflowService.getChannel(process, "test_channel");
DocumentBuilderFactory df = DocumentBuilderFactory.newInstance ();
Document doc = df.newDocumentBuilder ().newDocument ();
DocumentFragment frag = doc.createDocumentFragment ();
frag.appendChild(doc.createElement ("root"));
TransformerFactory tf = TransformerFactory.newInstance();
Transformer t = tf.newTransformer ();
SAXEventBufferImpl b = new SAXEventBufferImpl ();
t.transform (new DOMSource (frag), new SAXResult(b));