Frodo Library - v5.0.0-65
    Preparing search index...

    Type Alias ScriptType

    type ScriptType = {
        createScriptTypeExportTemplate(): ScriptTypeExportInterface;
        exportScriptTypes(
            resultCallback?: ResultCallback<ScriptTypeExportSkeleton>,
        ): Promise<ScriptTypeExportInterface>;
        importScriptTypes(
            importData: ScriptTypeExportInterface,
            scriptTypeId?: string,
            resultCallback?: ResultCallback<ScriptTypeExportSkeleton>,
        ): Promise<ScriptTypeSkeleton[]>;
        readScriptBindings(context: string): Promise<ScriptBinding[]>;
        readScriptType(scriptTypeId: string): Promise<ScriptTypeSkeleton>;
        readScriptTypes(): Promise<ScriptTypeSkeleton[]>;
        updateScriptType(
            scriptTypeId: string,
            scriptTypeData: ScriptTypeSkeleton,
        ): Promise<ScriptTypeSkeleton>;
    }
    Index
    • Export all scriptTypes. The response can be saved to file as is. Every script type is tried: a script type that cannot be exported does not stop the others.

      Parameters

      • OptionalresultCallback: ResultCallback<ScriptTypeExportSkeleton>

        Optional callback to process individual results. When given, the outcome of every script type is passed to it as it happens (a failed script type as an error that names it, with the failed reads nested) and a failed script type does not throw: the script types that could be exported are returned, and a failed one is not part of the export. Without it, the failures are collected and thrown as one error after every script type was tried. Failing to read the list of script types always throws. A script type that has no engine configuration (HTTP 404) is not a failure.

      Returns Promise<ScriptTypeExportInterface>

      Promise resolving to a ScriptTypeExportInterface object.

    • Import script types. Every script type is tried: a script type that cannot be imported does not stop the others.

      Parameters

      • importData: ScriptTypeExportInterface

        script type import data

      • OptionalscriptTypeId: string

        Optional script type id. If supplied, only the script type of that id is imported. Takes priority over scriptTypeUrl if both are provided.

      • OptionalresultCallback: ResultCallback<ScriptTypeExportSkeleton>

        Optional callback to process individual results. When given, the outcome of every script type is passed to it as it happens (a failed script type as an error that names it, with the cause nested) and a failed script type does not throw: the script types that could be imported are returned. Without it, the failures are collected and thrown as one error after every script type was tried.

      Returns Promise<ScriptTypeSkeleton[]>

      the imported script types

    • Read the bindings (available objects/APIs, e.g. httpClient, idRepository) exposed to scripts running in a given scripting context.

      Parameters

      • context: string

        scripting context id, e.g. SCRIPTED_DECISION_NODE

      Returns Promise<ScriptBinding[]>

      a promise that resolves to an array of script bindings