Trying to test what I've written I meet this error (I'm using a generic task, with a userTask the error is similar).
java.lang.ClassCastException: org.jbpm.workflow.core.node.WorkItemNode cannot be cast to org.jbpm.workflow.core.node.CompositeContextNode
at org.jbpm.bpmn2.xml.ProcessHandler.linkBoundaryEvents(ProcessHandler.java:265)
at org.jbpm.bpmn2.xml.ProcessHandler.end(ProcessHandler.java:130)
at org.drools.xml.ExtensibleXmlParser.endElement(ExtensibleXmlParser.java:414)
It seems that it's not yet supported to have a Boundary Event in a Task (even if it should be possible for BPMN2). Can you confirm that, or I'm missing something?