BatchProcessDto
The argument ABatchNode.processAction() receives. Extends ProcessDto with methods for emitting downstream items and managing the pagination cursor.
import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
Inheritance #
AProcessDto -> ProcessDto -> BatchProcessDto
Methods added #
| Method | Returns | Purpose |
|---|---|---|
addItem(payload) | this | Emit one downstream message. |
addItemFromArray(payload) | this | Same, typed for plain objects. |
setItemList(items) | this | Shred the array: each element becomes one downstream message. |
setItemList(items, true) | this | Wrap as a single message instead. |
getBatchCursor() | string | undefined | Cursor value the platform passed in for the next iteration. |
setBatchCursor(cursor) | this | Iterate again. Items already emitted flow downstream immediately. |
setBatchCursor(cursor, true) | this | Iterate again, hold items until the iteration completes. |