feat: process BPM notification tasks with verified readonly forms
This commit is contained in:
1 parent
94fc985553
commit
a9d050d87a
28 files changed
+879
-34
No files matched your search
@@ -9,7 +9,7 @@ const arrival={source:'portal-v4',taskId:'task-plan-1',processName:'海外运营
|
||||
const rule={id:'rule-plan',enabled:true,processName:'海外运营订单评审',nodeName:'订单专员(生效)',productLine:'海外运营',templateId:'tpl-overseas',adapters:{V13:{orderNo:'order',serialNo:'serial',productCode:'product',modelFull:'full',modelShort:'short',customer:'customer',brief:{source:'arrival',path:'subject'}}}};
|
||||
const detail={tid:'100001',pid:'900001',processVersion:'V13',processInstanceId:'900001',businessVersion:'BV-1',nodeName:'订单专员(生效)',fields:{order:'000123',serial:'SERIAL-EXAMPLE',product:'MODEL-EXAMPLE-001',full:'MODEL-EXAMPLE-001',short:'MODEL-EXAMPLE',customer:'示例客户'},processSteps:[{name:'订单专员(生效)',status:'处理中'}]};
|
||||
|
||||
test('order version requires tid pid current order number and explicit business version',()=>{
|
||||
test('order identity retains tid pid current order number and reports upstream revision only when present',()=>{
|
||||
const workflow=new OrderWorkflow();publish(workflow,rule,arrival,detail);
|
||||
const result=workflow.identify({arrival,detail});
|
||||
assert.equal(result.order.tid,'100001');
|
||||
@@ -17,7 +17,7 @@ test('order version requires tid pid current order number and explicit business
|
||||
assert.equal(result.order.businessVersion,'BV-1');
|
||||
assert.equal(result.order.brief,'列表摘要原文');
|
||||
assert.equal(result.order.businessTimeSource,'list.receivedAt');
|
||||
for(const key of ['tid','pid','businessVersion']){
|
||||
for(const key of ['tid','pid']){
|
||||
const missing={...detail};delete missing[key];
|
||||
assert.throws(()=>workflow.identify({arrival,detail:missing}),error=>error.code==='VERSION_MISSING');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user