commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package com.budwk.app.flow.handler;
|
||||
|
||||
import com.budwk.app.flow.engine.AssignmentHandler;
|
||||
import com.budwk.app.flow.engine.core.Execution;
|
||||
import com.budwk.app.flow.engine.model.TaskModel;
|
||||
import org.nutz.lang.Lang;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2025/11/22 16:06
|
||||
* @description 指定用户
|
||||
*/
|
||||
public class FlowAssignUserHandler implements AssignmentHandler {
|
||||
@Override
|
||||
public List<String> assign(TaskModel model, Execution execution) {
|
||||
String userId = execution.getArgs().getStr("userId");
|
||||
if (Lang.isEmpty(userId)){
|
||||
throw new RuntimeException("流程参数错误!");
|
||||
}
|
||||
return List.of(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "指定下一个流程人(根据args中的userId))";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return AssignmentHandler.super.getOrder();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user