Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions skills/uipath-maestro-case/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export default casePlan('loan-approval')
.required()
.entryWhen(rule('current-stage-entered')))
.task('Manager Approval', t => t
// Literal recipient is baked into the plan; test or unknown assignee: references/case-runtime.md § Action recipients
.action({ title: 'Approve loan', priority: 'High', recipient: 'manager@corp.com', app: { name: 'LoanApproval', folder: 'Shared' } })
.entryWhen(rule('selected-tasks-completed', { tasks: ['Check Policy'] }))))
.stage('Decision', s => s
Expand Down
45 changes: 45 additions & 0 deletions skills/uipath-maestro-case/references/case-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,51 @@ make from syntax alone. Exact signatures remain in the generated API.
error. Write the complementary condition explicitly, even when the negative
arm only routes to a close-out.

## Action recipients and the go-live trap

<!-- RULE:case.recipient.externalize -->
- A literal `recipient: '<email>'` compiles to `{ Type: 2, Value: <email> }`
and bakes the address into the plan: going live means editing every action
and publishing a new version. When the request names a test, placeholder or
not-yet-known assignee, wire it through a case input instead:

```ts
.input({ approver: { type: 'string', default: '<TEST_EMAIL>' } }, { from: manual })
// ...
.action({ ..., recipient: { type: 3, value: '=vars.approver' } })
```

Going live then means changing the input default, or passing the real
address when the case starts; the actions stay unchanged.
Recipient types are `0` user id, `1` group name, `2` email, `3` expression.
Type `3` evaluates `value` and assigns the result as a user when it is an
email, and as a group name otherwise. An expression needs type `3`: a bare
string `'=vars.approver'` is type `2` and is looked up as a literal email.
`case check` warns `STRICT_RECIPIENT_EXPRESSION_TYPE` on that, and
`case validate --strict` fails. The SDK's `RecipientType` doc comment still
calls `0`/`1`/`3` reserved; that comment is stale, and type `3` is the
expression type the CLI and `case check` accept.
Brownfield: keep a decompiled `{ type, value }` recipient as is.

<!-- RULE:case.recipient.no-silent-default -->
- Before `uip solution upload` or `uip solution publish`, tell the user the
list below, and repeat that list in the final summary of every build or
edit. List each assignee the user did not name as the production assignee: an input default, a literal
`recipient`, or an SLA escalation target (`toUser`, `toGroup`). These include
a test mailbox, the user's own email, and `<UNRESOLVED: ...>`. For each one,
give the address or group, the actions or escalations it routes, and what
going live changes: the input default, or each literal in the source plus a
new published version.

`uip maestro case debug` and `uip maestro case process run` start a case
instance and create real tasks for these assignees. `upload`, `publish`,
`check`, `compile` and `validate` start none. Before `debug` or
`process run`:
1. An assignee still `<UNRESOLVED: ...>`: do not run it.
2. An address or group the user did not confirm: ask. A request or
pre-approval that names that step is the user's answer. When no user can
answer and nothing names that step, do not run it.

## Script tasks

<!-- RULE:case.script.positional-rename -->
Expand Down