feat(bpm): add recoverable connections and passive arrival monitoring

This commit is contained in:
abaishu0730 committed 2026-10-20 16:19:32 +08:00
1 parent 2d6349134f
commit 8ca493d439
37 files changed
+676 -69

No files matched your search

+2 -2
View File
@@ -26,8 +26,8 @@ class BpmOrderProvider{
try{const rows=await this.saved(connection,principal,state=>this.client.scan(state));
const safe=rows.map(row=>{const entry=row.detailUrl?safeEntry(row.detailUrl):null;return {...row,detailUrl:entry?entry.target.href:row.detailUrl?detailURL(row.detailUrl,this.allowLocal).href:undefined};});
this.entries.set(connection.id,new Map(rows.filter(r=>r.detailUrl).map(r=>[r.taskId,{url:r.detailUrl,row:r,at:Date.now()}])));
this.checks={...this.checks,liveTodo:true,checkedAt:new Date().toISOString(),message:'真实待办接口已读取;各类别表单仍需字段与归档现场核验。'};return safe;}
catch(error){this.checks={...this.checks,liveTodo:false,message:error.message};throw error;}
this.manager.observe?.(connection.id,'todo');this.checks={...this.checks,liveTodo:true,checkedAt:new Date().toISOString(),message:'真实待办接口已读取;各类别表单仍需字段与归档现场核验。'};return safe;}
catch(error){this.manager.observe?.(connection.id,'todo',error);this.checks={...this.checks,liveTodo:false,message:error.message};throw error;}
}
captureFields(connection,principal,row){return this.capture(connection,principal,row,{fieldsOnly:true});}
async capture(connection,principal,row,{fieldsOnly=false}={}){