//流程定义
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("sample.bpmn"), ResourceType.BPMN2);
KnowledgeBase kbase = kbuilder.newKnowledgeBase();
//流程会话
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
// start a new process instance
ksession.startProcess("com.sample.bpmn.hello");