@things-factory/worklist 10.1.15 → 10.1.17
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/dist-client/pages/activity-approval/activity-approval-page.js +2 -2
- package/dist-client/pages/activity-approval/activity-approval-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/controllers/activity-installation/installable-to-activity.d.ts +19 -4
- package/dist-server/controllers/activity-installation/installable-to-activity.js +19 -4
- package/dist-server/controllers/activity-installation/installable-to-activity.js.map +1 -1
- package/dist-server/service/installable-activity/installable-activity.d.ts +3 -3
- package/dist-server/service/installable-activity/installable-activity.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -11
|
@@ -45,18 +45,33 @@ export declare const ACTIVITY_ROW_FIELDS: readonly ["name", "label", "descriptio
|
|
|
45
45
|
* A field the template left undefined is not copied, so installing again does not blank a value
|
|
46
46
|
* somebody edited on the row — `save` with an explicit undefined writes null. That protection is
|
|
47
47
|
* real: the activity list screen lets a domain edit viewType and viewSource on the row, and
|
|
48
|
-
* installActivity runs at every boot.
|
|
48
|
+
* installActivity runs at every boot. A field the template set to null is copied, because null is
|
|
49
|
+
* how a template says the value is gone.
|
|
49
50
|
*
|
|
50
51
|
* ── So leaving a field out is not the same as clearing it ─────────────────
|
|
51
52
|
* A template that stops providing something has to say so, because silence means "keep whatever the
|
|
52
53
|
* row has":
|
|
53
54
|
*
|
|
54
55
|
* viewSource: undefined the template says nothing — the row keeps its value
|
|
55
|
-
* viewSource:
|
|
56
|
+
* viewSource: null the template says there is none — the row is cleared
|
|
56
57
|
*
|
|
57
58
|
* plant hit this: they removed two viewSource declarations, the rows kept pointing at elements that
|
|
58
|
-
* no longer existed, and approvers met a screen that could not load.
|
|
59
|
-
*
|
|
59
|
+
* no longer existed, and approvers met a screen that could not load. (2026-09-11)
|
|
60
|
+
*
|
|
61
|
+
* ── Why null and not an empty string ──────────────────────────────────────
|
|
62
|
+
* The rule was first written as `viewSource: ''`, and for a string field that does clear it. But
|
|
63
|
+
* five of the sixteen fields carried here are not strings — priority is a number, multiple and
|
|
64
|
+
* activityType and startingType are enums, model and decisionKeys are json — and none of them has
|
|
65
|
+
* an empty string. `priority: ''` puts a non-number in an integer column; `decisionKeys: ''` puts a
|
|
66
|
+
* string where the screen expects an array and every declared slot disappears with no error. A rule
|
|
67
|
+
* that only holds for two thirds of the list is the kind that gets applied to the other third.
|
|
68
|
+
*
|
|
69
|
+
* null is the one signal that reads the same on all sixteen, and it says "there is none" rather
|
|
70
|
+
* than naming a value that happens to be falsy. It needs nothing here: the copy below asks only
|
|
71
|
+
* whether the template said anything, so null crosses over and the save writes NULL.
|
|
72
|
+
*
|
|
73
|
+
* An empty string still clears a string field — it is a value, and it lands in the column. It is
|
|
74
|
+
* simply not the rule. (2026-09-16, answering the architect)
|
|
60
75
|
*/
|
|
61
76
|
export declare function activityRowFrom(template: object | undefined): TemplateFields;
|
|
62
77
|
export {};
|
|
@@ -26,18 +26,33 @@ exports.ACTIVITY_ROW_FIELDS = [
|
|
|
26
26
|
* A field the template left undefined is not copied, so installing again does not blank a value
|
|
27
27
|
* somebody edited on the row — `save` with an explicit undefined writes null. That protection is
|
|
28
28
|
* real: the activity list screen lets a domain edit viewType and viewSource on the row, and
|
|
29
|
-
* installActivity runs at every boot.
|
|
29
|
+
* installActivity runs at every boot. A field the template set to null is copied, because null is
|
|
30
|
+
* how a template says the value is gone.
|
|
30
31
|
*
|
|
31
32
|
* ── So leaving a field out is not the same as clearing it ─────────────────
|
|
32
33
|
* A template that stops providing something has to say so, because silence means "keep whatever the
|
|
33
34
|
* row has":
|
|
34
35
|
*
|
|
35
36
|
* viewSource: undefined the template says nothing — the row keeps its value
|
|
36
|
-
* viewSource:
|
|
37
|
+
* viewSource: null the template says there is none — the row is cleared
|
|
37
38
|
*
|
|
38
39
|
* plant hit this: they removed two viewSource declarations, the rows kept pointing at elements that
|
|
39
|
-
* no longer existed, and approvers met a screen that could not load.
|
|
40
|
-
*
|
|
40
|
+
* no longer existed, and approvers met a screen that could not load. (2026-09-11)
|
|
41
|
+
*
|
|
42
|
+
* ── Why null and not an empty string ──────────────────────────────────────
|
|
43
|
+
* The rule was first written as `viewSource: ''`, and for a string field that does clear it. But
|
|
44
|
+
* five of the sixteen fields carried here are not strings — priority is a number, multiple and
|
|
45
|
+
* activityType and startingType are enums, model and decisionKeys are json — and none of them has
|
|
46
|
+
* an empty string. `priority: ''` puts a non-number in an integer column; `decisionKeys: ''` puts a
|
|
47
|
+
* string where the screen expects an array and every declared slot disappears with no error. A rule
|
|
48
|
+
* that only holds for two thirds of the list is the kind that gets applied to the other third.
|
|
49
|
+
*
|
|
50
|
+
* null is the one signal that reads the same on all sixteen, and it says "there is none" rather
|
|
51
|
+
* than naming a value that happens to be falsy. It needs nothing here: the copy below asks only
|
|
52
|
+
* whether the template said anything, so null crosses over and the save writes NULL.
|
|
53
|
+
*
|
|
54
|
+
* An empty string still clears a string field — it is a value, and it lands in the column. It is
|
|
55
|
+
* simply not the rule. (2026-09-16, answering the architect)
|
|
41
56
|
*/
|
|
42
57
|
function activityRowFrom(template) {
|
|
43
58
|
const fields = (template ?? {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installable-to-activity.js","sourceRoot":"","sources":["../../../server/controllers/activity-installation/installable-to-activity.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"installable-to-activity.js","sourceRoot":"","sources":["../../../server/controllers/activity-installation/installable-to-activity.ts"],"names":[],"mappings":";;;AA2FA,0CAaC;AAlEY,QAAA,mBAAmB,GAAG;IACjC,MAAM;IACN,OAAO;IACP,aAAa;IACb,cAAc;IACd,UAAU;IACV,cAAc;IACd,UAAU;IACV,OAAO;IACP,cAAc;IACd,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,WAAW;CACH,CAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,SAAgB,eAAe,CAAC,QAA4B;IAC1D,MAAM,MAAM,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAmB,CAAA;IACjD,MAAM,GAAG,GAAmB,EAAE,CAAA;IAE9B,KAAK,MAAM,KAAK,IAAI,2BAAmB,EAAE,CAAC;QACxC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;QAE3B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,CAAA;QACpB,CAAC;IACH,CAAC;IAED,OAAO,GAAG,CAAA;AACZ,CAAC","sourcesContent":["/**\n * The template fields that belong on the Activity row, named one by one.\n *\n * ── Why not spread the template ───────────────────────────────────────────\n * installActivity used `{ ...(template as any) }`. A template field with no column on Activity was\n * dropped by the save, which reported success — and `as any` meant the types said nothing about it.\n * Nine fields were being handed over with no home: activity, approvalSteps, callback, category,\n * guide, label, provider, readiness, release.\n *\n * `label` was the one that hurt. It is the display name a person reads, and it reached exactly one\n * screen — the catalog, which reads the template registry directly — while every screen reading the\n * row showed the instance name instead. decisionKeys only worked because a column happened to be\n * added for it in the same change; the next field would have been left to the same luck.\n *\n * Naming the fields buys three things: a new template field has to be wired here on purpose, the\n * eight that stay behind are recorded as catalog-only rather than lost, and the two `as any` casts\n * go away. (2026-09-10, architect's ruling)\n *\n * ── What stays in the template registry, and why ──────────────────────────\n * activity the installed row itself, attached by the catalog query. Writing it back would\n * be a row pointing at itself\n * approvalSteps counted per domain by the catalog query from the line that is actually set up\n * callback a function\n * category how the catalog groups it\n * guide what the work is, for the catalog's reader\n * provider which module registered it\n * readiness how far along the registering module says it is\n * release which version registered it\n *\n * Each of those is answered by the registry, which is loaded in every process that serves the\n * catalog. Copying them to the row would make a second copy that goes stale on the next release.\n *\n * ── The template shape is spelled out, not imported ───────────────────────\n * InstallableActivity carries type-graphql decorators, and the test runner strips types without\n * reading them, so importing it takes the whole test file down. That happened three times in one\n * day — to search-key-declaration, to decision-key-declaration, and here.\n */\ntype TemplateFields = { [field: string]: unknown }\nexport const ACTIVITY_ROW_FIELDS = [\n 'name',\n 'label',\n 'description',\n 'activityType',\n 'priority',\n 'startingType',\n 'multiple',\n 'model',\n 'decisionKeys',\n 'uiType',\n 'uiSource',\n 'viewType',\n 'viewSource',\n 'reportType',\n 'reportSource',\n 'thumbnail'\n] as const\n\n/**\n * The part of a template that is stored on the Activity row.\n *\n * A field the template left undefined is not copied, so installing again does not blank a value\n * somebody edited on the row — `save` with an explicit undefined writes null. That protection is\n * real: the activity list screen lets a domain edit viewType and viewSource on the row, and\n * installActivity runs at every boot. A field the template set to null is copied, because null is\n * how a template says the value is gone.\n *\n * ── So leaving a field out is not the same as clearing it ─────────────────\n * A template that stops providing something has to say so, because silence means \"keep whatever the\n * row has\":\n *\n * viewSource: undefined the template says nothing — the row keeps its value\n * viewSource: null the template says there is none — the row is cleared\n *\n * plant hit this: they removed two viewSource declarations, the rows kept pointing at elements that\n * no longer existed, and approvers met a screen that could not load. (2026-09-11)\n *\n * ── Why null and not an empty string ──────────────────────────────────────\n * The rule was first written as `viewSource: ''`, and for a string field that does clear it. But\n * five of the sixteen fields carried here are not strings — priority is a number, multiple and\n * activityType and startingType are enums, model and decisionKeys are json — and none of them has\n * an empty string. `priority: ''` puts a non-number in an integer column; `decisionKeys: ''` puts a\n * string where the screen expects an array and every declared slot disappears with no error. A rule\n * that only holds for two thirds of the list is the kind that gets applied to the other third.\n *\n * null is the one signal that reads the same on all sixteen, and it says \"there is none\" rather\n * than naming a value that happens to be falsy. It needs nothing here: the copy below asks only\n * whether the template said anything, so null crosses over and the save writes NULL.\n *\n * An empty string still clears a string field — it is a value, and it lands in the column. It is\n * simply not the rule. (2026-09-16, answering the architect)\n */\nexport function activityRowFrom(template: object | undefined): TemplateFields {\n const fields = (template ?? {}) as TemplateFields\n const row: TemplateFields = {}\n\n for (const field of ACTIVITY_ROW_FIELDS) {\n const value = fields[field]\n\n if (value !== undefined) {\n row[field] = value\n }\n }\n\n return row\n}\n"]}
|
|
@@ -47,9 +47,9 @@ export declare class InstallableActivity {
|
|
|
47
47
|
/**
|
|
48
48
|
* Which input values an approver judges by. See Activity.decisionKeys.
|
|
49
49
|
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
50
|
+
* A field declared here reaches the Activity row only if it is named in ACTIVITY_ROW_FIELDS and
|
|
51
|
+
* the entity has a column for it. It used to be a spread, which dropped what it did not recognise
|
|
52
|
+
* and reported success; naming the fields means a new one has to be wired over on purpose.
|
|
53
53
|
*/
|
|
54
54
|
decisionKeys?: ActivityDecisionKeyItem[];
|
|
55
55
|
uiType?: ActivityUIType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installable-activity.js","sourceRoot":"","sources":["../../../server/service/installable-activity/installable-activity.ts"],"names":[],"mappings":";;;;AAAA,+CAAqD;AAErD,yDAMgC;AAChC,+EAAsE;AACtE,uGAAwF;AACxF,mEAA2D;AAIpD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAAzB;QAyDL,aAAQ,GAAY,CAAC,CAAA;IAoFvB,CAAC;CAAA,CAAA;AA7IY,kDAAmB;AAS9B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACb;AAab;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,gEAAgE,EAAE,CAAC;;kDAC3F;AAGd;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,qCAAqC,EAAE,CAAC;;oDAC9D;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;;qDAC9D;AAIjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACN;AAgBpB;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E,IAAI,EAAE,CAAC;;yDACL;AAGrB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACxB;AAGlB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,sBAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACjC,sBAAQ;IAEnB;;;;;;;;;;;;;;;;;;OAkBG;;qDApBgB;AAyBnB;IAJC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE;QAClB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,mGAAmG;KACjH,CAAC;;0DACoB;AAStB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,yCAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACzC,yCAAiB;sDAAA;8BA1IlB,mBAAmB;IAD/B,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;GACjD,mBAAmB,CA6I/B","sourcesContent":["import { Field, Int, ObjectType } from 'type-graphql'\n\nimport {\n Activity,\n ActivityStartingType,\n ActivityType,\n ActivityUIType,\n MultipleInstanceType\n} from '../activity/activity.js'\nimport { ActivityModelItem } from '../activity/activity-model-type.js'\nimport { ActivityDecisionKeyItem } from '../activity/activity-decision-key-item-type.js'\nimport { ActivityReadiness } from './activity-readiness.js'\nimport { UpdateActivityInstanceStateAddendum } from '../../controllers/common.js'\n\n@ObjectType({ description: 'Entity for InstallableActivity' })\nexport class InstallableActivity {\n /**\n * The key. **Not a name to show anyone.**\n *\n * The callback is found by this value (`activityInstance.activity.name`), so renaming it stops\n * the callback from running — an approval completes and the effect never happens, with nothing\n * on screen to say so. plant hit exactly that on 2026-09-01.\n */\n @Field({ nullable: true })\n name?: string\n\n /**\n * What to call this work on screen, when the key is not something a person reads.\n *\n * The catalog showed 「MES Disposition Approval」 among twenty-three Korean cards because the key\n * was the only name it had. Declared work already carried a `label` for this; built work had\n * nowhere to put one, so the identifier leaked into the screen.\n *\n * Optional. Without it the catalog falls back to the key, which is right for activities whose\n * key already reads as a name.\n */\n @Field({ nullable: true, description: 'What to call this work on screen, when the key is not readable' })\n label?: string\n\n @Field({ nullable: true, description: 'Release information of the Activity' })\n release?: string\n\n @Field({ nullable: true, description: 'Provider information of the Activity' })\n provider?: string\n\n /** One line for developers, in English, like every other GraphQL description in this repo. */\n @Field({ nullable: true })\n description?: string\n\n /**\n * What this work is, **in the words of the person who receives it.**\n *\n * `description` is written for us and it is English by convention, so a Korean screen showing it\n * to an approver says nothing useful. This field is the sentence that person actually needs:\n * when the item reaches them, and what happens once they approve it.\n *\n * i18n keys are welcome here — the catalog runs it through i18next, so a module can either put\n * the sentence in directly or point at a key it already ships.\n */\n @Field(type => [String], {\n nullable: true,\n description: 'What this work is, for the person who receives it. Plain sentences or i18n keys.'\n })\n guide?: string[]\n\n @Field({ nullable: true })\n category?: string\n\n @Field({ nullable: true })\n activityType?: ActivityType\n\n @Field({ nullable: true })\n priority?: number = 1\n\n @Field({ nullable: true })\n startingType?: ActivityStartingType\n\n @Field({\n nullable: true,\n description:\n 'Parallel or sequential are properties as a multi-instance activity, otherwise it means a single instance.'\n })\n multiple?: MultipleInstanceType\n\n @Field(type => [ActivityModelItem], { nullable: true })\n model?: ActivityModelItem[]\n\n /**\n * Which input values an approver judges by. See Activity.decisionKeys.\n *\n *
|
|
1
|
+
{"version":3,"file":"installable-activity.js","sourceRoot":"","sources":["../../../server/service/installable-activity/installable-activity.ts"],"names":[],"mappings":";;;;AAAA,+CAAqD;AAErD,yDAMgC;AAChC,+EAAsE;AACtE,uGAAwF;AACxF,mEAA2D;AAIpD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAAzB;QAyDL,aAAQ,GAAY,CAAC,CAAA;IAoFvB,CAAC;CAAA,CAAA;AA7IY,kDAAmB;AAS9B;IADC,IAAA,oBAAK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AAE,CAAC;;yDACrB;AAGxC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACH;AAGvB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACT;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACD;AAGzB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACP;AAGnB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACC;AAG3B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACL;AAGrB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACxB;AAGlB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,sBAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACjC,sBAAQ;IAEnB;;;;;;;;;;;;;;;;;;OAkBG;;qDApBgB;AAyBnB;IAJC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE;QAClB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,mGAAmG;KACjH,CAAC;;0DACoB;AAStB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,yCAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACzC,yCAAiB;sDAAA;8BA1IlB,mBAAmB;IAD/B,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;GACjD,mBAAmB,CA6I/B","sourcesContent":["import { Field, Int, ObjectType } from 'type-graphql'\n\nimport {\n Activity,\n ActivityStartingType,\n ActivityType,\n ActivityUIType,\n MultipleInstanceType\n} from '../activity/activity.js'\nimport { ActivityModelItem } from '../activity/activity-model-type.js'\nimport { ActivityDecisionKeyItem } from '../activity/activity-decision-key-item-type.js'\nimport { ActivityReadiness } from './activity-readiness.js'\nimport { UpdateActivityInstanceStateAddendum } from '../../controllers/common.js'\n\n@ObjectType({ description: 'Entity for InstallableActivity' })\nexport class InstallableActivity {\n /**\n * The key. **Not a name to show anyone.**\n *\n * The callback is found by this value (`activityInstance.activity.name`), so renaming it stops\n * the callback from running — an approval completes and the effect never happens, with nothing\n * on screen to say so. plant hit exactly that on 2026-09-01.\n */\n @Field({ nullable: true })\n name?: string\n\n /**\n * What to call this work on screen, when the key is not something a person reads.\n *\n * The catalog showed 「MES Disposition Approval」 among twenty-three Korean cards because the key\n * was the only name it had. Declared work already carried a `label` for this; built work had\n * nowhere to put one, so the identifier leaked into the screen.\n *\n * Optional. Without it the catalog falls back to the key, which is right for activities whose\n * key already reads as a name.\n */\n @Field({ nullable: true, description: 'What to call this work on screen, when the key is not readable' })\n label?: string\n\n @Field({ nullable: true, description: 'Release information of the Activity' })\n release?: string\n\n @Field({ nullable: true, description: 'Provider information of the Activity' })\n provider?: string\n\n /** One line for developers, in English, like every other GraphQL description in this repo. */\n @Field({ nullable: true })\n description?: string\n\n /**\n * What this work is, **in the words of the person who receives it.**\n *\n * `description` is written for us and it is English by convention, so a Korean screen showing it\n * to an approver says nothing useful. This field is the sentence that person actually needs:\n * when the item reaches them, and what happens once they approve it.\n *\n * i18n keys are welcome here — the catalog runs it through i18next, so a module can either put\n * the sentence in directly or point at a key it already ships.\n */\n @Field(type => [String], {\n nullable: true,\n description: 'What this work is, for the person who receives it. Plain sentences or i18n keys.'\n })\n guide?: string[]\n\n @Field({ nullable: true })\n category?: string\n\n @Field({ nullable: true })\n activityType?: ActivityType\n\n @Field({ nullable: true })\n priority?: number = 1\n\n @Field({ nullable: true })\n startingType?: ActivityStartingType\n\n @Field({\n nullable: true,\n description:\n 'Parallel or sequential are properties as a multi-instance activity, otherwise it means a single instance.'\n })\n multiple?: MultipleInstanceType\n\n @Field(type => [ActivityModelItem], { nullable: true })\n model?: ActivityModelItem[]\n\n /**\n * Which input values an approver judges by. See Activity.decisionKeys.\n *\n * A field declared here reaches the Activity row only if it is named in ACTIVITY_ROW_FIELDS and\n * the entity has a column for it. It used to be a spread, which dropped what it did not recognise\n * and reported success; naming the fields means a new one has to be wired over on purpose.\n */\n @Field(type => [ActivityDecisionKeyItem], { nullable: true })\n decisionKeys?: ActivityDecisionKeyItem[]\n\n @Field({ nullable: true })\n uiType?: ActivityUIType\n\n @Field({ nullable: true })\n uiSource?: string\n\n @Field({ nullable: true })\n viewType?: ActivityUIType\n\n @Field({ nullable: true })\n viewSource?: string\n\n @Field({ nullable: true })\n reportType?: ActivityUIType\n\n @Field({ nullable: true })\n reportSource?: string\n\n @Field(type => String, { nullable: true })\n thumbnail?: string\n\n @Field(type => Activity, { nullable: true })\n activity?: Activity\n\n /**\n * **이 도메인이 이 단계를 쓰나** — 세워진 양식의 결재선에 결재자가 있나.\n *\n * 결재선은 양식이 아니라 **그 현장이 정하는 것**이다(installActivity 머리말). 그래서 같은 업무가\n * 어느 공장에서는 결재를 받고 어느 공장에서는 그냥 지나간다.\n *\n * 그 사실이 지금까지 **기동 로그 한 줄**에만 있었다 — 「결재선 비어 있음 miratek, system」. 로그는\n * 기동할 때 한 번 지나가고 그 뒤로 아무 데도 없다. 사람이 조치해야 하는 사실의 집이 아니다.\n *\n * 세지 않는 것 둘을 적어 둔다.\n *\n * - **사람 수가 아니라 단계 수다.** 역할로 걸린 한 단계는 그 역할을 가진 여러 사람이 본다. 「3명」\n * 이라고 적으면 틀린 수를 말하게 된다.\n * - **참조는 세지 않는다.** 참조는 결재를 막지 않으므로, 참조만 있는 결재선은 결재자가 없는 것과\n * 같다(needsApproval). 세면 「이 단계를 쓴다」로 읽히는데 실제로는 그냥 지나간다.\n *\n * 비어 있다는 것이 무슨 일을 뜻하는지는 **업무마다 다르다** — 부적합 처분은 상신이 막히고, 정비\n * 완료 확인은 확인 없이 닫힌다. 그 결과는 각 업무의 guide 가 말할 자리다. 이 칸은 사실만 낸다.\n */\n @Field(type => Int, {\n nullable: true,\n description: 'How many approval steps this activity has in this domain. Steps, not people; references excluded.'\n })\n approvalSteps?: number\n\n /**\n * What the registering module says about how far along this type is.\n *\n * Declared, not computed — see ActivityReadiness. Missing means nobody has said, which the\n * screen shows as 「선언 없음」 rather than as a zero.\n */\n @Field(type => ActivityReadiness, { nullable: true })\n readiness?: ActivityReadiness\n\n callback?: (content: any, addendum: UpdateActivityInstanceStateAddendum, context: ResolverContext) => void\n}\n"]}
|