提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.bpm.framework.flowable.core.candidate.strategy; |
H |
2 |
|
|
3 |
import com.iailab.framework.common.util.string.StrUtils; |
|
4 |
import com.iailab.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; |
|
5 |
import com.iailab.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; |
|
6 |
import com.iailab.module.system.api.user.AdminUserApi; |
|
7 |
import org.flowable.engine.delegate.DelegateExecution; |
|
8 |
import org.springframework.stereotype.Component; |
|
9 |
|
|
10 |
import javax.annotation.Resource; |
|
11 |
import java.util.Set; |
|
12 |
|
|
13 |
/** |
|
14 |
* 用户 {@link BpmTaskCandidateStrategy} 实现类 |
|
15 |
* |
|
16 |
* @author kyle |
|
17 |
*/ |
|
18 |
@Component |
|
19 |
public class BpmTaskCandidateUserStrategy implements BpmTaskCandidateStrategy { |
|
20 |
|
|
21 |
@Resource |
|
22 |
private AdminUserApi adminUserApi; |
|
23 |
|
|
24 |
@Override |
|
25 |
public BpmTaskCandidateStrategyEnum getStrategy() { |
|
26 |
return BpmTaskCandidateStrategyEnum.USER; |
|
27 |
} |
|
28 |
|
|
29 |
@Override |
|
30 |
public void validateParam(String param) { |
|
31 |
adminUserApi.validateUserList(StrUtils.splitToLongSet(param)); |
|
32 |
} |
|
33 |
|
|
34 |
@Override |
|
35 |
public Set<Long> calculateUsers(DelegateExecution execution, String param) { |
|
36 |
return StrUtils.splitToLongSet(param); |
|
37 |
} |
|
38 |
|
|
39 |
} |