The one result shape every Warden API service operation returns (the backend test-automation surface). A caller; an automated test above all; branches on Success and Status and never has to parse prose to learn what happened. STATUS VOCABULARY, closed and stable, so a test can assert on it: Completed; the operation ran and raised no error. Message carries any info/warning lines. Refused; a business rule said no (an Exception::Error with its message): a governance gate, a validation, a separation-of-duties check. This is usually the outcome a test is ASSERTING, so it is not a transport failure and Success is false only in the sense that the requested change did not happen. Denied; the caller cannot run the equivalent action in the client, so the API refuses it too (UI parity, MGCWardenApiDispatch::canRun). No work was attempted. NotFound; the record the caller named does not exist in the current company. Failed; anything else: an unexpected exception, a call made inside a transaction. RecordKey / RecordId identify the record the operation acted on or created, using the SAME natural key the corresponding data entity exposes, so a test can read the entity, call the operation, and read the entity again with one key throughout. The existing MGCWardenWorkItemService.approve/reject predate this contract and still return a plain string (shipped that shape); they are deliberately left unchanged rather than broken.
Methods
parmSuccess
- Visibility:
public
- Returns:
boolean
| Name | Type | Optional | Description |
|---|
_success | boolean | Yes | |
parmStatus
- Visibility:
public
- Returns:
str
| Name | Type | Optional | Description |
|---|
_status | str | Yes | |
parmMessage
- Visibility:
public
- Returns:
str
| Name | Type | Optional | Description |
|---|
_message | str | Yes | |
parmRecordKey
- Visibility:
public
- Returns:
str
| Name | Type | Optional | Description |
|---|
_recordKey | str | Yes | |
parmRecordId
- Visibility:
public
- Returns:
RefRecId
| Name | Type | Optional | Description |
|---|
_recordId | RefRecId | Yes | |
construct
Builds a result.
- Visibility:
public
- Returns:
MGCWardenApiResult The result.
| Name | Type | Optional | Description |
|---|
_success | boolean | No | True when the requested change happened. |
_status | str | No | One of Completed, Refused, Denied, NotFound, Failed. |
_message | str | Yes | Human-readable detail; normally the captured infolog. |
_recordKey | str | Yes | Natural key of the record acted on or created. |
_recordId | RefRecId | Yes | RecId of the record acted on or created, when known. |