Merge branch 'master' into feature/REQ-5250
This commit is contained in:
commit
ab895b15de
@ -35,6 +35,16 @@ public enum FileTypeEnum {
|
|||||||
return fromValue(type);
|
return fromValue(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static FileTypeEnum valueOfLikeSuffix(String suffix) {
|
||||||
|
if (suffix == null) {
|
||||||
|
return UNKNOWN;
|
||||||
|
}
|
||||||
|
return Arrays.stream(FileTypeEnum.values())
|
||||||
|
.filter(e -> e.getSuffix().contains(suffix))
|
||||||
|
.findFirst()
|
||||||
|
.orElse(UNKNOWN);
|
||||||
|
}
|
||||||
|
|
||||||
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
|
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
|
||||||
public static FileTypeEnum fromValue(String value) {
|
public static FileTypeEnum fromValue(String value) {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
|
|||||||
@ -29,6 +29,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import static cn.axzo.workflow.common.code.BpmnTaskRespCode.TASK_HAS_BEEN_COMPLETE;
|
||||||
import static cn.axzo.workflow.common.code.BpmnTaskRespCode.TRANSFER_TO_SELF;
|
import static cn.axzo.workflow.common.code.BpmnTaskRespCode.TRANSFER_TO_SELF;
|
||||||
import static cn.axzo.workflow.common.code.OtherRespCode.ASSIGNEE_NODE_ID_NOT_EXISTS;
|
import static cn.axzo.workflow.common.code.OtherRespCode.ASSIGNEE_NODE_ID_NOT_EXISTS;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.COMMENT_TYPE_ADVICE;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.COMMENT_TYPE_ADVICE;
|
||||||
@ -100,6 +101,9 @@ public class CustomTransferUserTaskCmd extends AbstractCommand<Void> implements
|
|||||||
|
|
||||||
TaskService taskService = processEngineConfiguration.getTaskService();
|
TaskService taskService = processEngineConfiguration.getTaskService();
|
||||||
TaskEntity task = (TaskEntity) taskService.createTaskQuery().taskId(originTaskId).singleResult();
|
TaskEntity task = (TaskEntity) taskService.createTaskQuery().taskId(originTaskId).singleResult();
|
||||||
|
if (Objects.isNull(task)) {
|
||||||
|
throw new WorkflowEngineException(TASK_HAS_BEEN_COMPLETE);
|
||||||
|
}
|
||||||
|
|
||||||
validTargetAssigneeNodeId(task.getProcessDefinitionId());
|
validTargetAssigneeNodeId(task.getProcessDefinitionId());
|
||||||
|
|
||||||
|
|||||||
@ -52,10 +52,9 @@ public class EngineActivityCallbackEventListener extends AbstractFlowableEventLi
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<BpmnActivityEventListener> getOrderedListeners() {
|
private List<BpmnActivityEventListener> getOrderedListeners() {
|
||||||
ActivityOperationContext context = new ActivityOperationContext();
|
|
||||||
List<BpmnActivityEventListener> orderListeners = new ArrayList<>();
|
List<BpmnActivityEventListener> orderListeners = new ArrayList<>();
|
||||||
activityListeners.ifAvailable(orderListeners::addAll);
|
activityListeners.ifAvailable(orderListeners::addAll);
|
||||||
orderListeners.forEach(i -> i.setContext(context));
|
orderListeners.forEach(i -> i.setContext(new ActivityOperationContext()));
|
||||||
return orderListeners;
|
return orderListeners;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,10 +38,9 @@ public class EngineActivityEndEventListener implements ExecutionListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<BpmnActivityEventListener> getOrderedListeners() {
|
private List<BpmnActivityEventListener> getOrderedListeners() {
|
||||||
ActivityOperationContext context = new ActivityOperationContext();
|
|
||||||
List<BpmnActivityEventListener> orderListeners = new ArrayList<>();
|
List<BpmnActivityEventListener> orderListeners = new ArrayList<>();
|
||||||
activityListeners.ifAvailable(orderListeners::addAll);
|
activityListeners.ifAvailable(orderListeners::addAll);
|
||||||
orderListeners.forEach(i -> i.setContext(context));
|
orderListeners.forEach(i -> i.setContext(new ActivityOperationContext()));
|
||||||
return orderListeners;
|
return orderListeners;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -61,10 +61,9 @@ public class EngineActivityExtEventListener extends AbstractFlowableEventListene
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<BpmnActivityEventListener> getOrderedListeners() {
|
private List<BpmnActivityEventListener> getOrderedListeners() {
|
||||||
ActivityOperationContext context = new ActivityOperationContext();
|
|
||||||
List<BpmnActivityEventListener> orderListeners = new ArrayList<>();
|
List<BpmnActivityEventListener> orderListeners = new ArrayList<>();
|
||||||
activityListeners.ifAvailable(orderListeners::addAll);
|
activityListeners.ifAvailable(orderListeners::addAll);
|
||||||
orderListeners.forEach(i -> i.setContext(context));
|
orderListeners.forEach(i -> i.setContext(new ActivityOperationContext()));
|
||||||
return orderListeners;
|
return orderListeners;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,10 +38,9 @@ public class EngineActivityStartEventListener implements ExecutionListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<BpmnActivityEventListener> getOrderedListeners() {
|
private List<BpmnActivityEventListener> getOrderedListeners() {
|
||||||
ActivityOperationContext context = new ActivityOperationContext();
|
|
||||||
List<BpmnActivityEventListener> orderListeners = new ArrayList<>();
|
List<BpmnActivityEventListener> orderListeners = new ArrayList<>();
|
||||||
activityListeners.ifAvailable(orderListeners::addAll);
|
activityListeners.ifAvailable(orderListeners::addAll);
|
||||||
orderListeners.forEach(i -> i.setContext(context));
|
orderListeners.forEach(i -> i.setContext(new ActivityOperationContext()));
|
||||||
return orderListeners;
|
return orderListeners;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -116,10 +116,9 @@ public class EngineNoticeEventListener extends AbstractFlowableEventListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<BpmnMessagePushEventListener> getOrderedListeners() {
|
private List<BpmnMessagePushEventListener> getOrderedListeners() {
|
||||||
NoticeOperationContext context = new NoticeOperationContext();
|
|
||||||
List<BpmnMessagePushEventListener> orderListeners = new ArrayList<>();
|
List<BpmnMessagePushEventListener> orderListeners = new ArrayList<>();
|
||||||
processEventListeners.ifAvailable(orderListeners::addAll);
|
processEventListeners.ifAvailable(orderListeners::addAll);
|
||||||
orderListeners.forEach(i -> i.setContext(context));
|
orderListeners.forEach(i -> i.setContext(new NoticeOperationContext()));
|
||||||
return orderListeners;
|
return orderListeners;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -167,10 +167,9 @@ public class EngineProcessInstanceEventListener extends AbstractFlowableEngineEv
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<BpmnProcessEventListener> getOrderedListeners() {
|
private List<BpmnProcessEventListener> getOrderedListeners() {
|
||||||
ProcessOperationContext context = new ProcessOperationContext();
|
|
||||||
List<BpmnProcessEventListener> orderListeners = new ArrayList<>();
|
List<BpmnProcessEventListener> orderListeners = new ArrayList<>();
|
||||||
processEventListeners.ifAvailable(orderListeners::addAll);
|
processEventListeners.ifAvailable(orderListeners::addAll);
|
||||||
orderListeners.forEach(i -> i.setContext(context));
|
orderListeners.forEach(i -> i.setContext(new ProcessOperationContext()));
|
||||||
return orderListeners;
|
return orderListeners;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -77,10 +77,9 @@ public class EngineTaskEventListener implements TaskListener {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private List<BpmnTaskEventListener> getOrderedListeners() {
|
private List<BpmnTaskEventListener> getOrderedListeners() {
|
||||||
TaskOperationContext context = new TaskOperationContext();
|
|
||||||
List<BpmnTaskEventListener> orderListeners = new ArrayList<>();
|
List<BpmnTaskEventListener> orderListeners = new ArrayList<>();
|
||||||
taskEventListeners.ifAvailable(orderListeners::addAll);
|
taskEventListeners.ifAvailable(orderListeners::addAll);
|
||||||
orderListeners.forEach(i -> i.setContext(context));
|
orderListeners.forEach(i -> i.setContext(new TaskOperationContext()));
|
||||||
return orderListeners;
|
return orderListeners;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -455,31 +455,39 @@ public class RedisUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得缓存的基本对象列表
|
* 获得缓存的基本对象列表
|
||||||
|
* 禁止使用,会导致Redis阻塞
|
||||||
*
|
*
|
||||||
* @param pattern 字符串前缀
|
* @param pattern 字符串前缀
|
||||||
* @return 对象列表
|
* @return 对象列表
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public static Collection<String> keys(final String pattern) {
|
public static Collection<String> keys(final String pattern) {
|
||||||
Stream<String> stream = CLIENT.getKeys().getKeysStreamByPattern(pattern);
|
// Stream<String> stream = CLIENT.getKeys().getKeysStreamByPattern(pattern);
|
||||||
return stream.collect(Collectors.toList());
|
// return stream.collect(Collectors.toList());
|
||||||
|
throw new UnsupportedOperationException("禁止使用keys命令,请使用scan");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除缓存的基本对象列表
|
* 删除缓存的基本对象列表
|
||||||
*
|
*
|
||||||
* @param pattern 字符串前缀
|
* @param pattern 字符串前缀
|
||||||
|
* 禁止使用,会导致Redis阻塞
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public static void deleteKeys(final String pattern) {
|
public static void deleteKeys(final String pattern) {
|
||||||
CLIENT.getKeys().deleteByPattern(pattern);
|
// CLIENT.getKeys().deleteByPattern(pattern);
|
||||||
|
throw new UnsupportedOperationException("禁止使用keys命令,请使用scan");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查redis中是否存在key
|
* 检查redis中是否存在key
|
||||||
*
|
* 禁止使用,会导致Redis阻塞
|
||||||
* @param key 键
|
* @param key 键
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public static Boolean hasKey(String key) {
|
public static Boolean hasKey(String key) {
|
||||||
RKeys rKeys = CLIENT.getKeys();
|
// RKeys rKeys = CLIENT.getKeys();
|
||||||
return rKeys.countExists(key) > 0;
|
// return rKeys.countExists(key) > 0;
|
||||||
|
throw new UnsupportedOperationException("禁止使用keys命令,请使用scan");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -289,7 +289,7 @@ public class BpmnProcessInstanceController extends BasicPopulateAvatarController
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary = "批量获得流程实例")
|
@Operation(summary = "批量获得流程实例")
|
||||||
@GetMapping("/batch/get")
|
@PostMapping("/batch/get")
|
||||||
@Override
|
@Override
|
||||||
public CommonResponse<List<BpmnProcessInstanceVO>> getBatchProcessInstanceVO(@Validated @RequestBody BpmnProcessInstanceBatchQueryDTO dto) {
|
public CommonResponse<List<BpmnProcessInstanceVO>> getBatchProcessInstanceVO(@Validated @RequestBody BpmnProcessInstanceBatchQueryDTO dto) {
|
||||||
log.info("批量获得历史的流程实例 getProcessInstanceVO===>>>参数:{}", JSONUtil.toJsonStr(dto));
|
log.info("批量获得历史的流程实例 getProcessInstanceVO===>>>参数:{}", JSONUtil.toJsonStr(dto));
|
||||||
|
|||||||
@ -36,6 +36,7 @@ public class InnerFilterDefinitionKey implements InnerMessageQueueHandleBeforeFi
|
|||||||
}
|
}
|
||||||
Map<String, String> headers = message.getProperties();
|
Map<String, String> headers = message.getProperties();
|
||||||
String processDefinitionKey = headers.getOrDefault(MQ_OWNERSHIP_PROCESS_DEFINITION_KEY, "");
|
String processDefinitionKey = headers.getOrDefault(MQ_OWNERSHIP_PROCESS_DEFINITION_KEY, "");
|
||||||
|
log.info("MQ_OWNERSHIP_PROCESS_DEFINITION_KEY: {}", processDefinitionKey);
|
||||||
if (properties.getBroadcast().getFilterProcessDefinitionKeys().contains(processDefinitionKey)) {
|
if (properties.getBroadcast().getFilterProcessDefinitionKeys().contains(processDefinitionKey)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,7 +34,7 @@ public class InnerFilterMQOwnerShip implements InnerMessageQueueHandleBeforeFilt
|
|||||||
}
|
}
|
||||||
Map<String, String> headers = message.getProperties();
|
Map<String, String> headers = message.getProperties();
|
||||||
String mqOwnerShip = headers.getOrDefault(MQ_OWNERSHIP_APPLICATION, null);
|
String mqOwnerShip = headers.getOrDefault(MQ_OWNERSHIP_APPLICATION, null);
|
||||||
|
log.info("MQ_OWNERSHIP_APPLICATION: {}", mqOwnerShip);
|
||||||
if (!StringUtils.hasText(mqOwnerShip)) {
|
if (!StringUtils.hasText(mqOwnerShip)) {
|
||||||
log.debug("【{}】The broadcast message does not attribute the message, will not be ignored. messageId: {}", this.getClass().getSimpleName(), message.getMsgId());
|
log.debug("【{}】The broadcast message does not attribute the message, will not be ignored. messageId: {}", this.getClass().getSimpleName(), message.getMsgId());
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user