How to use the @aws-cdk/aws-stepfunctions.Condition.numberGreaterThan function in @aws-cdk/aws-stepfunctions

To help you get started, we’ve selected a few @aws-cdk/aws-stepfunctions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github guardian / editions / projects / aws / lib / step-function.ts View on Github external
task: new tasks.InvokeFunction(event),
        },
    )

    failTask.next(new sfn.Fail(scope, 'publication-failed'))
    ;[issueTask, frontTask, imageTask, uploadTask, zipTask, indexerTask].map(
        (task: sfn.Task) => task.addCatch(failTask, { resultPath: '$.error' }),
    )
    //Fetch issue metadata
    issueTask.next(frontTask)

    frontTask.next(imageTask)

    const remainingFronts = new sfn.Choice(scope, 'Check for remaining fronts')
    remainingFronts.when(
        Condition.numberGreaterThan('$.remainingFronts', 0),
        frontTask,
    )
    remainingFronts.otherwise(uploadTask)

    imageTask.next(remainingFronts)

    uploadTask.next(zipTask)

    zipTask.next(publishedTask)

    publishedTask.next(indexerTask)

    indexerTask.next(new sfn.Succeed(scope, 'successfully-archived'))

    const archiverStateMachine = new sfn.StateMachine(
        scope,