UmweltDocs
Reference/Commands/proposal.reject
proposal.rejectcommandsince 0.1

Rejects a whole pending proposal, with a rationale.

Request
umwelt call story.umw proposal.reject '{
  "proposalId": "01a1cbd8-6407-7ab1-9974-a02b78022dc5",
  "rationale": "The maid never touched it."
}'
Request
const result = await client.proposalReject({
  proposalId: '01a1cbd8-6407-7ab1-9974-a02b78022dc5',
  rationale: 'The maid never touched it.',
});
Request
var result = engine.ProposalReject(new RejectPayload
{
    ProposalId = "01a1cbd8-6407-7ab1-9974-a02b78022dc5",
    Rationale = "The maid never touched it.",
});
Response
{
  "id": "01a1cbd8-6407-7ab1-9974-a02b78022dc5",
  "status": "rejected",
  "input": {
    "projectId": "ball",
    "event": {
      "id": "rumour",
      "title": "A rumour",
      "position": { "tick": 10 },
      "evidence": [],
      "participants": ["maid"],
      "provenance": { "origin": { "kind": "human" } },
      "type": "scene"
    },
    "records": [
      {
        "kind": "fact",
        "id": "maid-stole",
        "claim": {
          "subject": "maid",
          "predicate": "stole",
          "object": { "kind": "entity", "id": "necklace" },
          "polarity": true,
          "qualifiers": {}
        },
        "position": { "tick": 10 },
        "provenance": { "origin": { "kind": "human" } }
      }
    ],
    "transitions": []
  },
  "rejectionRationale": "The maid never touched it.",
  "reviews": []
}

Payload

FieldTypeDescription
proposalIdrequiredstringThe proposal, by the id propose returned.
rationalerequiredstringWhy.

Result

FieldTypeDescription
idalwaysstringThe proposal’s id.
inputalwaysProposeInputThe commit it holds: the event, records and transitions, as proposed.
statusalways"pending" | "applied" | "partially-applied" | "rejected"pending until it is applied (applied, or partially-applied when some operations were rejected) or rejected.
reviewsProposalReview[]Every review so far, oldest first. The latest one for an operation decides it.
rejectionRationalestringWhy it was rejected, when it was.

Rules

Nothing is written. The proposal keeps its content and its reviews, with status rejected.

Errors

VALIDATION_FAILEDThe payload is malformed.
NOT_FOUNDThe proposal does not exist.
INVALID_STATEThe proposal is no longer pending.
HANDSHAKE_REQUIREDOver the protocol, hello was not sent first.

Every code is listed in Errors.

See also

Was this page helpful?