1.把logback 日志级别改成 debug2. 启动查看控制台控制台 Waiting for changelog lock.... (from 源码 www.fhadmin.org)说明是数据库死锁,把LOCKED 值只要是1的,都改成 0
act_ge_bytearray:二进制数据表,如流程定义、流程模板、流程图的字节流文件;
act_ge_property:属性数据表(不常用);
2)历史表(8个,HistoryService接口操作的表)
act_hi_actinst:历史节点表,存放流程实例运转的各个节点信息(包含开始、结束等非任务节点);
...
Wait
ing
for
change
log
lock
....
Runn
ing
the migration script for a
database
may produce this:
INFO … Liquibase:
Wait
ing
for
change
log
lock
....
INFO … Liquib...
非常抱歉,我之前的回答有误。在
Flowable
6.5 中,确实没有 `org.
flowable
.engine.delegate.Expression` 接口。
如果需要处理复杂条件,可以使用 `org.
flowable
.engine.impl.bpmn.behavior.ExclusiveGatewayActivityBehavior` 中的 `org.
flowable
.engine.impl.bpmn.behavior.ExclusiveGatewayActivityBehavior#
ev
aluateConditions(DelegateExecution)` 方法,该方法可以通过代理类计算条件表达式的值。
以下是一个使用代理类处理复杂条件的示例:
1. 定义一个 Java 类,实现 `org.
flowable
.engine.delegate.JavaDelegate` 接口。该接口用于执行 Java 代码,并可以访问流程实例的变量。
public class MyJavaDelegate implements JavaDelegate {
@Override
public void execute(DelegateExecution execution) {
// 获取 execution 中的变量,根据变量值计算条件表达式的值
// 将计算结果设置为 execution 的变量
2. 在 ExclusiveGateway 中定义条件表达式,值为代理类的实例。
<exclusiveGateway id="exclusiveGateway1" name="Exclusive Gateway">
<extensionElements>
<activiti:executionListener expression="${myJavaDelegate}"
ev
ent="start" />
</extensionElements>
<condition id="flow1Condition" name="flow1">
<!-- 空值,代理类中计算条件表达式的值 -->
</condition>
<condition id="flow2Condition" name="flow2">
<!-- 空值,代理类中计算条件表达式的值 -->
</condition>
</exclusiveGateway>
3. 在流程启动时,将代理类的实例设置为 execution 的变量。
Map<Str
ing
, Object> variables = new HashMap<>();
variables.put("myJavaDelegate", new MyJavaDelegate());
runtimeService.startProcessInstanceByKey("myProcess", variables);
4. 在代理类中可以通过 DelegateExecution 对象获取流程实例的变量,根据变量值计算条件表达式的值,并将计算结果设置为 execution 的变量。
public class MyJavaDelegate implements JavaDelegate {
@Override
public void execute(DelegateExecution execution) {
// 获取 execution 中的变量
Object variable = execution.getVariable("myVariable");
// 根据变量值计算条件表达式的值
boolean conditionValue = true; // 假设计算结果为 true
// 将计算结果设置为 execution 的变量
execution.setVariable("flow1Condition", conditionValue);
execution.setVariable("flow2Condition", !conditionValue);
以上就是一个使用代理类处理复杂条件的示例。希望能够对你有所帮助。
Da Vinci~:
SpringBoot 2.7.0 处理跨域的问题
weixin_43744149: