private createWorkflow()

in cdk/lib/partners/ACE.ts [48:75]


    private createWorkflow(): Choice {
        const lambdaDependencies = new lambda.LayerVersion(this, "LambdaLayer", {
            code: lambda.Code.fromAsset(path.join(__dirname, "..", "..", "..", "src", "lib")),
            compatibleRuntimes: [lambda.Runtime.NODEJS_12_X],
            description: `Dependencies required to process files for Partner: ${this.providerIdentifier}`,
            license: "Apache-2.0",
        });

        const NoAction = new Pass(this, `${this.providerIdentifier}-NotEntitled`, {
            result: Result.fromObject({
                Provider: this.providerIdentifier,
                Status: "IGNORED"
            })
        });

        const ImageProcessing = this.createImageProcessingTaskAndRequiredResources(lambdaDependencies);
        const MetadataProcessing = this.createMetadataProcessingTaskAndRequiredResources(lambdaDependencies);
        const VideoProcessing = this.createVideoConvertTaskAndRequiredResources(lambdaDependencies);
        const Postprocessing = this.createPostProcessingTask(lambdaDependencies);

        const ProviderACEParallelProcessing = new Parallel(this, `${this.providerIdentifier}-ParallelSteps`)
            .branch(ImageProcessing, MetadataProcessing, VideoProcessing)
            .next(Postprocessing);

        return new Choice(this, this.providerIdentifier)
            .when(this.isProviderEnabled(), ProviderACEParallelProcessing)
            .otherwise(NoAction);
    }