Decide work item
decide_work_itemApprove or reject an open approval work item assigned to you, with an optional comment. It checks the item is open and in your inbox, refusing unclaimed group items until claimed.
Instructions
Approve or reject an open approval work item assigned to the authenticated user, with an optional comment. Before writing anything it reads the case as that user and refuses a work item that is not open or not in their approval inbox (list_work_items), and one offered to their group that nobody has claimed yet: claim it first (claim_work_item). The decision executes as that user, and the result names the case, the outcome midPoint recorded, and the identity it ran as. userName and roleName are the midPoint names (the unique name attribute, such as a login, not display names) of the objects the OIDs point to, as list and get results give them; the call is refused when they don't match, so the person confirming it reads the right names. Respects the write gate. When you write to a person, name people, roles and requests by their display names rather than OIDs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| caseOid | Yes | OID of the case (caseOid from list_work_items or get_case) | |
| comment | No | optional comment recorded with the decision | |
| decision | Yes | approve or reject | |
| roleName | Yes | midPoint name of the role (or other object) the request adds or removes; empty only when midPoint doesn't show you its name | |
| userName | Yes | midPoint name (login) of the person the request is for; empty only when midPoint doesn't show you their name | |
| workItemId | Yes | id of the work item within the case (id from list_work_items or get_case) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | the JSON body of the midPoint REST request, when it has one | |
| case | No | the case name | |
| tool | Yes | the tool that produced this result | |
| acting | Yes | who midPoint executed this call as | |
| dryRun | Yes | ||
| method | Yes | ||
| object | No | the focus the case changes | |
| result | No | ||
| server | Yes | write gate, features and versions of this server | |
| target | No | what was requested | |
| applied | Yes | ||
| caseOid | Yes | ||
| comment | No | ||
| subject | Yes | the identity midPoint executed the decision as (or, in a dry run, would) | |
| summary | Yes | ||
| decision | Yes | approve or reject, as submitted | |
| endpoint | Yes | ||
| caseState | No | the case state read back after the decision; it stays open while later approval stages remain | |
| requestor | No | ||
| workItemId | Yes | ||
| nextApprovers | Yes | assignees of the case's open work items, read back after the decision | |
| recordedOutcome | No | the outcome midPoint shows on the work item, read back after the decision |