Source doc: 接收统一待办数据.docx
Field extract: weaver-receive-todo-api.md
SSO deep link: skill kdshrsso Option B-qy (/qy/auth/weaver/app.do).
Target: Kingdee SHR → Weaver/Fanwei E10 统一待办中心(报业 BaoYPro)。
New project / new channel: complete Agent intake in SKILL.md before coding.
Private E10 often needs /papi/openapi prefix (root /oauth2/authorize may hit portal HTML):
POST {host}/papi/openapi/api/open_intunifytodo/server_engine/receiveRequestInfo?access_token={token}
Auth:
message.errcode == "200" and data.operResult == "1"Same syscode + flowid + workflowname(workflowcode) + receiver → update; else insert.
Update compares receivets (ms): newer wins.
| isremark | Meaning | SHR SPI |
|---|---|---|
| 0 | 待办 | addMessage |
| 2 | 已办 | addCompletedMessage (task done) |
| 4 | 办结 | Flow end (requestStatus often 3) |
| 8 | 抄送/待阅 | updateMessages |
| -1 | 删除 | removeMessage |
| viewtype | Meaning |
|---|---|
| 0 | 未读 |
| 1 | 已读 |
| Weaver | SHR |
|---|---|
| syscode | e.g. s-HRCloud (后台注册,<=10) |
| flowid | procInstId(不要用 assignId) |
| receiver | 工号 / PERSON_NUMBER 规则 |
| pcurl / appurl | 相对路径 only(禁止 http/https 开头) |
| receivets | 毫秒时间戳,乱序必传 |
Weaver 禁止绝对 URL。SHR 推相对路径,由泛微外链前缀补全域名。
/{weaver.sso.entryPath}?appId={weaver.sso.appId}&redirect={encode(approveAbs)}
Defaults:
weaver.sso.entryPath=/qy/auth/weaver/app.doapproveAbs = shrServerName + path.pc.approve + ?AssignmentId=&billID=Code: WeaverTodoSupport.buildRelativePcUrl + WeaverTodoConfig.
Do not use Unified /qy/auth/app + UA for todo links (PC browser from Weaver fails UA detect).
| File | Scope |
|---|---|
baoye/weaverTodoConfig.properties |
Keep name — Weaver OpenAPI push only |
baoye/dingtalkTodoConfig.properties |
Future — separate credentials + dingtalk.sso.entryPath |
baoye/feishuTodoConfig.properties |
Future |
integration-config-*.json |
SSO OAuth only(kdshrsso),not OpenAPI push secrets |
Do not rename weaverTodoConfig into a mega shared file for BY. Shared ideas: approve path builder + SSO entry template convention; each channel own config + push client.
Hot-reload: WeaverTodoConfig reloads on file mtime (WEAVER_TODO_CONFIG_PATH override optional).
weaver.todo.enabled=true
weaver.openapi.host=http://{e10-host}:{port}
weaver.openapi.authorizePath=/papi/openapi/oauth2/authorize
weaver.openapi.accessTokenPath=/papi/openapi/oauth2/access_token
weaver.openapi.receivePath=/papi/openapi/api/open_intunifytodo/server_engine/receiveRequestInfo
weaver.corpid=
weaver.app_key=
weaver.app_secret=
weaver.syscode=s-HRCloud
weaver.shrServerName=http://{shr-host}:{port}
weaver.sso.appId={integration oauth appId}
weaver.sso.entryPath=/qy/auth/weaver/app.do
weaver.path.pc.approve=/easweb/webviews/workflow/transferApprove.jsp
weaver.wf.delayMs=3000
Package: com.kingdee.eas.custom.weaverTodo
Facade: WeaverMessageWebServiceDao → WeaverTodoMessageServer / ToBeRead path as implemented.
addMessage → isremark=0
addCompletedMessage → isremark=2; flow end → 4
removeMessage → isremark=-1
updateMessages → isremark=8 (+ viewtype)
CallLog: empty requestparams often means exception path (e.g. authorize HTTP 502) — check server logs, not only CallLog.
- [x] OpenAPI token + receiveRequestInfo
- [x] WeaverMessageWebServiceDao + relative pcurl via weaver entryPath
- [x] flowid=procInstId; receivets; sanitize title
- [x] weaver.sso.entryPath configurable
- [ ] 泛微后台:异构系统 / IP 白名单 / 流程类型开关
- [ ] SPI 产品注册 + deploy jar/properties to EAS_HOME
- [ ] E2E: 0→2→4; 待阅; delete -1
- [ ] Compensation via CallLog (optional)
- [ ] 切生产:见项目 docs/integration/go-live-prod.html + skill Go-live
| Item | YHPro | BaoY Weaver E10 |
|---|---|---|
| APIs | Many PORTAL URLs | One receiveRequestInfo (+ oauth) |
| Auth | HTTP Basic | OAuth2 → access_token |
| Links | Absolute HTTPS OK | Relative path only |
| SSO wrap | /shr/api/oAToSHR?redirect= |
/qy/auth/weaver/app.do?appId&redirect= |
| Config | receiveOAConfig | weaverTodoConfig (per platform later) |
*TodoConfig.properties + push client (different API — not Weaver receive)enabled flags — do not overload weaverTodoConfig