今天是2010年4.5日清明节,和朋友们去life science park HAPPY一小天,现在她们做饭呢。一会就去吃,有华仔 刘总 小娟 白总 哈
上几天一直调试不成功的问题昨晚终于把bug修正了,现在把部分源码发上来,大家想看也可copy过去
@Service
public class WorkflowManagerImpl extends TestCase implements WorkflowManager{
static JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
@Resource private SessionFactory sf;
public void testDeployProcessDefinition(byte[] processDefinition,byte[] processImage){
ProcessDefinition pd = ProcessDefinition.parseXmlInputStream(new ByteArrayInputStream(processDefinition));
JbpmContext context = jbpmConfiguration.createJbpmContext();
try{
context.deployProcessDefinition(pd);
Workflow workflow = new Workflow();
workflow.setName(pd.getName());
workflow.setProcessDefinition(processDefinition);
workflow.setProcessImage(processImage);
sf.getCurrentSession().save(workflow);
}finally{
//context������Ҫ�ر�
context.close();
}
}
}