eyes4 1e32796c2e feature: 4 ヶ月 前
..
bpmn 1e32796c2e feature: 4 ヶ月 前
src 1e32796c2e feature: 4 ヶ月 前
config.json 1e32796c2e feature: 4 ヶ月 前
config_dev.json 1e32796c2e feature: 4 ヶ月 前
config_test.json eda8b50579 feature: 立项流程完整调通,完成任务提交接口,立项流程BPMN简化 6 ヶ月 前
deploy.sh 0d635e72ef feature: 完成任务计划变更流程 6 ヶ月 前
jest.config.js 7c08e882e8 new: 完成几个主要服务的框架搭建 8 ヶ月 前
package.json 1e32796c2e feature: 4 ヶ月 前
readme.md 9fe40fc5ff 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 
    }
}