|
@@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.util.collection.SetUtils;
|
|
|
import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
|
|
|
import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService;
|
|
|
import jakarta.annotation.Resource;
|
|
|
+import org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl;
|
|
|
import org.flowable.engine.runtime.ProcessInstance;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -20,7 +21,13 @@ public class BpmTaskAssignStartUserExpression {
|
|
|
@Resource
|
|
|
private BpmProcessInstanceService processInstanceService;
|
|
|
|
|
|
- public Set<Long> calculateUsers(org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl execution) {
|
|
|
+ /**
|
|
|
+ * 计算审批的候选人
|
|
|
+ *
|
|
|
+ * @param execution 流程执行实体
|
|
|
+ * @return 发起人
|
|
|
+ */
|
|
|
+ public Set<Long> calculateUsers(ExecutionEntityImpl execution) {
|
|
|
ProcessInstance processInstance = processInstanceService.getProcessInstance(execution.getProcessInstanceId());
|
|
|
Long startUserId = NumberUtils.parseLong(processInstance.getStartUserId());
|
|
|
return SetUtils.asSet(startUserId);
|