@smartkomm/plexus-cli 0.1.203 → 0.1.205
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
d861b2d3e6d969e7abf46a2f92fef1306900467e6771f7ebaac73aa939d613fc
|
package/dist/skill/SKILL.md
CHANGED
|
@@ -212,6 +212,7 @@ whole is the operator's (ask them; do not try).
|
|
|
212
212
|
| [offer/edit-live-tenant-offer.md](references/offer/edit-live-tenant-offer.md) | Mandant + Plattform | Change a live offer: fresh export → change → plan → apply → plan shows all same (signing connection steps need the operator). |
|
|
213
213
|
| [offer/edit-smartform.md](references/offer/edit-smartform.md) | Mandant | Change a SmartForm in detail (properties, order, English texts). |
|
|
214
214
|
| [offer/conditional-optional-action.md](references/offer/conditional-optional-action.md) | Mandant | Offer an optional action only under a condition over `$env`, e.g. for one stage |
|
|
215
|
+
| [offer/conditional-team.md](references/offer/conditional-team.md) | Mandant | Give a node's task to a team chosen by a yes/no answer of the form, else a default team |
|
|
215
216
|
| [offer/consent-field.md](references/offer/consent-field.md) | Mandant | Add a consent field (a checkbox that must be ticked) or convert a preset yes/no into one. |
|
|
216
217
|
| [offer/edit-workflow-node.md](references/offer/edit-workflow-node.md) | Mandant | Rename, rewire, rebind or reroute a node. |
|
|
217
218
|
| [offer/engage-push-node.md](references/offer/engage-push-node.md) | Mandant + Plattform | Insert the Engage transfer node that pushes an accepted application to Engage SMIS once. |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# plexus-cli command reference
|
|
2
2
|
|
|
3
3
|
Generated from the commands the CLI registers — do not edit; `plexus-cli <command> --help` prints the same.
|
|
4
|
-
|
|
4
|
+
300 commands. Every network command also takes `--env <local|staging|prod>`, `--tenant <slug>`,
|
|
5
5
|
`--json` (raw JSON instead of a table) and `--allow-prod` (required for a writing run against production).
|
|
6
6
|
|
|
7
7
|
- [Admission (offline)](#admission-offline) (1)
|
|
@@ -25,7 +25,7 @@ Generated from the commands the CLI registers — do not edit; `plexus-cli <comm
|
|
|
25
25
|
- [Master data (school token)](#master-data-school-token) (1)
|
|
26
26
|
- [Notifications (platform operator)](#notifications-platform-operator) (5)
|
|
27
27
|
- [Notifications (school token)](#notifications-school-token) (6)
|
|
28
|
-
- [Offer (offline)](#offer-offline) (
|
|
28
|
+
- [Offer (offline)](#offer-offline) (69)
|
|
29
29
|
- [Offer (school token)](#offer-school-token) (26)
|
|
30
30
|
- [Operations (offline)](#operations-offline) (1)
|
|
31
31
|
- [Organisation (school token)](#organisation-school-token) (8)
|
|
@@ -2451,6 +2451,22 @@ Replace the form fields a completenessCheck waits for; validate before write
|
|
|
2451
2451
|
| `--from <value>` | Short form with --field: the form node whose fields are meant |
|
|
2452
2452
|
| `--field <value>` | Short form with --from: field paths of that node's form (repeatable, comma-separated) |
|
|
2453
2453
|
|
|
2454
|
+
### `offer workflow node set-team`
|
|
2455
|
+
|
|
2456
|
+
Set which team gets a node's task — a fixed team or by a yes/no answer of the form; validate before write
|
|
2457
|
+
|
|
2458
|
+
- **Right:** offline — no deployment
|
|
2459
|
+
- **Effect:** offline — edits local files only
|
|
2460
|
+
|
|
2461
|
+
| Option | Description |
|
|
2462
|
+
|---|---|
|
|
2463
|
+
| `--dir <value>` (required) | Bundle directory |
|
|
2464
|
+
| `--node <value>` (required) | Node id |
|
|
2465
|
+
| `--template <value>` (required) | The node's task template whose team this is (e.g. prepareDocument, releaseApproval, decision) |
|
|
2466
|
+
| `--when <value>` | Condition of a row — the address of a yes/no form export, in single quotes (repeatable, pairs with the --team after it) |
|
|
2467
|
+
| `--team <value>` | Team key of the row whose --when precedes it (repeatable) |
|
|
2468
|
+
| `--default <value>` (required) | Team key when no condition holds (the last row) |
|
|
2469
|
+
|
|
2454
2470
|
### `offer workflow node task add`
|
|
2455
2471
|
|
|
2456
2472
|
Add one composed task to a workflow node (result, blocks, condition, description); validate before write
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Give a task to a team chosen by the family's answer
|
|
2
|
+
|
|
3
|
+
**Use it to** let one step go to a different team depending on a yes/no answer of the form —
|
|
4
|
+
„Vertrag prüfen" goes to Finanzen when the family asked for reduced fees, otherwise to the
|
|
5
|
+
admissions team.
|
|
6
|
+
|
|
7
|
+
## The model
|
|
8
|
+
|
|
9
|
+
- **A node's team position is a list of rows** (`assign.<template>`): `{ when, team }` rows in
|
|
10
|
+
order, the last one the default (`when: null`). A fixed team is the list of just that row.
|
|
11
|
+
- **The first row whose condition is true wins**; false, unanswered and a form not yet
|
|
12
|
+
submitted move on to the next row, so the default is also where an unknown answer lands.
|
|
13
|
+
- **The condition is a yes/no field the form exports**: `$node.<form>.admission.<field>` of a
|
|
14
|
+
field or computed value with `export: true` and type boolean. An `$env` value, a staff input
|
|
15
|
+
or a task value is refused.
|
|
16
|
+
- **It is judged once, when the task is created.** A later correction of the answer does not
|
|
17
|
+
move an open task; a handed-back copy keeps the team of the task before it.
|
|
18
|
+
- **The feed shows the choice**: „Team nach Bedingung gewählt" with the row that matched.
|
|
19
|
+
|
|
20
|
+
## Prerequisites
|
|
21
|
+
|
|
22
|
+
- The answer is exported by the form. If not: mark the field (or a computed boolean over it)
|
|
23
|
+
`export: true` in `smartforms/<slug>.json`, then run `plexus-cli offer workflow restamp-exports --dir <dir>`.
|
|
24
|
+
- The template key: the node's `assign` in `workflow.json` lists them (e.g. `prepareDocument`,
|
|
25
|
+
`releaseApproval` on a document node, `decision` on a decision). A wrong key is refused with
|
|
26
|
+
the keys the node type knows.
|
|
27
|
+
|
|
28
|
+
## Steps
|
|
29
|
+
|
|
30
|
+
Use a scratch dir for a real tenant ([edit-live-tenant-offer.md](./edit-live-tenant-offer.md)).
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Finance when reduced fees were requested, otherwise the admissions team.
|
|
34
|
+
plexus-cli offer workflow node set-team --dir <dir> --node contract --template prepareDocument \
|
|
35
|
+
--when '$node.form.admission.ermaessigungBeantragt' --team finanzen \
|
|
36
|
+
--default bewerbungsteam
|
|
37
|
+
|
|
38
|
+
# Several conditions: pairs in order, first true wins.
|
|
39
|
+
plexus-cli offer workflow node set-team --dir <dir> --node contract --template releaseApproval \
|
|
40
|
+
--when '$node.form.admission.foerderungBeantragt' --team finanzen \
|
|
41
|
+
--when '$node.form.admission.sonderfall' --team schulleitung \
|
|
42
|
+
--default geschaeftsfuehrung
|
|
43
|
+
|
|
44
|
+
# Back to a fixed team.
|
|
45
|
+
plexus-cli offer workflow node set-team --dir <dir> --node contract --template prepareDocument \
|
|
46
|
+
--default bewerbungsteam
|
|
47
|
+
|
|
48
|
+
plexus-cli offer validate --dir <dir>
|
|
49
|
+
plexus-cli --tenant <slug> offer plan --dir <dir>
|
|
50
|
+
plexus-cli --tenant <slug> offer apply --dir <dir> --publish
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The verb writes the whole list each time — what you do not pass is gone. Addresses go in single
|
|
54
|
+
quotes, or the shell replaces `$node`.
|
|
55
|
+
|
|
56
|
+
## What is refused
|
|
57
|
+
|
|
58
|
+
| Code | Meaning |
|
|
59
|
+
|---|---|
|
|
60
|
+
| `[capability/unknownAssignKey]` | The node type has no task template with that key |
|
|
61
|
+
| `[assign/conditionNotFormField]` | The condition is no form field (an `$env` value, a task value) |
|
|
62
|
+
| `[address/pathNotInTarget]` | The form does not export that field — export it and restamp |
|
|
63
|
+
| `[address/typeMismatch]` | The exported value is not yes/no |
|
|
64
|
+
| `[address/notVisible]` | The form does not run before the node on every path |
|
|
65
|
+
| `[assign/duplicateRow]` (warning) | A row repeats an earlier condition and never wins |
|
|
66
|
+
| `[inputs/unknownResource]` (at publish) | A team key the school does not have |
|
|
67
|
+
|
|
68
|
+
## Verify
|
|
69
|
+
|
|
70
|
+
1. Two test applications, one answering yes, one no.
|
|
71
|
+
2. When the step's task is created: the yes application's task lies with the first team, the
|
|
72
|
+
other one's with the default team; the feed of the first says „Team nach Bedingung gewählt".
|
|
73
|
+
|
|
74
|
+
## Related
|
|
75
|
+
|
|
76
|
+
- [edit-workflow-node.md](./edit-workflow-node.md) — the other node settings.
|
|
77
|
+
- [assignment-rule.md](./assignment-rule.md) — which PERSON of a team gets the work.
|