fix(workflow): reject ServiceTask at runtime instead of silently stalling

ServiceTask was accepted by the parser but fell through to the
wildcard branch in the executor, creating an active token that
never progresses. Now returns a clear error so users know the
feature is not yet implemented rather than debugging a stuck flow.
This commit is contained in:
iven
2026-04-11 16:22:32 +08:00
parent 96a4287272
commit 6a08b99ed8

View File

@@ -245,8 +245,14 @@ impl FlowExecutor {
)
.await
}
NodeType::ServiceTask => {
// ServiceTask 尚未实现:无法自动执行服务调用,直接报错
return Err(WorkflowError::Validation(
format!("ServiceTask ({}) 尚未实现,流程无法继续", node.name),
));
}
_ => {
// UserTask / ServiceTask / 网关(分支)等:创建活跃 token
// UserTask / 网关(分支)等:创建活跃 token
let new_token_id = Uuid::now_v7();
let now = Utc::now();