feat: add guarded BPM category and template workflow
Implement server-owned read-only sample checks, category publication, explicit order-version identity and durable PDF/archive/notification steps. Freeze category-bound templates and recipients for isolated scheduled delivery, and require human verification for unknown SMTP outcomes. Add order/batch views and local HTTP/browser/PDF/archive regression coverage. Fix Unicode Windows startup links found by full regression using IShellLinkW. Automatic processing and sending stay disabled; no service deployment. Validation: npm ci; npm test -- --test-concurrency=1 (242 pass, 1 optional ZCode skip, 0 fail); 31 syntax checks; scoped independent code review. Live BPM V13/SMB/163 acceptance remains pending.
This commit is contained in:
1 parent
6e795a99b7
commit
94fc985553
38 files changed
+1204
-131
No files matched your search
@@ -4,6 +4,11 @@ const {BpmScanStore}=require('../src/bpm-scan-store.cjs');
|
||||
const {BpmScanner}=require('../src/bpm-scanner.cjs');
|
||||
const {BpmSessionManager}=require('../src/bpm-session-manager.cjs');
|
||||
const row=(id,date='2026-10-15T16:33:58')=>({taskId:id,serialNum:'SN-'+id,processName:'订单评审',activityName:'知会',startTime:date,processInstanceSubject:'<b>订单号:</b>123 & 456',processInstanceInitiatorShortName:'甲'});
|
||||
test('list summary preserves raw line breaks and explicit detail references only',()=>{
|
||||
const value=normalizeArrival({...row('line'),processInstanceSubject:' 第一行\r\n第二行<br>第三行 ',detailUrl:'https://bpm.skyworthdigital.com/YZSoft/Forms/XForm/PV1.aspx?tid=1&pid=2'},'portal-v4');
|
||||
assert.equal(value.subject,' 第一行\r\n第二行\n第三行 ');assert.match(value.detailUrl,/tid=1&pid=2/);
|
||||
assert.equal(normalizeArrival({...row('no-ref'),pid:'2'},'portal-v4').detailUrl,undefined);
|
||||
});
|
||||
test('arrival uses received time in Shanghai, strips HTML, never substitutes scan time',()=>{
|
||||
const a=normalizeArrival(row('1'),'portal-v4');assert.equal(a.arrivalDay,'2026-10-15');assert.equal(a.arrivedAt,'2026-10-15T08:33:58.000Z');assert.equal(a.subject,'订单号:123 & 456');
|
||||
assert.equal(normalizeArrival(row('2','2026-10-15T18:30:00Z'),'portal-v8').arrivalDay,'2026-10-16');
|
||||
|
||||
Reference in new issue
Block a user