feat: collect BPM field evidence and equip ZCode mapping assistant
This commit is contained in:
1 parent
24dbbb74c3
commit
d4070e08f9
30 files changed
+453
-61
No files matched your search
@@ -17,7 +17,7 @@ function validAppDate(value){
|
||||
return value.length===10||Number.isFinite(Date.parse(value.replace(' ','T')));
|
||||
}
|
||||
|
||||
function previewMatch(rules, adapters, input) {
|
||||
function previewMatch(rules, adapters, input, {mappingEvidence=false}={}) {
|
||||
const sample = input && typeof input === 'object' ? input : {};
|
||||
const checks = [], issues = [];
|
||||
const check = (label, ok, detail) => {
|
||||
@@ -27,7 +27,7 @@ function previewMatch(rules, adapters, input) {
|
||||
for (const key of ['connectionId', 'instanceId', 'taskId']) {
|
||||
check('事件身份', scalar(sample[key]) && present(sample[key]), `${key}:${present(sample[key]) ? String(sample[key]) : '缺失'}`);
|
||||
}
|
||||
check('事件来源', sample.source === 'todo', 'source 必须为 todo(待办)');
|
||||
check('事件来源', sample.source === 'todo'||mappingEvidence&&sample.source==='history'&&sample.configurationOnly===true, 'source 必须为 todo(待办);历史证据仅限字段配置检查');
|
||||
check('事件修订', scalar(sample.revision) && present(sample.revision), `revision:${present(sample.revision) ? String(sample.revision) : '缺失'}`);
|
||||
check('接收时间', nonblank(sample.receivedAt) && /T.*(?:Z|[+-]\d{2}:\d{2})$/.test(sample.receivedAt) && Number.isFinite(Date.parse(sample.receivedAt)), 'receivedAt 必须是带时区的有效时间');
|
||||
for (const key of ['processName', 'processVersion', 'nodeName']) {
|
||||
|
||||
Reference in new issue
Block a user