flowable Service介绍

1 原始数据库表说明

  • ACT_RE_*: RE stands for repository. Tables with this prefix contain static information such as process definitions and process resources (images, rules, etc.).

  • ACT_RU_*: RU stands for runtime. These are the runtime tables that contain the runtime data of process instances, user tasks, variables, jobs, and so on. Flowable only stores the runtime data during process instance execution and removes the records when a process instance ends. This keeps the runtime tables small and fast.

  • ACT_HI_*: HI stands for history. These are the tables that contain historic data, such as past process instances, variables, tasks, and so on.

  • ACT_GE_*: general data, which is used for various use cases.

 

2 7个service功能

RepositoryService 1)查询部署和流程定义。2)挂起或者激活流程部署或者流程定义。大多数是处理一些静态信息。

RuntimeService: 1)用来获取和保存流程变量。2)查询流程实例和当前执行位置。3)流程实例需要等待一个外部触发,从而继续进行。

TaskService:1)查询分配给某人或一组的任务。2)产生独立的任务,不依赖于任何流程实例的任务。3)操纵用户分配任务。4)完成任务。

HistoryService :1)查询各种历史数据

ManagementService:1)查询数据库表信息和表的元数据。2)管理各种 jobs 任务,例如定时器、延迟、挂起

 

3 变量,

RuntimeService 通过以下方式获取或者设置变量

void setVariable(String executionId, String variableName, Object value);
void setVariableLocal(String executionId, String variableName, Object value);
void setVariables(String executionId, Map variables);
void setVariablesLocal(String executionId, Map variables);

 

TaskService 通过以下方法获得

Map getVariables(String executionId);
Map getVariablesLocal(String executionId);
Map getVariables(String executionId, Collection variableNames);
Map getVariablesLocal(String executionId, Collection variableNames);
Object getVariable(String executionId, String variableName);
 T getVariable(String executionId, String variableName, Class variableClass);

说明:任何变量的API 调用都会去数据库中查询全部的变量,

 

Expression 可以用在Java Service tasks, Execution Listeners, Task Listeners and Conditional sequence flows 。可以有两种:Value expression Method expression

Value expression: resolves to a value. By default, all process variables are available to use. Also, all spring-beans (if using Spring) are available to use in expressions. Some examples:

${myVar}
${myBean.myProperty}

 

转载于:https://www.cnblogs.com/zhaopengcheng/p/9355626.html

你可能感兴趣的:(runtime,数据库,java)