@smartkomm/plexus-cli 0.1.120 → 0.1.122

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
- 7f9d9aa30238e8f1b7ba59cab4a8e80e655b75cc2237e73220d79370cc235448
1
+ abda584f86d6e57da0bd747f218da589d6e4cad4542c537727d58f2a7941afca
@@ -204,11 +204,13 @@ whole is the operator's (ask them; do not try).
204
204
  | [offer/author-smartform.md](references/offer/author-smartform.md) | Mandant | Build a SmartForm from scratch with the CLI and publish it. |
205
205
  | [offer/bind-node-input.md](references/offer/bind-node-input.md) | Mandant | Bind a node's input slot to an address, a literal or the default. |
206
206
  | [offer/completeness-check.md](references/offer/completeness-check.md) | Mandant | Wait for outstanding documents, with a deadline and a guest role. |
207
+ | [offer/waitlist-promote-team.md](references/offer/waitlist-promote-team.md) | Mandant + Plattform | Let a team promote applications from a waiting list, beside the responsible person (node set --assign-team). |
207
208
  | [offer/countersign-node.md](references/offer/countersign-node.md) | Mandant + Plattform | Add the school's countersignature of the contract (needs a sealed contract resolver). |
208
209
  | [offer/create-pedagogy-unit.md](references/offer/create-pedagogy-unit.md) | Mandant | Make a unit something families can apply to. |
209
210
  | [offer/declare-node-reads.md](references/offer/declare-node-reads.md) | Mandant + Plattform | Declare which form fields a document node reads and locks. |
210
211
  | [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). |
211
212
  | [offer/edit-smartform.md](references/offer/edit-smartform.md) | Mandant | Change a SmartForm in detail (properties, order, English texts). |
