多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
每次启动一个流程,这个流程就是一个全新的流程实例,比如每次运行下面的程序时就会创建一个新的流程实例。 ```java @Test public void runtimeProcess() { //获取ProcessEngine ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine(); //获取RuntimeService RuntimeService runtimeService = processEngine.getRuntimeService(); //根据流程key启动对应的流程,创建流程实例 ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("evectionProcess"); //流程部署id:1 log.info("流程部署id:{}", processInstance.getDeploymentId()); //流程定义id:evectionProcess:1:4 log.info("流程定义id:{}", processInstance.getProcessDefinitionId()); //流程实例id:2501 log.info("流程实例id:{}", processInstance.getId()); } ```