eyes4 1e32796c2e feature: | 4 luni în urmă | |
---|---|---|
.. | ||
bpmn | 4 luni în urmă | |
src | 4 luni în urmă | |
config.json | 4 luni în urmă | |
config_dev.json | 4 luni în urmă | |
config_test.json | 6 luni în urmă | |
deploy.sh | 6 luni în urmă | |
jest.config.js | 8 luni în urmă | |
package.json | 4 luni în urmă | |
readme.md | 5 luni în urmă | |
tsconfig.json | 8 luni în urmă | |
webpack.config.js | 8 luni în urmă |
要正确打包,需要将node_modules/bpmn-engine/index.js
中的
const BpmnModdle = require('bpmn-moddle');
改为:
const BpmnModdle = require('bpmn-moddle').default;
在 bpmn-elements/dist/tasks/LoopCharacteristics.js from line 169:
ParallelLoopCharacteristics.prototype._onCompleteMessage = function onCompleteMessage(routingKey, message) {
const chr = this.characteristics;
const {
content
} = message;
if (content.output !== undefined) chr.output[content.index] = content.output;
if (routingKey === 'execute.discard') {
this.discarded++;
}
this.running--;
this.activity.broker.publish('execution', 'execute.iteration.completed', {
...content,
...chr.getContent(),
index: this.index, // >>>>>>> 这行要删除
running: this.running,
discarded: this.discarded,
output: chr.output,
state: 'iteration.completed',
preventComplete: true
});
立项申请
{
"type": "object",
"title": "条件",
"required": [
"memo"
],
"ui:order": [
"memo",
"files"
],
"properties": {
"memo": {
"type": "string",
"title": "立项申请理由",
"format": "textarea",
"minRows": 10,
"description": "请输入立项申请的相关说明"
},
"files": {
"type": "upload",
"title": "立项文件",
"ui:options": {
"type": "upload",
"accept": ".doc,.docx,application/msword",
"limitCount": 1
},
"description": "上传立项相关文件,如可行性报告等"
}
}
}
立项审核
{
"type": "object",
"title": "条件",
"required": [
"pass"
],
"ui:order": [
"memo",
"files",
"pass",
"opinion"
],
"properties": {
"memo": {
"type": "string",
"title": "申请理由",
"format": "textarea",
"default": "${environment.output.task_request.memo}",
"readonly": true
},
"files": {
"type": "download",
"title": "立项文件",
"default": ${JSON.stringify(environment.output.task_request.files)}
},
"pass": {
"type": "boolean",
"title": "是否通过审核?",
"default": false
},
"opinion": {
"type": "string",
"title": "审核意见",
"format": "textarea",
"default": "",
"minRows": 6,
"minLength": 10,
"ui:options": {
"rows": 10,
"type": "textarea"
}
}
}
}
选择审核方式
{
"type": "object",
"title": "选择审核方式",
"required": [],
"ui:order": [
"check_type"
],
"properties": {
"check_type": {
"enum": [
1,
2
],
"type": "integer",
"title": "审核方式",
"enumNames": [
"顺序审核",
"并行审核"
],
"description": "审核方式,目前是并行和串行"
}
}
}
任务审核
{
"type": "object",
"title": "条件",
"required": [
"pass"
],
"ui:order": [
"pass",
"opinion",
"annotated_draft"
],
"properties": {
"pass": {
"type": "boolean",
"title": "是否通过?",
"default": false
},
"opinion": {
"type": "upload",
"title": "审核意见",
"ui:options": {
"type": "upload",
"accept": ".doc,.docx,application/msword",
"limitCount": 1
}
},
"annotated_draft": {
"type": "upload",
"title": "批注稿",
"ui:options": {
"type": "upload",
"accept": ".doc,.docx,application/msword",
"limitCount": 1
}
}
}
}
运行过程中,内部js的环境:environment
{
"output": {
"task_request_task": {
"id": "task_request_task",
"executionId": "task_request_task_8b0c71a536",
"user_id": "admin",
"check_type": 1 //>>>>>>>>>>>这里是表单提交的内容
}
},
"variables": {
"prj_id": "63f331ea0f400000",
"owner": "admin",
"task_id": "63f3321769400000",
"fields": {
"routingKey": "run.execute",
"exchange": "run",
"consumerTag": "_process-run"
},
"content": {
"id": "ProcessOutcomeApprove",
"type": "bpmn:Process",
"name": "立项审批流程",
"executionId": "ProcessOutcomeApprove_ab7febc2ca",
"parent": {
"id": "sample-diagram",
"type": "bpmn:Definitions"
}
},
"properties": {
"messageId": "smq.mid-2a55e1a76c",
"timestamp": 1717127830563
},
"check_type": 1
}
}