UmweltDocs
Reference/Commands/disposition.setBatch
disposition.setBatchcommandsince 0.1

Sets many Dispositions at once: how holders stand toward others, along named dimensions.

Request
umwelt call story.umw disposition.setBatch '{
  "projectId": "ball",
  "attemptId": "feelings",
  "position": { "tick": 5 },
  "dispositions": [
    {
      "holder": "duchess",
      "target": "bob",
      "dimension": "trust",
      "value": 0.9
    },
    { "holder": "ana", "target": "bob", "dimension": "fear", "value": 0.6 }
  ]
}'
Request
const result = await client.dispositionSetBatch({
  projectId: 'ball',
  attemptId: 'feelings',
  position: { tick: 5 },
  dispositions: [
    { holder: 'duchess', target: 'bob', dimension: 'trust', value: 0.9 },
    { holder: 'ana', target: 'bob', dimension: 'fear', value: 0.6 },
  ],
});
Request
var result = engine.DispositionSetBatch(new SetDispositionsInput
{
    ProjectId = "ball",
    AttemptId = "feelings",
    Position = new Position { Tick = 5 },
    Dispositions = new()
    {
        new DispositionSetting
        {
            Holder = "duchess",
            Target = "bob",
            Dimension = "trust",
            Value = JsonSerializer.SerializeToElement(0.9),
        },
        new DispositionSetting
        {
            Holder = "ana",
            Target = "bob",
            Dimension = "fear",
            Value = JsonSerializer.SerializeToElement(0.6),
        },
    },
});
Response
{
  "eventId": "01a1cbd8-63eb-7582-b85c-f6d27a940591",
  "recordIds": [
    "01a1cbd8-63eb-7582-b85c-f6eb411602a1",
    "01a1cbd8-63eb-7582-b85c-f6ff9c0dbb87"
  ],
  "transitionIds": [],
  "version": 8,
  "warnings": []
}

Payload

FieldTypeDescription
projectIdrequiredstringThe project to write to.
attemptIdrequiredstringMakes a retry safe: the same request with the same attempt id is applied once.
positionrequiredPositionWhere the generated event stands on the main axis: { "tick": n }.
dispositionsrequiredDispositionSetting[]One per setting: holder, target, dimension (trust, fear, affection) and value.
onobjectPositions of the generated event on additional axes, such as { "reading": 12 }.
provenanceProvenanceWho or what made the change: a person, a model, the system or an import.
timelineIdstringdefault "main"The timeline to write to.
expectedVersionintegerFails the write with VERSION_CONFLICT unless the timeline’s head is still this version.

Result

FieldTypeDescription
eventIdalwaysstringThe event written, with the id given or generated.
recordIdsalwaysstring[]The records written, in order.
transitionIdsalwaysstring[]The transitions written, in order.
versionalwaysintegerThe version this commit received. Reads at an earlier asOfVersion do not see it.
warningsWarning[]UNKNOWN_PREDICATE (open vocabulary) or SECRET_BREACH. Warnings never block a write.

Rules

The newest one is current. Per holder, target and dimension, the latest Disposition is the one that counts.

Dispositions are directional. What Ana feels toward Bob says nothing about what Bob feels toward Ana.

One commit. With one engine event of type umwelt:disposition, kept out of full-text search.

Errors

VALIDATION_FAILEDThe payload is malformed, or a holder cannot hold.
NOT_FOUNDThe project, an entity or the timeline does not exist.
VERSION_CONFLICTexpectedVersion is no longer the head of the timeline.
CONFLICTThe attemptId was already used with a different request.
INVALID_STATEThe timeline is a draft that was promoted or discarded, and accepts no more writes.
HANDSHAKE_REQUIREDOver the protocol, hello was not sent first.

Every code is listed in Errors.

See also

Was this page helpful?