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<String, ? extends Object> variables);
void setVariablesLocal(String executionId, Map<String, ? extends Object> variables);

 

TaskService 通过以下方法获得

Map<String, Object> getVariables(String executionId);
Map<String, Object> getVariablesLocal(String executionId);
Map<String, Object> getVariables(String executionId, Collection<String> variableNames);
Map<String, Object> getVariablesLocal(String executionId, Collection<String> variableNames);
Object getVariable(String executionId, String variableName);
<T> T getVariable(String executionId, String variableName, Class<T> 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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值