ShtukbaseStandard
集合/base/contours.md

流程轮廓

所有层中记录的状态:每个流程轮廓都有自己的阶段、转换和条件。

页面字段(6)
icon🔁
itemTypeContour
items{mode: type}
writeTo/base/contours
properties{collection: {kind: text,label: 驱动的集合}}
views[{id: contours--table,name: 全部流程轮廓,layout: table,fields: {},sorting: [{propertyId: title,direction: ascending}],properties: [{name: title,visible: true,width: 360},{name: collection,visible: true}]}]

流程轮廓是一类记录的生命周期:状态、它们之间的转换,以及转换的条件。每一层把自己的流程轮廓保存在 <layer>/contours/ 文件夹中;本集合按类型 Contour 把它们全部汇集到一处。流程轮廓通过集合文件本身中一个“阶段”类型的字段来驱动该集合。

由数据计算出的状态(逾期、已完成、结论)永远不是流程轮廓。这些值由程序自行计算,不由人手动设置。

流程轮廓如何编写

流程轮廓是页面 <layer>/contours/<name>.md;它的阶段是同名文件夹 <layer>/contours/<name>/<phase>.md 中的页面。阶段名就是去掉 .md 的文件名;记录状态字段中填写的正是这个名称。

# /research/contours/hypotheses.md
type: Contour
title: 假设
collection: /research/hypotheses        # 驱动哪个集合
stageField: status                      # 记录中的状态字段
entry: /research/contours/hypotheses/proposed
phases:
  - /research/contours/hypotheses/proposed
  - /research/contours/hypotheses/checking
  - /research/contours/hypotheses/paused
# /research/contours/hypotheses/paused.md
type: Phase
title: 暂停
category: dropped                       # arriving · working · done · dropped
doneWhen: "已决定是否回到这个假设"
next:
  - {to: /research/contours/hypotheses/proposed, gate: person}

在集合中,状态字段属于“阶段”类型,并指明流程轮廓:status: {kind: phase, contour: /research/contours/hypotheses}。阶段的出口(next)即允许的转换;最后一个阶段为 next: []。带有 fromAnywhere: true 的阶段可以接收来自任何阶段的记录。转换的条件及由谁执行,写在流程轮廓正文的“从、到、条件”表格中。

规范的执行器(enforcer)

规范含义执行器(检查)
CNT-R01记录的状态是其流程轮廓的阶段states
CNT-R02流程轮廓是完整连接的:集合存在,阶段存在,入口和出口都是该流程轮廓的阶段contour
CNT-R03记录只能通过允许的转换改变状态moves
包 流程轮廓 会把此页面放在 /base/contours.md。源文本