Write Data
This handler (com.rierino.handler.WriteEventHandler) provides ability to create, update, delete records on a state manager on demand, facilitating common REST API write calls.
Last updated
This handler (com.rierino.handler.WriteEventHandler) provides ability to create, update, delete records on a state manager on demand, facilitating common REST API write calls.
Last updated
useDiff
Whether handler should generate journals keeping only actual updates from current data by default (i.e. removing fields which are same as current data)
true
false
Most actions of this handler utilize the following event metadata fields:
domain
Name of the state manager to read data from
product
-
inputElement
Json path for the input in request event payload
parameters
-
outputElement
Json path for the output in response event payload
$.product
-
With event metadata parameters as:
inputPattern
JMESPath pattern to apply on data input
{id:parameters.id, data:parameters.data}
-
outputPattern
JMESPath pattern to apply on data output, before returning response
{id:id, name:data.name, description:data.description}
-
useDiff
Whether handler should generate journals keeping only actual updates from current data for the event
true
false
ifPattern
JMES path pattern evaluating condition on current data to decide whether to execute update
data.status == 'A'
-
failStale
Whether to fail in case a request with old instance version or offset arrives
false
true
returnResult
Whether the action should return updated data after the change
false
true
immediate
Whether the action should be executed immediately, or can be buffered for bulk execution
false
true
keepImpact
Whether the action should also return the impact created on current record
true
false
keepUndo
Whether the action should also return the undo action required to revert the impact
true
false
structure
Type of input to apply updates for (i.e. or = [{id, data}, {id, data}], = [ids: [id, id], data: {}], single = {id, data})
array
single
dataPath
Json path for the data to use in update, when form is "multi"
newData
data
idsPath
Json path for the ids to update, when form is "multi"
productids
ids
itemPath
Json path for the array field to update (for SetElement and RemoveElement)
parameters
-
allowManualId
When creating a new record, whether IDs can be given manually, if there is already an ID generator
true
false
Creates a new aggregate on a specific state manager.
Patches an existing aggregate on a specific state manager.
Completely updates an existing aggregate on a specific state manager.
Completely updates or creates an aggregate on a specific state manager.
Marks an aggregate as deleted, hiding it on a specific state manager.
Unmarks an aggregate as deleted, making it accessible again on a specific state manager.
Completely removes an aggregate from a specific state manager.
Adds to or sets element of an array field of an aggregate on a specific state manager.
Removes element of an array field of an aggregate on a specific state manager.