eyes4 7097f608e1 bug_fix: преди 5 месеца
..
bpmn 6623b01a7f bug_fix: преди 5 месеца
src 7097f608e1 bug_fix: преди 5 месеца
config.json 8e6cfecf77 add: 添加了项目管理部分接口 преди 8 месеца
config_dev.json 7c08e882e8 new: 完成几个主要服务的框架搭建 преди 8 месеца
config_test.json eda8b50579 feature: 立项流程完整调通,完成任务提交接口,立项流程BPMN简化 преди 6 месеца
deploy.sh 0d635e72ef feature: 完成任务计划变更流程 преди 6 месеца
jest.config.js 7c08e882e8 new: 完成几个主要服务的框架搭建 преди 8 месеца
package.json 74cfadf8df feature: 添加项目时,审核人作为必选字段,必须填写。 преди 6 месеца
readme.md 69c4d78c28 feature: 完成所有审核流程 преди 5 месеца
tsconfig.json 7c08e882e8 new: 完成几个主要服务的框架搭建 преди 8 месеца
webpack.config.js 8e6cfecf77 add: 添加了项目管理部分接口 преди 8 месеца

readme.md

要正确打包,需要将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
    }
}