vlocode-project - v1.40.0-beta-4
    Preparing search index...

    Class DatapackDeploymentRecord

    Index

    Constructors

    Properties

    _datapackAction: DeploymentAction = DeploymentAction.None
    _dependencies: Map<string, VlocityDatapackReference> = ...
    _deployTimer: Timer = ...
    _error?: Error | RecordError
    _existingId?: string
    _status: DeploymentStatus = DeploymentStatus.Pending
    _statusDetail?: string
    _unresolvedDependencies: Set<string> = ...
    _warnings: string[] = ...
    datapackKey: string
    datapackType: string
    normalizedSObjectType: string

    Namespace normalized SObjectName; contains the SObjectType without the namespace prefix.

    retryCount: number = 0

    Number of times the record has been retried for deployment. This is used to determine if the record should be skipped after a certain number of retries.

    skipLookup: boolean

    True if looking up existing records to update is skipped causing the deployment to always create a new object using insert

    sobjectType: string
    sourceKey: string
    upsertFields: undefined | string[] = undefined
    values: object = {}

    Accessors

    • get isCascadeFailure(): boolean

      Checks if the deployment record failed due to a cascade failure. A cascade failure occurs when a record cannot be deployed because it is dependent on another record that failed to deploy.

      Returns boolean

      True if the deployment record represents a cascade failure, false otherwise.

    • get recordId(): undefined | string

      Gets the record ID of the deployed record if the record is deployed. Otherwise the ID of the record that will be updated. For new records this will be undefined.

      To change the record ID of a record use the setAction method with the DeploymentAction.Update action.

      Returns undefined | string

    Methods

    • Add a lookup dependency to this record based on only a source key string.

      Parameters

      • sourceKey: string

        Dependencies source key in the following format: <sobject>/<values...>

      Returns void

    • Add a lookup dependency to this record based on a SObject type and the source key string.

      Parameters

      • sobjectType: string

        SObject type of the record on which this record is dependent. Replace vlocity namespace with the namespace placeholder.

      • sourceKey: string

        String that describes the records source key; should be prefixed with the record sobject type otherwise it is automatically prepended

      Returns void

    • Add a lookup dependency to this record is based on a SObject type and the matching key values of the record.

      Parameters

      • sobjectType: string

        SObject type of the record on which this record is dependent. Replace vlocity namespace with the namespace placeholder.

      • matchingKeyValues: Record<string, string | number | boolean | undefined | null>

        Object describing the matching key values that are concatenated into the source key so the source key matches the following format: <sobject>/<values...>

      Returns void

    • Check if this record type matches the specified SObject type filter. Matches are always case insensitive and will be matched against the full and normalized SObject (without namespace prefix) type. Matching will first be done against the normal sobject type and only after that against the normalized sobject type.

      Parameters

      • filter: string | RegExp

        SObjectType as string or RegEx

      Returns boolean

      true if the record SObject type matches the filter otherwise false

    • Namespace and case normalized check to determine if the current datapack is of the specified type.

      Parameters

      • sobjectType: string

        SObject type with or without namespace prefix

      Returns boolean

    • Resolves the dependencies of the datapack deployment record. Rethrows any error that occurs during dependency resolution from the resolver.

      Parameters

      • resolver: DatapackDependencyResolver

        The datapack dependency resolver.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating whether all dependencies have been resolved.