Increment state
state.incrementAtomically add to an Integer or Number while holding the Run State slot lock.
Example use
Increment a numeric state after each task without a read-modify-write race between branches.
Node preview
Right-drag to pan and scroll to zoom. Expand inputs and edit parameters to see how ports change. This preview does not run the node; reopening the page restores the example.
This preview uses an integer variable named example with initial value 0. Select your own workflow variable when using the node.
Loading node preview…
This node has dynamic parameters or ports. The reference below describes the initial example; after editing, inspect the preview for the current ports.
Data inputs 1
- Delta
deltaInteger Same-type numeric value to add to current state.
RequiredDefault:None- Minimum: -9007199254740991
- Maximum: 9007199254740991
Value format examples
042
Configuration 1
- Workflow state variable
variablestate-variable Select one explicitly declared typed state slot from this Workflow.
RequiredDefault:None- Minimum characters: 1
- Maximum characters: 128
- Pattern: ^[A-Za-z0-9_][A-Za-z0-9._-]*$
Data outputs 1
- Updated value
resultInteger State value after the atomic increment.
- Minimum: -9007199254740991
- Maximum: 9007199254740991
Value format examples
042
Control and error ports
- Input
inInput · Control - An incoming control signal enters this operation.
- Done
doneOutput · Control - Continue from this result or stage; see the node description for branch conditions.
- Failed
failedOutput · Error - Emitted when the operation fails; connect error handling here.
Version and node identity
Version 1.0.0
sha256:0611930cfe48c71b6c97708d1117263bce9d5152f4e677f0282392bf53dc7cf0