Solon v3.8.3

场景1: 工作流审批编排(参考)

</> markdown
2026年1月13日 下午7:04:56

效果与 Flowable 类似(数据库和界面需要自己定制)

1、图配置示例

  • 请假审批
# demo.yml
id: "d1"
title: "请假审批"
layout:
  - { id: "s", type: "start", title: "发起人", meta: {role: "employee"}, link: "n1"}
  - { id: "n1", type: "activity", title: "主管批", meta: {role: "tl"}, link: "g1"}
  - { id: "g1", type: "exclusive", link:[
      {nextId: "e"},
      {nextId: "n2", title: "3天以上", when: "day>=3"}]}
  - { id: "n2", type: "activity", title: "部门经理批", meta: {role: "dm"}, link: "g2"}
  - { id: "g2", type: "exclusive", link:[
      {nextId: "e"},
      {nextId: "n3", title: "7天以上", when: "day>=7"}]}
  - { id: "n3", type: "activity", title: "副总批", meta: {role: "vp"}, link: "e"}
  - { id: "e", type: "end"}


# tl: team leader; dm: department manager; vp: vice-president

描述:员工发起请假;团队主管审批;如果超过3天的,部分经理再批;如果超过7天的,副总再批。

  • 合同审批(条件会签)
# demo.yml
id: "d1"
title: "合同审批(条件会签)"
layout:
  - { id: "s", type: "start", title: "发起人", meta: {role: "employee"}, link: "n1"}
  - { id: "n1", type: "activity", title: "主管批", meta: {role: "tl"}, link: "g1-s"}
  - { id: "g1-s", type: "inclusive", title: "会签" , link:[
      {nextId: "n2", title: "10万以上", when: "amount>=100000"},
      {nextId: "n3", title: "50万以上", when: "amount>=500000"},
      {nextId: "n4", title: "90万以上", when: "amount>=900000"}]}
  - { id: "n2", type: "activity", title: "本部门经理批", meta: {role: "dm"}, link: "g1-e"}
  - { id: "n3", type: "activity", title: "生产部经理批", meta: {role: "dm"}, link: "g1-e"}
  - { id: "n4", type: "activity", title: "财务部经理批", meta: {role: "dm"}, link: "g1-e"}
  - { id: "g1-e", type: "inclusive", link: "e"}
  - { id: "e", type: "end"}


# tl: team leader; dm: department manager; vp: vice-president

描述:商务人员发起合同审批;超过10万的本部分经理要会签通过;超过50万要求生产部门会签通过;超过90万要求财务会签通过。

  • 合同审批(无条件会签)
# demo.yml
id: "d1"
title: "合同审批(无条件会签)"
layout:
  - { id: "s", type: "start", title: "发起人", meta: {role: "biz"}, link: "n1"}
  - { id: "n1", type: "activity", title: "主管批", meta: {role: "tl"}, link: "g1-s"}
  - { id: "g1-s", type: "parallel", title: "会签" , link:[
      {nextId: "n2"},
      {nextId: "n3"},
      {nextId: "n4"}]}
  - { id: "n2", type: "activity", title: "本部门经理批", meta: {role: "dm"}, link: "g1-e"}
  - { id: "n3", type: "activity", title: "生产部经理批", meta: {role: "dm"}, link: "g1-e"}
  - { id: "n4", type: "activity", title: "财务部经理批", meta: {role: "dm"}, link: "g1-e"}
  - { id: "g1-e", type: "parallel", meta: {cc: "vp"}, link: "e"}
  - { id: "e", type: "end"}


# tl: team leader; dm: department manager; vp: vice-president; cc: Carbon Copy

描述:商务人员发起合同审批,本部门经理、生产部经理、财务部经理,都要会签通过。

  • 决议投票
# demo.yml
id: "d1"
title: "决议投票"
layout:
  - { id: "s", type: "start", title: "发起人", meta: {role: "biz"}, link: "n1"}
  - { id: "n1", type: "activity", title: "主管核查", meta: {role: "tl"}, link: "g1-s"}
  - { id: "g1-s", type: "parallel", title: "投票", meta: {timeout: "7d", default: "false"}, link:[
      {nextId: "n2"},
      {nextId: "n3"},
      {nextId: "n4"}]}
  - { id: "n2", type: "activity", title: "本部门经投票", meta: {role: "dm"}, link: "g1-e"}
  - { id: "n3", type: "activity", title: "生产部经投票", meta: {role: "dm"}, link: "g1-e"}
  - { id: "n4", type: "activity", title: "财务部经投票", meta: {role: "dm"}, link: "g1-e"}
  - { id: "g1-e", type: "parallel", link: "n5"}
  - { id: "n5", type: "activity", title: "结果通知", meta: {cc: "vp"}, link: "e"}
  - { id: "e", type: "end"}


# tl: team leader; dm: department manager; vp: vice-president; cc: Carbon Copy

描述:商务人员发起项目方案投票;主管复核资料正确性;然后开始投票(如果7天内没票,算“否”);投票结束后,通知各方。