domain - dao - service
熟悉表可以直接调用, 但调用 activiti 更简便
ProcessEngines.getDefaultProcessEngine();
ProcessEngineConfiguration#buildProcessEngine
ProcessEngine 流程引擎
*注: 已被Activiti7删除
4 + 2 类
Business Process Management Initiative 非盈利机构
BPMN: Business Process Model and Notation, 业务流程建模和标注 (Notation 是 BPMN 的核心, 用图形表达)
Deployment deploy = repositoryService.createDeployment().name("evection").addClasspathResource("bpm/evection.bpmn").addClasspathResource("bpm/evection.png").deploy();
deploy.getId();
deploy.getName();
// 改进
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("bpm/evection.zip");
ZipInputStream zipInputStream = new ZipInputStream(inputStream);
Deployment deploy = repositoryService.createDeployment().name("process-one.bar").addZipInputStream(zipInputStream).deploy();
act_re_deployment # 部署表, 每次部署都会新增
act_re_procdef # 流程定义
act_ge_bytearray # 流程资源表(bpmn文件、svg文件)act_ge_property # update dbid 系统相关
act_ge_property # update dbid 系统相关act_hi_actinst # (流程实例执行)历史活动节点表 historic-activity-instances: taskId actType startTime endTime
act_hi_identitylink # 流程参与者的历史信息
act_hi_procinst # 流程实例 历史信息
act_hi_taskinst # 任务 历史信息
act_ru_execution # 执行实例的信息
act_ru_identitylink # 流程参与者信息 (当前任务是由谁来负责做)
act_ru_task # 任务信息 (运行时的任务)
List taskList = taskService.createTaskQuery().processDefinitionKey("myEvection").taskAssignee("zhangsan").list()
for task in taskList:print(task.getProcessInstanceId(),task.getId(),task.getAssignee(),task.getName())
# act_ge_property
act_ru_task inner join act_re_procdef
act_ru_task -> act_hi_taskinst (先存hi, 再存ru表)
taskService.complete("2505")
// 改进
Task task = taskService.createTaskQuery().processDefinitionKey("myEvection").taskAssignee("zhangsan").singleResult();
taskService.complete(task.getId());
act_ge_property
act_ru_task where id_ = '2505'
act_re_procdef where id_ = 'myEvention:1:4' -- 复合id
act_re_deployment where id_
act_ge_bytearray where deployment_id_
act_re_procdef deployment_id_ and key_ and (tenant_id_ = '' or tenant_id_ is null)
-- update act_ge_property set rev_ =
insert into act_hi_taskinst
insert into act_hi_actinst
insert into act_hi_identitylink
insert into act_ru_task
insert into act_ru_identitylink
update act_hi_taskinst
update act_ru_execution
update act_hi_actinst
delete from act_ru_task where id_ and rev_
act_ge_bytearray
act_re_deployment
act_re_procdef
act_ge_property update