有事没事领个红包

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}

 

posted @   crazyCodeLove  阅读(1536)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2017-07-23 RESTful风格的SSM框架搭建
点击右上角即可分享
微信分享提示