activiti ProcessInstance(流程实例) 和 Execution(执行流)

ProcessInstance 流程实例,是主执行流 继承Execution
启动流程,会创建流程实例,此是会在act_ru_execution中保存数据(主流程数据、子流程数据),
如果只有一个流程分支的话,还会在此表中创建一条子流程数据,会引用主流程数据的id,
如果有多个分支就会创建多个子流程数据


RuntimeService runtimeService = engine.getRuntimeService();
Deployment de = repositoryService.createDeployment().addClasspathResource("test.bpmn").deploy();
ProcessDefinition defi = rs.createProcessDefinitionQuery().deploymentId(de.getId()).singleResult();
    	
ProcessInstance pi = runtimeService.startProcessInstanceByKey(defi.getKey());

 

你可能感兴趣的:(activiti)