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

    Interface DatapackDeploymentSpec

    A deployment spec contains Datapack specific logic and allows hooking into the deployment process to manipulate what get's deployed and execute post-deployment activation logic.

    Implementers can implement any of the specified functions in this interface, all functions are optional and only the implemented functions are executed.

    For many standard datapacks spec logic is implemented under the ./deploymentSpecs folder.

    interface DatapackDeploymentSpec {
        afterDeploy?(event: DatapackDeploymentEvent): unknown;
        afterDeployRecord?(event: readonly DatapackDeploymentRecord[]): unknown;
        afterRecordConversion?(
            records: readonly DatapackDeploymentRecord[],
        ): unknown;
        beforeDependencyResolution?(
            records: readonly DatapackDeploymentRecord[],
        ): unknown;
        beforeDeploy?(event: DatapackDeploymentEvent): unknown;
        beforeDeployRecord?(event: readonly DatapackDeploymentRecord[]): unknown;
        beforeRetryRecord?(event: readonly DatapackDeploymentRecord[]): unknown;
        onRecordError?(event: readonly DatapackDeploymentRecord[]): unknown;
        preprocess?(datapack: VlocityDatapack): unknown;
    }

    Implemented by

    Index

    Methods

    • Executes after a group of records is deployed, at this stage it is not possible to change any field value anymore. The hook point can be used to run post-deployment validations or post-deployment activation processes.

      Note: this runs on record level and use afterDeploy to run datapack activation processes.

      Parameters

      • event: readonly DatapackDeploymentRecord[]

        Array of records that got deployed; contains both the failed and success records.

      Returns unknown

    • Executed just before the records are being deployed; the event contains a readonly array of records. At this stage values for the records can still be manipulated. This hook point should only be used to run logic that depends on all dependencies on individual record level are resolved.

      Note: this runs on record level and use beforeDeploy to run datapack activation processes.

      Parameters

      Returns unknown

    • This function executes before a datapack is converted into a set of DatapackDeploymentRecord's and allow changing the datapack data, correct faulty field values that would otherwise cause errors during record conversion or remove certain fields that should not be deployed.

      This hook can also be used to override certain fields with autogenerated values; i.e. setting the element order and level field of OmniScript elements

      Parameters

      Returns unknown