Skip to content

RecordMap

Holds all decision input data and provides an API to retrieve decision records and validation errors.

export type RecordMap = {
hasErrors: () => boolean;
inputErrors: () => RecordError[];
records: (filter?: (record: ValidatedRecord) => boolean) => ValidatedRecord[];
findByRef: (ref: DecisionRef) => ValidatedRecord[];
};

Implementation

You can create a RecordMap with createRecordMap().

Methods

hasErrors()

Return Value: boolean indicating if there were validation errors.

inputErrors()

Return Value: RecordError[] with all validation errors.

records(filter?: (record: ValidatedRecord) => boolean) => ValidatedRecord[])

Return Value: ValidatedRecord[]

Parameters:

  • filter: (optional) A filter function (item: ValidatedRecord) => boolean

findByRef: (ref: DecisionRef) => ValidatedRecord[]

Return Value: ValidatedRecord[] with all records matched.

Parameters:

See also