ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
每次启动一个流程,这个流程就是一个全新的流程实例,比如每次运行下面的程序时就会创建一个新的流程实例。 ```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()); } ```