Compare commits
8 Commits
2fa4680bac
...
ab895b15de
| Author | SHA1 | Date | |
|---|---|---|---|
| ab895b15de | |||
| 84e2e890de | |||
| 4824a8a315 | |||
| 956b470786 | |||
| 3c8279e45c | |||
| f6c13979aa | |||
|
|
701a2009ab | ||
|
|
93acbd775e |
@ -35,6 +35,16 @@ public enum FileTypeEnum {
|
||||
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)
|
||||
public static FileTypeEnum fromValue(String value) {
|
||||
if (value == null) {
|
||||
|
||||
@ -29,6 +29,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
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.OtherRespCode.ASSIGNEE_NODE_ID_NOT_EXISTS;
|
||||
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();
|
||||
TaskEntity task = (TaskEntity) taskService.createTaskQuery().taskId(originTaskId).singleResult();
|
||||
if (Objects.isNull(task)) {
|
||||
throw new WorkflowEngineException(TASK_HAS_BEEN_COMPLETE);
|
||||
}
|
||||
|
||||
validTargetAssigneeNodeId(task.getProcessDefinitionId());
|
||||
|
||||
|
||||
@ -52,10 +52,9 @@ public class EngineActivityCallbackEventListener extends AbstractFlowableEventLi
|
||||
}
|
||||
|
||||
private List<BpmnActivityEventListener> getOrderedListeners() {
|
||||
ActivityOperationContext context = new ActivityOperationContext();
|
||||
List<BpmnActivityEventListener> orderListeners = new ArrayList<>();
|
||||
activityListeners.ifAvailable(orderListeners::addAll);
|
||||
orderListeners.forEach(i -> i.setContext(context));
|
||||
orderListeners.forEach(i -> i.setContext(new ActivityOperationContext()));
|
||||
return orderListeners;
|
||||
}
|
||||
|
||||
|
||||
@ -38,10 +38,9 @@ public class EngineActivityEndEventListener implements ExecutionListener {
|
||||
}
|
||||
|
||||
private List<BpmnActivityEventListener> getOrderedListeners() {
|
||||
ActivityOperationContext context = new ActivityOperationContext();
|
||||
List<BpmnActivityEventListener> orderListeners = new ArrayList<>();
|
||||
activityListeners.ifAvailable(orderListeners::addAll);
|
||||
orderListeners.forEach(i -> i.setContext(context));
|
||||
orderListeners.forEach(i -> i.setContext(new ActivityOperationContext()));
|
||||
return orderListeners;
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,10 +61,9 @@ public class EngineActivityExtEventListener extends AbstractFlowableEventListene
|
||||
}
|
||||
|
||||
private List<BpmnActivityEventListener> getOrderedListeners() {
|
||||
ActivityOperationContext context = new ActivityOperationContext();
|
||||
List<BpmnActivityEventListener> orderListeners = new ArrayList<>();
|
||||
activityListeners.ifAvailable(orderListeners::addAll);
|
||||
orderListeners.forEach(i -> i.setContext(context));
|
||||
orderListeners.forEach(i -> i.setContext(new ActivityOperationContext()));
|
||||
return orderListeners;
|
||||
}
|
||||
|
||||
|
||||
@ -38,10 +38,9 @@ public class EngineActivityStartEventListener implements ExecutionListener {
|
||||
}
|
||||
|
||||
private List<BpmnActivityEventListener> getOrderedListeners() {
|
||||
ActivityOperationContext context = new ActivityOperationContext();
|
||||
List<BpmnActivityEventListener> orderListeners = new ArrayList<>();
|
||||
activityListeners.ifAvailable(orderListeners::addAll);
|
||||
orderListeners.forEach(i -> i.setContext(context));
|
||||
orderListeners.forEach(i -> i.setContext(new ActivityOperationContext()));
|
||||
return orderListeners;
|
||||
}
|
||||
}
|
||||
|
||||
@ -116,10 +116,9 @@ public class EngineNoticeEventListener extends AbstractFlowableEventListener {
|
||||
}
|
||||
|
||||
private List<BpmnMessagePushEventListener> getOrderedListeners() {
|
||||
NoticeOperationContext context = new NoticeOperationContext();
|
||||
List<BpmnMessagePushEventListener> orderListeners = new ArrayList<>();
|
||||
processEventListeners.ifAvailable(orderListeners::addAll);
|
||||
orderListeners.forEach(i -> i.setContext(context));
|
||||
orderListeners.forEach(i -> i.setContext(new NoticeOperationContext()));
|
||||
return orderListeners;
|
||||
}
|
||||
|
||||
|
||||
@ -167,10 +167,9 @@ public class EngineProcessInstanceEventListener extends AbstractFlowableEngineEv
|
||||
}
|
||||
|
||||
private List<BpmnProcessEventListener> getOrderedListeners() {
|
||||
ProcessOperationContext context = new ProcessOperationContext();
|
||||
List<BpmnProcessEventListener> orderListeners = new ArrayList<>();
|
||||
processEventListeners.ifAvailable(orderListeners::addAll);
|
||||
orderListeners.forEach(i -> i.setContext(context));
|
||||
orderListeners.forEach(i -> i.setContext(new ProcessOperationContext()));
|
||||
return orderListeners;
|
||||
}
|
||||
|
||||
|
||||
@ -77,10 +77,9 @@ public class EngineTaskEventListener implements TaskListener {
|
||||
* @return
|
||||
*/
|
||||
private List<BpmnTaskEventListener> getOrderedListeners() {
|
||||
TaskOperationContext context = new TaskOperationContext();
|
||||
List<BpmnTaskEventListener> orderListeners = new ArrayList<>();
|
||||
taskEventListeners.ifAvailable(orderListeners::addAll);
|
||||
orderListeners.forEach(i -> i.setContext(context));
|
||||
orderListeners.forEach(i -> i.setContext(new TaskOperationContext()));
|
||||
return orderListeners;
|
||||
}
|
||||
|
||||
|
||||
@ -455,31 +455,39 @@ public class RedisUtils {
|
||||
|
||||
/**
|
||||
* 获得缓存的基本对象列表
|
||||
* 禁止使用,会导致Redis阻塞
|
||||
*
|
||||
* @param pattern 字符串前缀
|
||||
* @return 对象列表
|
||||
*/
|
||||
@Deprecated
|
||||
public static Collection<String> keys(final String pattern) {
|
||||
Stream<String> stream = CLIENT.getKeys().getKeysStreamByPattern(pattern);
|
||||
return stream.collect(Collectors.toList());
|
||||
// Stream<String> stream = CLIENT.getKeys().getKeysStreamByPattern(pattern);
|
||||
// return stream.collect(Collectors.toList());
|
||||
throw new UnsupportedOperationException("禁止使用keys命令,请使用scan");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除缓存的基本对象列表
|
||||
*
|
||||
* @param pattern 字符串前缀
|
||||
* 禁止使用,会导致Redis阻塞
|
||||
*/
|
||||
@Deprecated
|
||||
public static void deleteKeys(final String pattern) {
|
||||
CLIENT.getKeys().deleteByPattern(pattern);
|
||||
// CLIENT.getKeys().deleteByPattern(pattern);
|
||||
throw new UnsupportedOperationException("禁止使用keys命令,请使用scan");
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查redis中是否存在key
|
||||
*
|
||||
* 禁止使用,会导致Redis阻塞
|
||||
* @param key 键
|
||||
*/
|
||||
@Deprecated
|
||||
public static Boolean hasKey(String key) {
|
||||
RKeys rKeys = CLIENT.getKeys();
|
||||
return rKeys.countExists(key) > 0;
|
||||
// RKeys rKeys = CLIENT.getKeys();
|
||||
// return rKeys.countExists(key) > 0;
|
||||
throw new UnsupportedOperationException("禁止使用keys命令,请使用scan");
|
||||
}
|
||||
}
|
||||
|
||||
@ -289,7 +289,7 @@ public class BpmnProcessInstanceController extends BasicPopulateAvatarController
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "批量获得流程实例")
|
||||
@GetMapping("/batch/get")
|
||||
@PostMapping("/batch/get")
|
||||
@Override
|
||||
public CommonResponse<List<BpmnProcessInstanceVO>> getBatchProcessInstanceVO(@Validated @RequestBody BpmnProcessInstanceBatchQueryDTO dto) {
|
||||
log.info("批量获得历史的流程实例 getProcessInstanceVO===>>>参数:{}", JSONUtil.toJsonStr(dto));
|
||||
|
||||
@ -36,6 +36,7 @@ public class InnerFilterDefinitionKey implements InnerMessageQueueHandleBeforeFi
|
||||
}
|
||||
Map<String, String> headers = message.getProperties();
|
||||
String processDefinitionKey = headers.getOrDefault(MQ_OWNERSHIP_PROCESS_DEFINITION_KEY, "");
|
||||
log.info("MQ_OWNERSHIP_PROCESS_DEFINITION_KEY: {}", processDefinitionKey);
|
||||
if (properties.getBroadcast().getFilterProcessDefinitionKeys().contains(processDefinitionKey)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ public class InnerFilterMQOwnerShip implements InnerMessageQueueHandleBeforeFilt
|
||||
}
|
||||
Map<String, String> headers = message.getProperties();
|
||||
String mqOwnerShip = headers.getOrDefault(MQ_OWNERSHIP_APPLICATION, null);
|
||||
|
||||
log.info("MQ_OWNERSHIP_APPLICATION: {}", 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());
|
||||
return false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user