| | |
| | | package com.iailab.module.bpm.enums.definition; |
| | | |
| | | import cn.hutool.core.util.ArrayUtil; |
| | | import com.iailab.framework.common.core.IntArrayValuable; |
| | | import com.iailab.framework.common.core.ArrayValuable; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Getter; |
| | | |
| | |
| | | */ |
| | | @Getter |
| | | @AllArgsConstructor |
| | | public enum BpmUserTaskRejectHandlerType implements IntArrayValuable { |
| | | public enum BpmUserTaskRejectHandlerType implements ArrayValuable { |
| | | |
| | | FINISH_PROCESS_INSTANCE(1, "终止流程"), |
| | | RETURN_USER_TASK(2, "驳回到指定任务节点"); |
| | |
| | | private final Integer type; |
| | | private final String name; |
| | | |
| | | public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskRejectHandlerType::getType).toArray(); |
| | | public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskRejectHandlerType::getType).toArray(Integer[]::new); |
| | | |
| | | public static BpmUserTaskRejectHandlerType typeOf(Integer type) { |
| | | return ArrayUtil.firstMatch(item -> item.getType().equals(type), values()); |
| | | } |
| | | |
| | | @Override |
| | | public int[] array() { |
| | | public Integer[] array() { |
| | | return ARRAYS; |
| | | } |
| | | } |