首页 开发技术 其它     /    jbpm流程控制初学者容易接触的domo

jbpm流程控制初学者容易接触的domo

上传者: ya7512196 | 上传时间:2023/3/12 7:18:41 | 文件大小:20.25MB | 文件类型:rar
jbpm流程控制初学者容易接触的domo
jbpm流程控制初学者容易接触的domopackagecom.sxdx.jbpm;importjava.io.FileInputStream;importjava.io.InputStream;importjava.util.zip.ZipInputStream;importorg.jbpm.JbpmConfiguration;importorg.jbpm.JbpmContext;importorg.jbpm.graph.def.ProcessDefinition;importorg.jbpm.graph.exe.ProcessInstance;importorg.jbpm.graph.exe.Token;importjunit.framework.TestCase;publicclassJbpmTestextendsTestCase{publicvoidtestbushu()throwsException{//1.获取sessionFactoryJbpmConfigurationjbpmConfiguration=JbpmConfiguration.getInstance();//2.获取sessionJbpmContextjc=jbpmConfiguration.createJbpmContext();//要把流程图转换成java对象InputStreamis=newFileInputStream("D://java_dianli//jbpm//src//leave//leave.zip");ZipInputStreamzis=newZipInputStream(is);ProcessDefinitionpd=ProcessDefinition.parseParZipInputStream(zis);//需求使用jc的方法吧pd持久到数据库中jc.deployProcessDefinition(pd);jc.close();}publicvoidtestgetinstance(){//得到流程定义(在数据库)JbpmConfigurationjbpmConfiguration=JbpmConfiguration.getInstance();JbpmContextjc=jbpmConfiguration.createJbpmContext();ProcessDefinitionpd=jc.getGraphSession().findLatestProcessDefinition("qingjia");//根据流程定义创建流程实例ProcessInstancepi=pd.createProcessInstance();jc.close();}publicvoidtestrun(){//得到流程定义(在数据库)JbpmConfigurationjbpmConfiguration=JbpmConfiguration.getInstance();JbpmContextjc=jbpmConfiguration.createJbpmContext();//还没开始走,看看我的令牌在哪里ProcessInstancepi=jc.getProcessInstance(1);Tokentoken=pi.getRootToken();Stringn1=token.getNode().getName();System.out.println("当前走到了"+n1+"节点");//令牌开始往下走token.signal();System.out.println("当前走到了"+token.getNode().getName()+"节点");token.signal();System.out.println("当前走到了"+token.getNode().getName()+"节点");}}

文件下载

资源详情

[{"title":"(133个子文件20.25MB)jbpm流程控制初学者容易接触的domo","children":[{"title":".project <span style='color:#111;'>1.38KB</span>","children":null,"spread":false},{"title":".mymetadata <span style='color:#111;'>285B</span>","children":null,"spread":false},{"title":"MessageResources.properties <span style='color:#111;'>1.54KB</span>","children":null,"spread":false},{"title":"applicationContext-actions.xml <span style='color:#111;'>855B</span>","children":null,"spread":false},{"title":"applicationContext-common.xml <span style='color:#111;'>1.83KB</span>","children":null,"spread":false},{"title":"......","children":null,"spread":false},{"title":" <span style='color:steelblue;'>文件过多,未全部展示</span>","children":null,"spread":false}],"spread":true}]

评论信息

  • 有人可不可:
    初学者看看而已2015-05-31
  • hao_xuesheng:
    只是一个登陆文件,没有太大意义2013-06-04

免责申明

【好快吧下载】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【好快吧下载】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【好快吧下载】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,8686821#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明