ABatchNode

Base class for any batch (fan-out) node. Use it for splitting a collection or iterating a paginated upstream.

import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';

Inheritance #

ANode -> ABatchNode

Methods you implement #

MethodReturnsPurpose
getName()stringStable internal node identifier.
processAction(dto)Promise<BatchProcessDto>Emit zero or more items via dto.addItem*(). Optionally set a cursor to be re-invoked.

Output methods (on BatchProcessDto) #

MethodEffect
addItem(payload)Emit one downstream message.
addItemFromArray(payload)Same as above, typed for plain objects.
setItemList(items)Convenience for "shred this array into N messages".
setItemList(items, true)Wrap the array as a single message.
setBatchCursor(cursor)Iterate again with the new cursor. Items already emitted flow downstream in parallel.
setBatchCursor(cursor, true)Iterate again, but hold items until pagination completes (aggregation).

See also #

© 2025 Orchesty Solutions. All rights reserved.