Member Junction
    Preparing search index...
    • Applies an OutputMappingConfig against a work result. Supports updating fields (both single-key and composite-key entities), writing child records (with array fan-out; a reconcile mapping is matched to existing rows on its key), and linking/creating tags via TagEngine. unitWork, the child rows and the fields are written in one entity transaction on its own provider instance; tags after it. A field a person entered is kept unless overwriteHumanValues is set.

      Values resolve from $ (result), record (parent row) and $run (provenance).

      Parameters

      • opts: {
            contextUser: UserInfo;
            dryRun?: boolean;
            humanGuard?: HumanValueGuard;
            lookupCache?: Map<string, string | number>;
            outputMapping: OutputMappingConfig;
            overwriteHumanValues?: boolean;
            provider: IMetadataProvider;
            record: RecordRef;
            result: unknown;
            run?: RunProvenance;
            unitWork?: (unitProvider: IMetadataProvider) => Promise<void>;
            withheld?: WithheldWriteBackTargets;
        }
        • contextUser: UserInfo
        • OptionaldryRun?: boolean

          When true, compute + validate the mapping but do NOT save anything (returns a preview instead).

        • OptionalhumanGuard?: HumanValueGuard

          Decides which of the record's current field values a person entered; absent = every value may be overwritten.

        • OptionallookupCache?: Map<string, string | number>

          Optional memoization cache mapping ${relatedEntityName}|${matchField}|${matchValue} -> resolved PK. Caches positive hits only to prevent downgrading onLookupMiss policies.

        • outputMapping: OutputMappingConfig
        • OptionaloverwriteHumanValues?: boolean

          Overwrite values a person entered (default false), and retire their Human values.

        • provider: IMetadataProvider

          The caller's provider: lookups and tags run on it, the write unit on an instance minted from it.

        • record: RecordRef
        • result: unknown
        • Optionalrun?: RunProvenance

          Optional run provenance information mapped via $run.*.

        • OptionalunitWork?: (unitProvider: IMetadataProvider) => Promise<void>

          Work that commits or rolls back with this write-back, run first in its unit (a pipeline's Feature Values); not on a dry run.

        • Optionalwithheld?: WithheldWriteBackTargets

          Targets to leave as they are: the answer withheld them (see WithheldWriteBackTargets).

      Returns Promise<WriteBackResult>