Merge branch 'master' into dev
# Conflicts: # workflow-engine-core/src/main/java/cn/axzo/workflow/core/conf/FlowableConfiguration.java
This commit is contained in:
commit
0a8a58d71f
@ -115,6 +115,7 @@ public class FlowableConfiguration {
|
|||||||
configuration.addCustomJobHandler(new AsyncExtTaskInstJobHandler(extAxHiTaskInstService));
|
configuration.addCustomJobHandler(new AsyncExtTaskInstJobHandler(extAxHiTaskInstService));
|
||||||
configuration.addCustomJobHandler(new AsyncRejectTaskJobHandler(extAxHiTaskInstService));
|
configuration.addCustomJobHandler(new AsyncRejectTaskJobHandler(extAxHiTaskInstService));
|
||||||
configuration.addCustomJobHandler(new AsyncTransferUserTaskJobHandler());
|
configuration.addCustomJobHandler(new AsyncTransferUserTaskJobHandler());
|
||||||
|
// configuration.addCustomJobHandler(new AsyncTermNodeAlterJobHandler(refreshProperties));
|
||||||
configuration.addCustomJobHandler(new AsyncActivityLeaveJobHandler(bpmnProcessActivityService));
|
configuration.addCustomJobHandler(new AsyncActivityLeaveJobHandler(bpmnProcessActivityService));
|
||||||
configuration.addCustomJobHandler(new AsyncActivityCallbackJobHandler());
|
configuration.addCustomJobHandler(new AsyncActivityCallbackJobHandler());
|
||||||
configuration.addCustomJobHandler(new AsyncApproveTaskWithFormJobHandler());
|
configuration.addCustomJobHandler(new AsyncApproveTaskWithFormJobHandler());
|
||||||
|
|||||||
@ -38,7 +38,7 @@ public class CustomAddTimerJobCmd extends AbstractCommand<Void> implements Seria
|
|||||||
Date alterTime;
|
Date alterTime;
|
||||||
switch (dto.getTimeUnit()) {
|
switch (dto.getTimeUnit()) {
|
||||||
case "M":
|
case "M":
|
||||||
alterTime = DateUtil.offsetDay(new Date(), dto.getDelayTime());
|
alterTime = DateUtil.offsetMinute(new Date(), dto.getDelayTime());
|
||||||
break;
|
break;
|
||||||
case "H":
|
case "H":
|
||||||
alterTime = DateUtil.offsetHour(new Date(), dto.getDelayTime());
|
alterTime = DateUtil.offsetHour(new Date(), dto.getDelayTime());
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import com.xxl.job.core.context.XxlJobHelper;
|
|||||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections4.ListUtils;
|
||||||
import org.flowable.engine.RuntimeService;
|
import org.flowable.engine.RuntimeService;
|
||||||
import org.flowable.engine.TaskService;
|
import org.flowable.engine.TaskService;
|
||||||
import org.flowable.engine.runtime.ProcessInstance;
|
import org.flowable.engine.runtime.ProcessInstance;
|
||||||
@ -72,6 +73,12 @@ public class NodeAlterJobHandler extends IJobHandler {
|
|||||||
executedJobs.add(e);
|
executedJobs.add(e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!refreshProperties.getAlterAllDefinitionKey()) {
|
||||||
|
if (!ListUtils.emptyIfNull(refreshProperties.getAlterDefinitionKeys()).contains(processInstance.getProcessDefinitionKey())) {
|
||||||
|
XxlJobHelper.log("skip alter by config");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
List<Task> tasks = taskService.createTaskQuery()
|
List<Task> tasks = taskService.createTaskQuery()
|
||||||
.processInstanceId(e.getProcessInstanceId())
|
.processInstanceId(e.getProcessInstanceId())
|
||||||
.taskDefinitionKey(e.getActivityId())
|
.taskDefinitionKey(e.getActivityId())
|
||||||
|
|||||||
@ -41,6 +41,10 @@ public class WorkflowEngineStarterProperties {
|
|||||||
*/
|
*/
|
||||||
private Boolean joinContainerGroup = false;
|
private Boolean joinContainerGroup = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否创建本地调试专用的 GID 消费组
|
||||||
|
*/
|
||||||
|
private Boolean createDebugGroup = false;
|
||||||
/**
|
/**
|
||||||
* <h3>该参数只针对<strong color=orange>非</strong>容器环境生效</h3>
|
* <h3>该参数只针对<strong color=orange>非</strong>容器环境生效</h3>
|
||||||
* 配合 joinContainerGroup 使用,且只在 joinContainerGroup = false 时生效
|
* 配合 joinContainerGroup 使用,且只在 joinContainerGroup = false 时生效
|
||||||
@ -116,6 +120,14 @@ public class WorkflowEngineStarterProperties {
|
|||||||
this.joinContainerGroup = joinContainerGroup;
|
this.joinContainerGroup = joinContainerGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean getCreateDebugGroup() {
|
||||||
|
return createDebugGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateDebugGroup(Boolean createDebugGroup) {
|
||||||
|
this.createDebugGroup = createDebugGroup;
|
||||||
|
}
|
||||||
|
|
||||||
public String getSpecialId() {
|
public String getSpecialId() {
|
||||||
return specialId;
|
return specialId;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,6 +44,18 @@ public class NonContainerEnvironmentCondition implements Condition {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Boolean createDebugGroup = environment.getProperty("workflow.engine.starter.create-debug-group", Boolean.class);
|
||||||
|
if (Objects.isNull(createDebugGroup)) {
|
||||||
|
// 获取是否创建调试专用消费组
|
||||||
|
createDebugGroup = new WorkflowEngineStarterProperties().getCreateDebugGroup();
|
||||||
|
}
|
||||||
|
if (log.isDebugEnabled()) {
|
||||||
|
log.debug("workflow engine starter create-debug-group status: {} ", createDebugGroup);
|
||||||
|
}
|
||||||
|
if (!createDebugGroup) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// 优先外部化配置
|
// 优先外部化配置
|
||||||
Boolean joinContainerGroup = environment.getProperty("workflow.engine.starter.join-container-group", Boolean.class);
|
Boolean joinContainerGroup = environment.getProperty("workflow.engine.starter.join-container-group", Boolean.class);
|
||||||
if (Objects.isNull(joinContainerGroup)) {
|
if (Objects.isNull(joinContainerGroup)) {
|
||||||
|
|||||||
@ -72,10 +72,10 @@ public class ImplementationReadyChecker implements ApplicationListener<Applicati
|
|||||||
} else {
|
} else {
|
||||||
int finalResult = getBinaryResult(methodImplemented) | getBinaryResult(methodImplemented2);
|
int finalResult = getBinaryResult(methodImplemented) | getBinaryResult(methodImplemented2);
|
||||||
boolean[] booleansAdaptive = toBooleansAdaptive(finalResult);
|
boolean[] booleansAdaptive = toBooleansAdaptive(finalResult);
|
||||||
log.error("----------------------------------------");
|
log.warn("----------------------------------------");
|
||||||
log.error("最终事件实现情况:(二进制:{}),(十进制:{})", String.format("%4s", Integer.toBinaryString(finalResult)).replace(' ', '0'), finalResult);
|
log.warn("最终事件实现情况:(二进制:{}),(十进制:{})", String.format("%4s", Integer.toBinaryString(finalResult)).replace(' ', '0'), finalResult);
|
||||||
log.error("警告:未通过必接事件的校验!未实现的方法:{},请确保实现了 {} 接口的Bean被Spring扫描,或者在EventConsumer注册了 ProcessInstanceEventEnum 的 EventCode。", String.join(", ", getUnImplementedMethods(booleansAdaptive)), TARGET_INTERFACE.getName());
|
log.warn("警告:未通过必接事件的校验!未实现的方法:{},请确保实现了 {} 接口的Bean被Spring扫描,或者在EventConsumer注册了 ProcessInstanceEventEnum 的 EventCode。", String.join(", ", getUnImplementedMethods(booleansAdaptive)), TARGET_INTERFACE.getName());
|
||||||
log.error("----------------------------------------");
|
log.warn("----------------------------------------");
|
||||||
sendAlter(context, getUnImplementedMethods(booleansAdaptive));
|
sendAlter(context, getUnImplementedMethods(booleansAdaptive));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user