C2 可观测:CandidateUsersHandler scriptUser 降级告警 System.out→log.warn

scriptUser(JUEL 脚本候选人,26 处≈0.5%)分支独立服务未接入时原 System.out.println
裸打印,生产不可监控、命中即静默返回空候选人(任务可能无候选人卡流)。改 SLF4J log.warn
(加 logger 字段),便于生产监控该降级命中。agentService 后处理(注释)同属未接入,本轮不动。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-14 00:03:46 +08:00
parent 5288021773
commit 89686005f0

View File

@@ -11,6 +11,8 @@ import org.flowable.engine.ProcessEngines;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.history.HistoricActivityInstance;
import org.flowable.engine.history.HistoricActivityInstanceQuery;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.dsasp.server.wf.bean.BasePropertiesConverter;
import com.dsasp.server.wf.bean.UserProperty;
@@ -42,6 +44,8 @@ import com.dsasp.server.wf.support.WfTypes;
*/
public class CandidateUsersHandler {
private static final Logger log = LoggerFactory.getLogger(CandidateUsersHandler.class);
public List<String> getCandidateUsers(Object execution, String expression){
String processInstanceId = resolveProcessInstanceId(execution);
//FIXME: json text(原版注释保留)
@@ -84,7 +88,8 @@ public class CandidateUsersHandler {
}else if(WfTypes.SCRIPTUSER.equals(userProperty.getType())){
// 原版经 ScriptingEngines.evaluate(content,"juel",execution) 求值;
// 独立服务不内置服务流脚本引擎(精简边界),WARN 降级,报告登记。
System.out.println("[WARN] candidateUsersHandler: scriptUser(JUEL 脚本)分支独立服务暂未接入,跳过该项");
log.warn("candidateUsersHandler: scriptUser(JUEL 脚本)分支独立服务暂未接入,跳过该项"
+ "(影响面≈0.5%/26 处;命中则该任务无此类候选人,生产可监控)");
users = new ArrayList<String>();
}else if(WfTypes.PROJECTROLETYPE.equals(userProperty.getType())){
users = directory.getUsersByProjectRole(projectId, userProperty.getContent());