Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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,