213
+ | [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 |
212
214
  | [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. |
213
215
  | [offer/edit-workflow-node.md](references/offer/edit-workflow-node.md) | Mandant | Rename, rewire, rebind or reroute a node. |
214
216
  | [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. |
@@ -2096,7 +2096,7 @@ Insert a workflow node + sync progress layout/wiring; validate before write
2096
2096
  | `--flag-key <value>` | setFlag only: external-flag key to flip on the --target instance |
2097
2097
  | `--flag-value <value>` | setFlag only: value to set — true\|false (default true) |
2098
2098
  | `--target <value>` | setFlag only (required): the form instance the flag is raised on — '$node.<formNode>.admission' |
2099
- | `--assign-team <value>` | countersign (required): permission-group key whose members countersign (assign.countersign) · engagePush (required): the team of a stopped transfer (assign.engagePush) |
2099
+ | `--assign-team <value>` | waitlist: permission-group key whose members may promote beside the responsible person (actionTeams.promote) · countersign (required): permission-group key whose members countersign (assign.countersign) · engagePush (required): the team of a stopped transfer (assign.engagePush) |
2100
2100
  | `--engage-target <value>` | engagePush only (required): sandbox \| production |
2101
2101
  | `--when-nothing-owed <value>` | review only: park (default — someone looks at it) \| advance (pass through when no field is owed) |
2102
2102
  | `--engage-contract-fields <value>` | engagePush only: off (default) \| on — the contract fields F01–F25, meaning not confirmed by the school yet |
@@ -2211,6 +2211,8 @@ Create or change one optional action (spawnTasks) of a decision node; validate b
2211
2211
  | `--trigger <value>` | Permission-group key that may press the entry (omitted: only the responsible person) |
2212
2212
  | `--clear-trigger` | Remove --trigger |
2213
2213
  | `--repeatable` | A finished round may run again (--no-repeatable: once) |
2214
+ | `--when <value>` | Offer condition: one expression over $env, e.g. "$env.stage.key == 'early-years-3'" |
2215
+ | `--clear-when` | Remove --when (always offered) |
2214
2216
 
2215
2217
  ### `offer workflow node reads`
2216
2218
 
@@ -2268,6 +2270,7 @@ Edit a workflow node (label/assign-decision/form/target/contract/payment/routing
2268
2270
  | `--label <value>` | New node label (German). A node with a real English label needs --label-en too |
2269
2271
  | `--label-en <value>` | New node label (English); alone it re-translates the current German |
2270
2272
  | `--assign-decision <value>` | decision only: replace the decision-row group key (this is the whole wiring) |
2273
+ | `--assign-team <value>` | waitlist only: permission-group key whose members may promote beside the responsible person (actionTeams.promote); "" removes it |
2271
2274
  | `--comment-required <value>` | decision only: replace comment-required outcome ids — <id>[,<id>] |
2272
2275
  | `--requires-one-of <value>` | decision only: the decision waits until ONE of these optional actions (keys on this node) is completed — <key>[,<key>]; "" drops the rule |
2273
2276
  | `--task <value>` | any: replace composed tasks — task: key:task:title:group[:dueInDays] · approval: key:approval:title:group[:revisionGroup] |
@@ -0,0 +1,57 @@
1
+ # Offer an optional action only under a condition
2
+
3
+ **Use it to** show an entry under „Weiteres" only on the applications it is meant for —
4
+ a „Taster Day" only for one stage. On every other application the entry does not exist, not
5
+ even greyed out.
6
+
7
+ ## The model
8
+
9
+ - **`optionalActions[].when`** is one condition of the expression language over `$env`, the
10
+ checker an `if` node and an assignment rule use: `$env.stage.key == 'early-years-3'`. No
11
+ computed form field is needed, and a form address is refused.
12
+ - **`$env.stage.key` is the bundle key** (`program.stages[].key`), never the stored
13
+ `<program>-stufe-<key>`. Publish checks the literal against the offer's program.
14
+ - **It is read afresh on every load.** A stage change shows or hides the entry on the next load.
15
+ - **It rules the offer, never the round.** Tasks a press already spawned stay when the
16
+ condition turns false, and they keep holding the decision until they are closed.
17
+ - **Not in `requiresOneOf`.** A decision cannot wait for an action that may never be offered
18
+ (`[decision/requiresOneOfConditional]`).
19
+
20
+ ## CLI
21
+
22
+ Use a scratch dir for a real tenant
23
+ ([edit-live-tenant-offer.md](./edit-live-tenant-offer.md)).
24
+
25
+ ```bash
26
+ # The action must exist or be created in the same call (--label and --tasks when new).
27
+ plexus-cli offer workflow node optional-action set --dir <dir> --node <decision> --key tasterDay \
28
+ --when "\$env.stage.key == 'early-years-3'"
29
+
30
+ # Offer it to everyone again
31
+ plexus-cli offer workflow node optional-action set --dir <dir> --node <decision> --key tasterDay \
32
+ --clear-when
33
+
34
+ plexus-cli offer validate --dir <dir>
35
+ ```
36
+
37
+ In the workflow IDE: node → „Optionale Aktionen" → „Nur anbieten, wenn".
38
+
39
+ ## What publish refuses
40
+
41
+ | Code | Meaning |
42
+ |---|---|
43
+ | `[optionalAction/when]` with `condition/*` | The checker refuses it: unreadable, not yes/no, an unknown leaf, a form address, a literal on an unstable leaf such as `run.key` |
44
+ | `[optionalAction/when]` with `env/unknownStageKey` | No stage of the offer's program has this key |
45
+ | `[optionalAction/when]`, „names no key of this school" | A `$env.unit.key` or `$env.offer.key` literal no row has |
46
+ | `[decision/requiresOneOfConditional]` | The decision rule names this action |
47
+
48
+ A press that arrives anyway while the condition is false is refused with
49
+ `[optionalAction/conditionFalse]`.
50
+
51
+ ## Verify
52
+
53
+ 1. Two test applications, one for the stage and one for another.
54
+ 2. Cockpit, on the decision node: „Weiteres" lists the entry only on the first one.
55
+ 3. Press it there: its tasks appear. Change the stage: the entry goes, the task stays.
56
+
57
+ Test tenant: Grundschule, „Einschulung klären" on the Freigabe (offered only for Klassenstufe 1).
@@ -0,0 +1,41 @@
1
+ # Let a team promote from the waiting list
2
+
3
+ **When to use:** colleagues stand in for one another and each should press „Nachrücken" on an application on the waiting list, without first making themselves responsible for it. Without a team, only the application's responsible person may press it.
4
+
5
+ The button and the server follow one rule: **the responsible person OR a member of the team the waitlist node names.** The team gets no task and no queue entry: a waiting application stays out of everyone's inbox. It also gets no assignment slot and no chat channel from this entry.
6
+
7
+ ## Prerequisites
8
+ - A bundle on disk (`offer export`; a live tenant's only into a private scratch dir — [Edit a live tenant's offer](./edit-live-tenant-offer.md)). Authoring is offline.
9
+ - The team's permission-group key, e.g. `bewerbungsteam`. It must be a staff group of the school, and its members need to be able to read applications, or they never reach the button.
10
+
11
+ ## Steps
12
+ ```bash
13
+ # 1. Find the waitlist node(s). A process may have several; each names its own team.
14
+ plexus-cli offer workflow node list --dir <dir>
15
+
16
+ # 2. Name the team on the node (stored as `actionTeams.promote`).
17
+ plexus-cli offer workflow node set --dir <dir> --node warteliste --assign-team bewerbungsteam
18
+
19
+ # 3. Validate, plan, publish.
20
+ plexus-cli offer validate --dir <dir>
21
+ plexus-cli --env staging --tenant <t> offer plan --dir <dir>
22
+ plexus-cli --env staging --tenant <t> offer apply --publish --dir <dir>
23
+ ```
24
+
25
+ A new waitlist node takes the same flag: `node add --type waitlist --waitlist-order manual --assign-team bewerbungsteam …`.
26
+
27
+ To remove the team again: `plexus-cli offer workflow node set --dir <dir> --node warteliste --assign-team ""`.
28
+
29
+ ## Verify
30
+ Sign in as a team member who is not responsible for a waiting application and open it: „Nachrücken" is enabled, and its caption names the team and the responsible person. A colleague outside the team sees the same button disabled.
31
+
32
+ ## Idempotency / gotchas
33
+ - Publishing reaches applications on the **new version**. An application already waiting stays pinned to its version until it is moved to the new one.
34
+ - A team the school does not have is refused at publish (`[inputs/unknownResource]`), not by `offer validate` offline. So is an empty entry (`[inputs/emptyReference]`, offline too).
35
+ - Only `promote` on a waitlist node takes a team (`[capability/unknownActionTeam]`).
36
+ - Promoting into a full cohort still needs the explicit overbooking confirmation, whoever presses.
37
+ - Closing a round and „next in the queue" are cohort acts on the selection permission; this team does not change them.
38
+
39
+ ## Related
40
+ - [Add a workflow node](./add-workflow-node.md)
41
+ - [Edit a live tenant's offer](./edit-live-tenant-offer.md)