@openbkn/workshop 0.2.2-rc.5 → 0.2.2-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -8
- package/component.d.ts +10 -0
- package/dist/ActionConfirm-DJ91X3ml.js +236 -0
- package/dist/ActionFailure-ZgPt_3B-.js +37 -0
- package/dist/AgentChat-CRYai8ge.js +1062 -0
- package/dist/AppFormModal-D73ucaHK.js +4282 -0
- package/dist/AppListPage-D87piiOw.js +1364 -0
- package/dist/AskDrawer-BUMYsRnt.js +38 -0
- package/dist/ComputedView-CgYrDbx1.js +3221 -0
- package/dist/ConclusionApply-sjGfoEBY.js +153 -0
- package/dist/CypherEditor-lus6FA5L.js +485 -0
- package/dist/LandingList-6JI6864C.js +230 -0
- package/dist/MenuUnfoldOutlined-Cdg24l2h.js +27 -0
- package/dist/ModelTrial-ClHFGTpQ.js +359 -0
- package/dist/PageRenderer-DBd_g6mN.js +85480 -0
- package/dist/README-DjRyTQSR.js +76 -0
- package/dist/ScenarioApply-DtW_hh47.js +590 -0
- package/dist/SimulateForm-C-i08Jjd.js +153 -0
- package/dist/Subgraph-CnrkH9AN.js +32586 -0
- package/dist/WorkshopLabPage-DiVXQL9e.js +11364 -0
- package/dist/WorkshopRunPage-6hjRUf64.js +253 -0
- package/dist/abnfDiagram-WEYOIA3C-beRNhN3c.js +87 -0
- package/dist/action-type-tool.service-B2B74fKC.js +1060 -0
- package/dist/actionButton-DA5CNEzx.js +94 -0
- package/dist/actionButton.en-US-qjeqA7hs.js +94 -0
- package/dist/agentChat-EoDznd58.js +116 -0
- package/dist/agentChat.en-US-B6-pFd9Y.js +116 -0
- package/dist/alertList-DqditwM8.js +84 -0
- package/dist/alertList.en-US-BAXAgltP.js +84 -0
- package/dist/architectureDiagram-ZHVYKT53-DY2l1qxx.js +4779 -0
- package/dist/asOfSlider-QPvHWUMV.js +83 -0
- package/dist/asOfSlider.en-US-BI4jVfSn.js +83 -0
- package/dist/bkn-agent-execution.service-DVh-SHyl.js +205 -0
- package/dist/blockDiagram-RJAE7QA3-DR0mjN2h.js +1435 -0
- package/dist/c4Diagram-XDPPPE54-DH5zsGug.js +1518 -0
- package/dist/channel-B034hcOF.js +5 -0
- package/dist/china-C6m7zXIv.js +9 -0
- package/dist/chunk-2E7WHVMD-Ba3svxgx.js +664 -0
- package/dist/chunk-2Q5K7J3B-rT4eU6_y.js +15 -0
- package/dist/chunk-4EMNKR2T-C1kQZYHK.js +262 -0
- package/dist/chunk-55XCU76K-dcpLOktb.js +68 -0
- package/dist/chunk-5VM5RSS4-BdpQuzmO.js +19 -0
- package/dist/chunk-JWPE2WC7-CDBrSjU7.js +8 -0
- package/dist/chunk-VQ5W62QI-BiVKc40w.js +19 -0
- package/dist/chunk-XXDRQBXY-CPYrcdVW.js +8 -0
- package/dist/chunk-ZCHMQSOR-BG8OLpvb.js +451 -0
- package/dist/classDiagram-v2-4MYWR3UA-DqbpQpwI.js +1564 -0
- package/dist/component.d-DFoMKuUv.js +179 -0
- package/dist/cose-bilkent-JH36ORCC-CdXk4sPf.js +2609 -0
- package/dist/customComponents-DasaZ6pq.js +4 -0
- package/dist/customComponents.en-US-CkabuCXg.js +79 -0
- package/dist/customParseFormat-C0uLEpdq.js +182 -0
- package/dist/cynefin-EF2NZ3EQ-D7MVnMHu.js +21746 -0
- package/dist/cynefinDiagram-WF24UDRP-BYT_KpDL.js +299 -0
- package/dist/cytoscape.esm-BCV9V6aO.js +18760 -0
- package/dist/d3-scale-DA8IHmf0.js +1841 -0
- package/dist/dagre-NK4GIZVX-l-ghPdM8.js +2154 -0
- package/dist/dateRange-BbkLMg8L.js +79 -0
- package/dist/dateRange.en-US-CV12Q02G.js +79 -0
- package/dist/dayjs.min-DZ-YV8Mv.js +284 -0
- package/dist/diagram-CBK3MWTC-Bt3HiwvA.js +542 -0
- package/dist/diagram-I5XIIV2D-DcbqfBjx.js +150 -0
- package/dist/diagram-ODIL2UCW-9PC1n3n5.js +346 -0
- package/dist/diagram-PFBEJUXE-DGhr2kc7.js +478 -0
- package/dist/diagram-RJA3I4VV-DwzpOjZ_.js +219 -0
- package/dist/diagram-TYUNFSNR-B3Bd3TDU.js +2583 -0
- package/dist/dropdownFilter-DOi_8-ZT.js +76 -0
- package/dist/dropdownFilter.en-US-BiXpvXtF.js +76 -0
- package/dist/ebnfDiagram-V4P3TTPT-E5NN2oKc.js +109 -0
- package/dist/elk-QONTBCTQ-dFjcujl_.js +49170 -0
- package/dist/erDiagram-KYQIGQAA-BMrasBzB.js +1061 -0
- package/dist/eventList-CnsAwfDS.js +115 -0
- package/dist/eventList.en-US-Cof3rCLq.js +115 -0
- package/dist/eventReport-XS-HegnH.js +76 -0
- package/dist/eventReport.en-US-DTx4vzWT.js +76 -0
- package/dist/flowDiagram-IUGLLWBU-BGIBH0q0.js +1769 -0
- package/dist/ganttChart-DEeSvTJA.js +77 -0
- package/dist/ganttChart.en-US-SwRKrnoD.js +77 -0
- package/dist/ganttDiagram-R7GPNTJY-C0tb1Lpp.js +1741 -0
- package/dist/generateCypher-Ch9_lQa6.js +399 -0
- package/dist/gitGraphDiagram-PDYL7XHY-DBqcOa-c.js +815 -0
- package/dist/graph-CKJmgLki.js +1541 -0
- package/dist/index-BA-GzCXt.js +441 -0
- package/dist/infoDiagram-MVDRKAX5-Bwuki4JA.js +24 -0
- package/dist/ishikawaDiagram-HPEHV2GE-Dz4d6ygx.js +622 -0
- package/dist/journeyDiagram-BOSHW7O7-C99m34Bb.js +834 -0
- package/dist/kanban-definition-FNSA4HC5-mdqjODsT.js +724 -0
- package/dist/katex-BsrBVQKd.js +11314 -0
- package/dist/manifest-BjV1PJ6u.js +41 -0
- package/dist/mermaid.core-yQghUlIz.js +17642 -0
- package/dist/metricCards-CSb-_cT2.js +104 -0
- package/dist/metricCards.en-US-BLLhRsQU.js +104 -0
- package/dist/mindmap-definition-6OY57UG3-BZhO2wX4.js +834 -0
- package/dist/modelTrial-Bvb-RhGt.js +137 -0
- package/dist/modelTrial.en-US-DYcuor-G.js +137 -0
- package/dist/models-DekiCOuZ.js +6 -0
- package/dist/object-metric-numeric-vs3BeDkH.js +42 -0
- package/dist/object-metric.service-flZgBMRX.js +233 -0
- package/dist/objectDetail-SQUbp4Py.js +117 -0
- package/dist/objectDetail.en-US-DW3mlONM.js +117 -0
- package/dist/objectList-D99wPtJH.js +97 -0
- package/dist/objectList.en-US-PBBNyVLW.js +97 -0
- package/dist/objectTable-0jsFFMN3.js +127 -0
- package/dist/objectTable.en-US-yWEs8qc_.js +127 -0
- package/dist/pegDiagram-ECIUJNBX-BDa5RfZt.js +95 -0
- package/dist/pieDiagram-GNMPY74T-DNVtzXPv.js +165 -0
- package/dist/pivotTable-CHmQw18-.js +102 -0
- package/dist/pivotTable.en-US-B4uv4P08.js +102 -0
- package/dist/prompt-DYrjlEFr.js +373 -0
- package/dist/quadrantDiagram-D57K4MC3-vK0f2OvQ.js +1023 -0
- package/dist/railroadDiagram-Y72NRBL7-j6ZrTmRp.js +77 -0
- package/dist/regionMap-Cme-JyV_.js +128 -0
- package/dist/regionMap.en-US-Bwr2_p32.js +128 -0
- package/dist/requirementDiagram-EQYSW5RA-DgfEyljA.js +886 -0
- package/dist/sankeyDiagram-SY24JHO5-CImx-IX0.js +1160 -0
- package/dist/scenarioBar-BV43p7n-.js +122 -0
- package/dist/scenarioBar.en-US-5KqMQ2Bg.js +122 -0
- package/dist/scheduleGantt-CTYO-zYP.js +180 -0
- package/dist/scheduleGantt.en-US-hE7mvVUW.js +180 -0
- package/dist/searchBox-Ca7w0f_6.js +67 -0
- package/dist/searchBox.en-US-ArS_XBvB.js +67 -0
- package/dist/segmentedFilter-MhjVcWo0.js +80 -0
- package/dist/segmentedFilter.en-US-BxNrQO5T.js +80 -0
- package/dist/sequenceDiagram-BLEHNHQU-nWmjd1ci.js +2969 -0
- package/dist/sizeCapture-INFHLROL-D3jlbt7h.js +46 -0
- package/dist/stageChain-BxBafwjD.js +74 -0
- package/dist/stageChain.en-US-CP0G27n8.js +74 -0
- package/dist/stateDiagram-v2-A6IESKWZ-DG1ZetEu.js +1514 -0
- package/dist/subgraph-7n4SwliR.js +71 -0
- package/dist/subgraph.en-US-BNvY18IW.js +71 -0
- package/dist/swimlanes-B3ENRKFQ-cCmJE8AU.js +4991 -0
- package/dist/swimlanesDiagram-AYQRV4AK-CtuhyguU.js +14 -0
- package/dist/taskInbox-DGWYeI2b.js +118 -0
- package/dist/taskInbox.en-US-B-OzDmVl.js +118 -0
- package/dist/text-BqSVQKS6.js +78 -0
- package/dist/text.en-US-BhAxy_LE.js +78 -0
- package/dist/timeline-definition-JXYKGLGB-Cc-INsOv.js +1057 -0
- package/dist/trendChart-BjEeRS5_.js +135 -0
- package/dist/trendChart.en-US-BBGqWUKM.js +135 -0
- package/dist/useLabData-Df-jEHKs.js +20470 -0
- package/dist/usecaseDiagram-WPOLBNNX-r8wVjopm.js +7920 -0
- package/dist/vennDiagram-Q3Y3IDCW-BZiOcgrj.js +1579 -0
- package/dist/wardleyDiagram-IVAIDKWA-16jd07C_.js +675 -0
- package/dist/workshop-app-DnHNjBqy.js +86038 -0
- package/dist/workshop-app.css +1 -0
- package/dist/workshop-app.js +4 -0
- package/dist/world-Djau1JyJ.js +9 -0
- package/dist/xychartDiagram-4URNHDU4-C8DwWQNh.js +1460 -0
- package/dist-cli/workshop.js +340 -217
- package/example/host.js +109 -0
- package/example/index.html +93 -0
- package/example/server.mjs +237 -0
- package/index.d.ts +48 -0
- package/lib/validate.js +47 -1
- package/package.json +17 -5
- package/runtime/frame-runtime.js +13 -1
- package/workshop-component.js +32 -12
- package/workshop.js +2 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
const n = `# 事件列表(eventList)
|
|
2
|
+
|
|
3
|
+
列出应用处理的业务事件,未关闭的在前、按严重程度排,由人核实、驳回、关闭,并从事件进入分析。用来做“哪些事要先看、是不是真的、要不要处理”的决策。
|
|
4
|
+
|
|
5
|
+
## 适用与不适用
|
|
6
|
+
|
|
7
|
+
- 适用:事件由知识网络里的规则命中产生,或由人登记,需要有人逐条看、核实或驳回。例如订单交付风险、设备异常、质量投诉。
|
|
8
|
+
- 不适用:
|
|
9
|
+
- 要让用户登记一条新事件:用事件登记(\`eventReport\`)。
|
|
10
|
+
- 只想按条件列出命中的对象,不要事件的核实与处理过程:用告警(\`alertList\`)。
|
|
11
|
+
- 只看数量与趋势:用指标卡组(\`metricCards\`)或图表(\`trendChart\`)。
|
|
12
|
+
|
|
13
|
+
## 本体契约
|
|
14
|
+
|
|
15
|
+
事件类型在知识网络里建模,每种事件一个事件类,同一网络上的应用共用。应用在构建器的“事件”页签里按编码选出自己处理的类型,并设置怎样处理。
|
|
16
|
+
|
|
17
|
+
| 角色 | 对象类要求 | 必要的属性 | 关系 | 必填 |
|
|
18
|
+
| --- | --- | --- | --- | --- |
|
|
19
|
+
| 事件类型 | 知识网络里的事件类型及其事件类;来源为“规则命中”或“用户登记” | 编码、名称、来源、严重程度(P1 到 P4);规则类型需要规则工具 | — | 是 |
|
|
20
|
+
| 事件关联的对象 | 事件所说的那类对象:订单、设备、客户 | 名称 | 事件 → 对象 | 否:没有时只显示事件标题 |
|
|
21
|
+
| 对象的数据源 | 应用里这类对象的全量数据源 | — | — | 否:点事件选中对象、登记时选对象、任务的行动都要它 |
|
|
22
|
+
|
|
23
|
+
应用里每个事件类型另有这些设置(在“事件”页签配置,不在组件上):负责角色、处理时限(小时)、分析视图、任务归并方式、处理方案、登记表单。
|
|
24
|
+
|
|
25
|
+
## 组件内置的判断
|
|
26
|
+
|
|
27
|
+
与行业无关,组件自己做:
|
|
28
|
+
|
|
29
|
+
| 判断 | 规则 |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| 排序 | 未关闭在前;再按严重程度 P1、P2、P3、P4;再按发生时间由新到旧 |
|
|
32
|
+
| 已超时 | 未关闭的事件,发生后已超过该事件类型设置的处理时限 |
|
|
33
|
+
| 无法判断 | 规则最近一次检查没能得出结论的事件,标“无法判断” |
|
|
34
|
+
| 重复 | 合并窗口内同一对象再次登记的事件,标“重复”,并说明合并到哪条 |
|
|
35
|
+
|
|
36
|
+
事件产生、检查结果、状态是否允许某个操作,都由平台与知识网络决定;组件只显示平台允许的操作。
|
|
37
|
+
|
|
38
|
+
## 扩展点
|
|
39
|
+
|
|
40
|
+
### 规则工具(规则类事件类型)
|
|
41
|
+
|
|
42
|
+
- **用途**:判断什么算一次事件,例如订单有交付风险、设备温度越界。
|
|
43
|
+
- **在哪里配**:知识网络里该事件类型的事件类,规则工具与检查时间在那里设置;本组件不配。
|
|
44
|
+
- **接什么**:执行工厂中的规则工具,通常是函数工具,在函数里读知识网络。
|
|
45
|
+
- **输入与输出**:由知识网络的事件模块规定,本组件不读取,也不重复规定。
|
|
46
|
+
- **失败与超时**:没有规则工具的规则类型,平台不检查,组件显示“没有规则工具,平台不检查”。检查没能得出结论时,显示最近检查时间与原因,对应事件标“无法判断”。
|
|
47
|
+
- **结果怎样显示**:命中产生事件,出现在列表里;组件头部按类型显示“最近检查时间,命中几个”和“下次检查时间”。有权修改知识网络的用户可以点“立即检查”。
|
|
48
|
+
|
|
49
|
+
### 分析视图
|
|
50
|
+
|
|
51
|
+
- **用途**:从一条事件进入分析页面,看影响范围、原因。
|
|
52
|
+
- **在哪里配**:“事件”页签里该事件类型的“分析视图”:打开的页面、选中关联对象的筛选、是否把基准日期设为发生日、时间窗口(发生日前后若干天,1 到 365)。
|
|
53
|
+
- **接什么**:应用里的另一个页面,页面上的组件按这些筛选显示。
|
|
54
|
+
- **输入**:事件关联的对象、发生日、前后天数,写入所配的筛选。
|
|
55
|
+
- **输出**:无;只是设置页面的筛选并打开页面。
|
|
56
|
+
- **失败与超时**:无。
|
|
57
|
+
- **结果怎样显示**:配了分析视图的事件有“分析”按钮。基准日期设为发生日只是按那天重新计算当前数据,不能还原事件发生时的状态。
|
|
58
|
+
|
|
59
|
+
## 交互与联动
|
|
60
|
+
|
|
61
|
+
- **写入**:点事件上的对象名,把该对象写入“点击事件选中”所配的选中对象筛选,其他组件随之显示。只有该筛选的对象类与事件关联的对象类一致,对象名才可点。点“分析”会写入分析视图所配的筛选并切到分析页面。
|
|
62
|
+
- **读取**:不跟随页面筛选;显示什么只由“显示的事件类型”和右上角“未关闭 / 全部”决定。
|
|
63
|
+
- **事件操作**:平台允许时,事件上显示“核实”“驳回”“关闭”“重新打开”(哪个状态可做哪个操作,以平台给出的为准)。驳回、关闭、重新打开要先写原因,原因不超过 200 字,记入事件历史。关闭只标记事件已处理,不执行处理方案或行动。状态已是“已关闭”的事件不再显示“关闭”。
|
|
64
|
+
- **刷新**:每 30 秒读取一次;同一应用在其他浏览器标签页里的改动会同步过来。
|
|
65
|
+
|
|
66
|
+
## 场景配方
|
|
67
|
+
|
|
68
|
+
### 订单交付风险:哪些订单可能交不出去
|
|
69
|
+
|
|
70
|
+
| 角色 | 对应 |
|
|
71
|
+
| --- | --- |
|
|
72
|
+
| 事件类型 | “订单交付风险”,规则命中 |
|
|
73
|
+
| 事件关联的对象 | 销售订单(名称、客户、交货日期) |
|
|
74
|
+
| 分析视图 | 订单分析页,选中订单,基准日期设为发生日,前后 7 天 |
|
|
75
|
+
|
|
76
|
+
**知识网络中要有:**
|
|
77
|
+
|
|
78
|
+
- 订单交付风险事件类,严重程度按业务设定;规则工具“交付风险检查”:读订单、工单、物料齐套,返回有风险的订单与原因。
|
|
79
|
+
- 订单对象类,且应用里有订单的数据源。
|
|
80
|
+
|
|
81
|
+
**检查项:** 规则命中后列表出现事件,头部显示最近检查时间;点订单名,订单分析页的对象详情随之切换;点“分析”打开订单分析页;超过处理时限的事件标“已超时”。
|
|
82
|
+
|
|
83
|
+
### 现场异常登记后的核实
|
|
84
|
+
|
|
85
|
+
| 角色 | 对应 |
|
|
86
|
+
| --- | --- |
|
|
87
|
+
| 事件类型 | “设备异常”,用户登记 |
|
|
88
|
+
| 事件关联的对象 | 设备 |
|
|
89
|
+
|
|
90
|
+
**知识网络中要有:** 设备异常事件类(来源为用户登记)、设备对象类。登记表单与核实角色在“事件”页签配置。
|
|
91
|
+
|
|
92
|
+
**检查项:** 用事件登记(\`eventReport\`)登一条,列表里显示“待核实”;有权限的人核实后状态变为“已核实”;驳回时必须写原因。
|
|
93
|
+
|
|
94
|
+
## 给 AI 的指引
|
|
95
|
+
|
|
96
|
+
1. 先问用户:处理哪几类事件,是规则命中还是人登记,事件是关于哪类对象,要不要从事件进入分析页。
|
|
97
|
+
2. 事件类型必须已在知识网络里存在。不存在时列出要建的事件类型与事件类,不要在应用里造类型。
|
|
98
|
+
3. 要点事件选中对象,先确认有一个同一对象类的“选中对象”筛选;没有就先建。对象类对不上时,配置会报错,应换筛选,或只显示关联对象相同的事件类型。
|
|
99
|
+
4. 应用里没有该对象类的数据源时,先建数据源,否则选中对象、登记、任务行动都不可用。
|
|
100
|
+
5. 常见错误:
|
|
101
|
+
- 把事件类型的名称、来源、严重程度、规则写进应用。这些在知识网络里设置,应用只选编码并配置处理方式。
|
|
102
|
+
- 以为列表会自己重新判断规则。规则由平台按检查时间执行,组件只显示结果。
|
|
103
|
+
- 把“关闭”当成执行处理:关闭只做标记,处理与行动在任务里。
|
|
104
|
+
- “显示的事件类型”不选就是全部类型,不是没有。
|
|
105
|
+
|
|
106
|
+
## 限制
|
|
107
|
+
|
|
108
|
+
- 最多显示条数 5 到 100,默认 20,超出的只显示“还有几条”。
|
|
109
|
+
- 驳回、关闭、重新打开的原因不超过 200 字。
|
|
110
|
+
- 知识网络里没有某个已选的事件类型时,列表提示该类型的事件进不来。
|
|
111
|
+
- 应用至少要选一个事件类型;没有时组件提示先到“事件”页签选择。
|
|
112
|
+
`;
|
|
113
|
+
export {
|
|
114
|
+
n as default
|
|
115
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
const e = `# Event list (eventList)
|
|
2
|
+
|
|
3
|
+
Lists the business events the app handles, open ones first and by severity, so people can verify, reject or close them and move on to analysis. Use it to decide which events to look at first, whether they are real, and whether they need handling.
|
|
4
|
+
|
|
5
|
+
## When to use it and when not
|
|
6
|
+
|
|
7
|
+
- Use it when events come from rule hits on the knowledge network or are reported by people, and someone needs to go through them one by one and verify or reject them. For example: order delivery risk, equipment anomalies, quality complaints.
|
|
8
|
+
- Do not use it:
|
|
9
|
+
- To let users report a new event: use the event report (\`eventReport\`).
|
|
10
|
+
- To list objects that match conditions without the verify and handle steps of events: use alerts (\`alertList\`).
|
|
11
|
+
- To see only counts and trends: use metric cards (\`metricCards\`) or the chart (\`trendChart\`).
|
|
12
|
+
|
|
13
|
+
## Ontology contract
|
|
14
|
+
|
|
15
|
+
Event types are modeled on the knowledge network, one event class per type, shared by every app on that network. The app picks the types it handles by code on the builder's "Events" tab and sets how to handle them.
|
|
16
|
+
|
|
17
|
+
| Role | Object type | Required properties | Relations | Required |
|
|
18
|
+
| --- | --- | --- | --- | --- |
|
|
19
|
+
| Event type | An event type of the network with its event class; source is "rule hit" or "reported" | Code, name, source, severity (P1 to P4); a rule type needs a rule tool | None | Yes |
|
|
20
|
+
| Object the event is about | The kind of object an event speaks of: orders, machines, customers | Name | Event to object | No: without it only the event title shows |
|
|
21
|
+
| Source of those objects | The app's source with all objects of that type | None | None | No: selecting the object by clicking, picking it when reporting, and task actions all need it |
|
|
22
|
+
|
|
23
|
+
Each event type also has these settings in the app, on the "Events" tab and not on the component: owner roles, handling time limit (hours), analysis view, how tasks gather events, handling choices, report form.
|
|
24
|
+
|
|
25
|
+
## Built-in checks
|
|
26
|
+
|
|
27
|
+
Independent of industry, the component does these itself:
|
|
28
|
+
|
|
29
|
+
| Check | Rule |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| Order | Open first; then severity P1, P2, P3, P4; then newest occurrence first |
|
|
32
|
+
| Overdue | An open event past the handling time limit set for its type, counted from when it occurred |
|
|
33
|
+
| Undecided | An event from a rule whose latest check could not reach a conclusion |
|
|
34
|
+
| Duplicate | An event reported again for the same object within the merge window, marked as a duplicate and showing which event it merged into |
|
|
35
|
+
|
|
36
|
+
Whether an event is created, what a check found, and which actions a status allows are decided by the platform and the knowledge network. The component shows only the actions the platform allows.
|
|
37
|
+
|
|
38
|
+
## Extension points
|
|
39
|
+
|
|
40
|
+
### Rule tool (for rule event types)
|
|
41
|
+
|
|
42
|
+
- **Purpose**: decide what counts as an event, for example an order at delivery risk or a machine temperature out of range.
|
|
43
|
+
- **Where to set it**: on the event class of that event type in the knowledge network, together with the check schedule. Not on this component.
|
|
44
|
+
- **What to connect**: a rule tool in the execution factory, usually a function tool that reads the knowledge network.
|
|
45
|
+
- **Input and output**: set by the event module of the knowledge network. This component does not read them and does not restate them.
|
|
46
|
+
- **Failure and timeout**: a rule type without a rule tool is not checked by the platform, and the component says "no rule tool, the platform does not check". When a check cannot reach a conclusion, the component shows the time of the last check and the reason, and the events concerned are marked undecided.
|
|
47
|
+
- **How results show**: hits become events in the list. The header shows, per type, the last check time with the number of hits, and the next check time. Users who may change the knowledge network can press "Check now".
|
|
48
|
+
|
|
49
|
+
### Analysis view
|
|
50
|
+
|
|
51
|
+
- **Purpose**: open an analysis page from one event to see its reach and causes.
|
|
52
|
+
- **Where to set it**: on the "Events" tab, under "Analysis view" of that event type: the page to open, the selection to set to the related object, whether to set the base date to the day it happened, and a time window (days around that day, 1 to 365).
|
|
53
|
+
- **What to connect**: another page of the app, whose components follow these filters.
|
|
54
|
+
- **Input**: the event's object, the day it happened and the number of days around it, written to the filters you set.
|
|
55
|
+
- **Output**: none. It only sets the page's filters and opens the page.
|
|
56
|
+
- **Failure and timeout**: none.
|
|
57
|
+
- **How results show**: events whose type has an analysis view get an "Analyse" button. Setting the base date to the day it happened only recalculates today's data as of that day. It cannot restore the state at the time of the event.
|
|
58
|
+
|
|
59
|
+
## Interaction and links
|
|
60
|
+
|
|
61
|
+
- **Writes**: clicking the object name on an event writes that object to the selection set in "Clicking an event selects", and other components follow. The name is clickable only when that selection is for the same object type the event is about. "Analyse" writes the filters of the analysis view and switches to the analysis page.
|
|
62
|
+
- **Reads**: it does not follow the page's filters. What it shows depends only on "Event types to show" and the "Open / All" switch at the top right.
|
|
63
|
+
- **Event actions**: where the platform allows, an event shows Verify, Reject, Close and Reopen (the platform decides which status allows which). Reject, close and reopen first ask for a reason of up to 200 characters, kept in the event history. Closing only marks the event as handled; it runs no handling or action. An event whose status is already closed no longer shows "Close".
|
|
64
|
+
- **Refresh**: read every 30 seconds; changes made in another browser tab of the same app are picked up.
|
|
65
|
+
|
|
66
|
+
## Recipes
|
|
67
|
+
|
|
68
|
+
### Order delivery risk: which orders may be late
|
|
69
|
+
|
|
70
|
+
| Role | Maps to |
|
|
71
|
+
| --- | --- |
|
|
72
|
+
| Event type | "Order delivery risk", rule hit |
|
|
73
|
+
| Object the event is about | Sales order (name, customer, due date) |
|
|
74
|
+
| Analysis view | The order analysis page, order selected, base date set to the day it happened, 7 days either side |
|
|
75
|
+
|
|
76
|
+
**The knowledge network needs:**
|
|
77
|
+
|
|
78
|
+
- An order delivery risk event class with the severity the business wants, and a rule tool "delivery risk check" that reads orders, work orders and material kitting and returns the orders at risk with the reason.
|
|
79
|
+
- An order object type, and a source of orders in the app.
|
|
80
|
+
|
|
81
|
+
**Checks:** after a rule hit the list shows the event and the header shows the last check time. Clicking the order name switches the object details on the analysis page. "Analyse" opens the order analysis page. An event past its time limit is marked overdue.
|
|
82
|
+
|
|
83
|
+
### Verifying a reported shop-floor anomaly
|
|
84
|
+
|
|
85
|
+
| Role | Maps to |
|
|
86
|
+
| --- | --- |
|
|
87
|
+
| Event type | "Equipment anomaly", reported |
|
|
88
|
+
| Object the event is about | Equipment |
|
|
89
|
+
|
|
90
|
+
**The knowledge network needs:** an equipment anomaly event class (source: reported) and an equipment object type. The report form and the verifier role are set on the "Events" tab.
|
|
91
|
+
|
|
92
|
+
**Checks:** report one with the event report (\`eventReport\`) and the list shows it as unverified. Someone with the right permission verifies it and it becomes verified. Rejecting needs a reason.
|
|
93
|
+
|
|
94
|
+
## Guidance for AI
|
|
95
|
+
|
|
96
|
+
1. Ask the user first: which kinds of events are handled, whether they come from rules or are reported, which kind of object each is about, and whether an analysis page is needed.
|
|
97
|
+
2. The event types must already exist on the knowledge network. If they do not, list the event types and event classes to create. Do not invent types in the app.
|
|
98
|
+
3. To select an object by clicking an event, first make sure there is a selection for the same object type, and create one if not. When the object types do not match, the configuration reports an error: use another selection, or show only event types about the same object type.
|
|
99
|
+
4. When the app has no source for that object type, create it first. Without it, selecting the object, reporting and task actions do not work.
|
|
100
|
+
5. Common mistakes:
|
|
101
|
+
- Writing an event type's name, source, severity or rule into the app. These are set on the knowledge network. The app only picks the code and sets how to handle it.
|
|
102
|
+
- Assuming the list re-evaluates rules itself. The platform runs rules on the check schedule. The component only shows results.
|
|
103
|
+
- Treating "Close" as handling. Closing only marks. Handlings and actions are in tasks.
|
|
104
|
+
- Leaving "Event types to show" empty means all types, not none.
|
|
105
|
+
|
|
106
|
+
## Limits
|
|
107
|
+
|
|
108
|
+
- Maximum rows to show is 5 to 100, default 20. The rest are shown as a count.
|
|
109
|
+
- The reason for reject, close and reopen is at most 200 characters.
|
|
110
|
+
- When a chosen event type is missing from the knowledge network, the list says events of that type cannot come in.
|
|
111
|
+
- The app needs at least one event type. Without any, the component asks you to choose some on the "Events" tab.
|
|
112
|
+
`;
|
|
113
|
+
export {
|
|
114
|
+
e as default
|
|
115
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
const n = `# 事件登记(eventReport)
|
|
2
|
+
|
|
3
|
+
一个按钮,点开表单登记一条业务事件,登记后状态为待核实。用来让现场人员把规则发现不了的异常记下来,交给有权限的人核实。
|
|
4
|
+
|
|
5
|
+
## 适用与不适用
|
|
6
|
+
|
|
7
|
+
- 适用:事件靠人发现、人登记,例如现场设备异常、客户投诉、质量问题。
|
|
8
|
+
- 不适用:
|
|
9
|
+
- 事件由规则自动产生:不需要登记,用事件列表(\`eventList\`)查看;事件类型的来源要是“规则命中”。
|
|
10
|
+
- 要对已有对象执行业务行动(如改状态、催交):用按钮(\`actionButton\`)。
|
|
11
|
+
- 只想看登记过的事件、核实或关闭:用事件列表(\`eventList\`)。
|
|
12
|
+
|
|
13
|
+
## 本体契约
|
|
14
|
+
|
|
15
|
+
| 角色 | 对象类要求 | 必要的属性 | 关系 | 必填 |
|
|
16
|
+
| --- | --- | --- | --- | --- |
|
|
17
|
+
| 事件类型 | 知识网络里来源为“用户登记”的事件类型及其事件类 | 编码、名称;可设合并窗口 | — | 是 |
|
|
18
|
+
| 事件关联的对象 | 事件所说的那类对象:设备、订单、客户 | 名称 | 事件 → 对象 | 否:表单里“关联对象”可以不选 |
|
|
19
|
+
| 对象的数据源 | 应用里这类对象的全量数据源 | — | — | 否:没有时表单不显示“关联对象”选择 |
|
|
20
|
+
|
|
21
|
+
登记表单与核实角色在“事件”页签的该事件类型下配置:字段(文本、数字、日期,最多 12 项,可设必填)和核实角色。
|
|
22
|
+
|
|
23
|
+
## 组件内置的判断
|
|
24
|
+
|
|
25
|
+
| 判断 | 规则 |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| 默认待核实 | 登记的事件状态为待核实,核实后才作为事实参与分析 |
|
|
28
|
+
| 登记时一并核实 | 表单底部可以勾选“具备核实权限,登记时同时核实”;配了核实角色时写作“当前角色为 X,登记时同时核实” |
|
|
29
|
+
| 重复 | 合并窗口内同一对象再次登记,记为重复,并提示与哪条事件是同一事件;窗口长度在知识网络的事件类型上设置 |
|
|
30
|
+
| 按属性归并 | 事件类型按关联对象的某个属性归并任务时,登记时自动带上该对象这个属性的取值 |
|
|
31
|
+
|
|
32
|
+
## 扩展点
|
|
33
|
+
|
|
34
|
+
无。登记表单的字段是配置,不是场景判断;是否重复、是否允许核实由平台与知识网络判断。
|
|
35
|
+
|
|
36
|
+
## 交互与联动
|
|
37
|
+
|
|
38
|
+
- **写入**:登记成功后事件进入应用的事件列表与任务,不写页面筛选。
|
|
39
|
+
- **读取**:不跟随页面筛选。
|
|
40
|
+
- **表单**:标题(必填,不超过 80 字,默认是事件类型名称)、发生时间(必填,默认现在,精确到分钟)、关联对象(可搜索,可不选)、配置的字段(文本不超过 200 字;数字;日期)。
|
|
41
|
+
- **按钮状态**:知识网络里没有这个事件类型时按钮不可点,悬停说明原因;找不到所选类型时组件显示“暂无事件类型”提示。
|
|
42
|
+
|
|
43
|
+
## 场景配方
|
|
44
|
+
|
|
45
|
+
### 现场设备异常登记
|
|
46
|
+
|
|
47
|
+
| 角色 | 对应 |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| 事件类型 | “设备异常”,用户登记 |
|
|
50
|
+
| 事件关联的对象 | 设备(名称) |
|
|
51
|
+
| 登记表单 | 现象(文本,必填)、停机时长(数字)、发现日期(日期) |
|
|
52
|
+
| 核实角色 | 设备主管 |
|
|
53
|
+
|
|
54
|
+
**知识网络中要有:** 设备异常事件类(来源为用户登记,设合并窗口,例如 2 小时);设备对象类。应用里有设备的数据源。
|
|
55
|
+
|
|
56
|
+
**检查项:** 登记一条后事件列表里出现“待核实”;两小时内对同一设备再登记,提示已记为重复;不选关联对象也能登记。
|
|
57
|
+
|
|
58
|
+
## 给 AI 的指引
|
|
59
|
+
|
|
60
|
+
1. 先问用户:登记哪类事件,要填哪些信息,谁来核实,同一对象多久内再登记算同一件事。
|
|
61
|
+
2. 事件类型必须已在知识网络里建好且来源为“用户登记”;否则列出要建的内容,不要用规则类型代替。
|
|
62
|
+
3. 表单字段写在“事件”页签该类型的登记表单里,不是组件配置。字段标识用小写字母开头,最多 40 个字符。
|
|
63
|
+
4. 常见错误:
|
|
64
|
+
- 选了规则命中的事件类型。组件的事件类型只能选用户登记的。
|
|
65
|
+
- 在组件上设置合并窗口。它属于知识网络的事件类型。
|
|
66
|
+
- 以为登记后立即成为已核实。默认待核实;只有勾选了登记时同时核实才一并核实。
|
|
67
|
+
|
|
68
|
+
## 限制
|
|
69
|
+
|
|
70
|
+
- 一个组件对应一个事件类型;要登记多类事件,放多个组件。
|
|
71
|
+
- 登记表单最多 12 个字段,类型只有文本、数字、日期。
|
|
72
|
+
- 标题不超过 80 字,文本字段不超过 200 字。
|
|
73
|
+
`;
|
|
74
|
+
export {
|
|
75
|
+
n as default
|
|
76
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
const e = `# Event report (eventReport)
|
|
2
|
+
|
|
3
|
+
A button that opens a form to report a business event, which then starts as unverified. Use it to let people on the floor record anomalies rules cannot find and pass them to someone with the right to verify.
|
|
4
|
+
|
|
5
|
+
## When to use it and when not
|
|
6
|
+
|
|
7
|
+
- Use it when people find and report the events, for example a machine anomaly on the floor, a customer complaint, a quality problem.
|
|
8
|
+
- Do not use it:
|
|
9
|
+
- For events created by rules: no reporting is needed, use the event list (\`eventList\`) to see them. The event type's source must be "rule hit".
|
|
10
|
+
- To run a business action on existing objects, such as changing a status or chasing a supplier: use the button (\`actionButton\`).
|
|
11
|
+
- To look at reported events, verify or close them: use the event list (\`eventList\`).
|
|
12
|
+
|
|
13
|
+
## Ontology contract
|
|
14
|
+
|
|
15
|
+
| Role | Object type | Required properties | Relations | Required |
|
|
16
|
+
| --- | --- | --- | --- | --- |
|
|
17
|
+
| Event type | An event type of the network whose source is "reported", with its event class | Code, name; a merge window may be set | None | Yes |
|
|
18
|
+
| Object the event is about | The kind of object an event speaks of: machines, orders, customers | Name | Event to object | No: the form's "related object" may be left empty |
|
|
19
|
+
| Source of those objects | The app's source with all objects of that type | None | None | No: without it the form shows no object choice |
|
|
20
|
+
|
|
21
|
+
The report form and the verifier role are set on the "Events" tab under that event type: fields (text, number, date; up to 12; each may be required) and the verifier role.
|
|
22
|
+
|
|
23
|
+
## Built-in checks
|
|
24
|
+
|
|
25
|
+
| Check | Rule |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| Starts unverified | A reported event is unverified and takes part in analysis as a fact only once verified |
|
|
28
|
+
| Verify while reporting | The form's last line can be ticked to verify at the same time; with a verifier role set it names the role |
|
|
29
|
+
| Duplicate | The same object reported again within the merge window is recorded as a duplicate, and the message says which event it repeats. The window is set on the event type in the knowledge network |
|
|
30
|
+
| Grouping by property | When the event type gathers tasks by a property of the related object, the object's value of that property is taken along when reporting |
|
|
31
|
+
|
|
32
|
+
## Extension points
|
|
33
|
+
|
|
34
|
+
None. The form's fields are configuration, not business judgment. Whether a report is a duplicate and whether verifying is allowed are decided by the platform and the knowledge network.
|
|
35
|
+
|
|
36
|
+
## Interaction and links
|
|
37
|
+
|
|
38
|
+
- **Writes**: after a successful report the event goes to the app's event list and tasks. It does not write any page filter.
|
|
39
|
+
- **Reads**: it does not follow the page's filters.
|
|
40
|
+
- **Form**: title (required, up to 80 characters, defaults to the event type name), time it happened (required, defaults to now, to the minute), related object (searchable, optional), and the configured fields (text up to 200 characters; number; date).
|
|
41
|
+
- **Button state**: when the knowledge network lacks the event type the button is disabled and hovering says why. When the chosen type cannot be found the component shows the "no event types" note.
|
|
42
|
+
|
|
43
|
+
## Recipes
|
|
44
|
+
|
|
45
|
+
### Reporting an equipment anomaly on the floor
|
|
46
|
+
|
|
47
|
+
| Role | Maps to |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| Event type | "Equipment anomaly", reported |
|
|
50
|
+
| Object the event is about | Equipment (name) |
|
|
51
|
+
| Report form | Symptom (text, required), downtime (number), date found (date) |
|
|
52
|
+
| Verifier role | Equipment supervisor |
|
|
53
|
+
|
|
54
|
+
**The knowledge network needs:** an equipment anomaly event class (source: reported) with a merge window, for example 2 hours, and an equipment object type. The app has a source of equipment.
|
|
55
|
+
|
|
56
|
+
**Checks:** after reporting, the event list shows an unverified event. Reporting the same equipment again within two hours says it was recorded as a duplicate. A report can be made without choosing an object.
|
|
57
|
+
|
|
58
|
+
## Guidance for AI
|
|
59
|
+
|
|
60
|
+
1. Ask the user first: which kind of event is reported, what to fill in, who verifies, and how long a repeat on the same object counts as the same event.
|
|
61
|
+
2. The event type must already exist on the knowledge network with source "reported". If not, list what to create. Do not use a rule type instead.
|
|
62
|
+
3. Form fields belong to the report form of that type on the "Events" tab, not to the component's configuration. A field name starts with a lowercase letter and has at most 40 characters.
|
|
63
|
+
4. Common mistakes:
|
|
64
|
+
- Choosing a rule-hit event type. The component accepts only reported types.
|
|
65
|
+
- Setting the merge window on the component. It belongs to the event type in the knowledge network.
|
|
66
|
+
- Assuming a report is verified at once. It is unverified by default and only verified when the box to verify at the same time is ticked.
|
|
67
|
+
|
|
68
|
+
## Limits
|
|
69
|
+
|
|
70
|
+
- One component serves one event type. To report several kinds, place several components.
|
|
71
|
+
- The form has at most 12 fields, of type text, number or date.
|
|
72
|
+
- The title is at most 80 characters and a text field at most 200.
|
|
73
|
+
`;
|
|
74
|
+
export {
|
|
75
|
+
e as default
|
|
76
|
+
};
|