private async Task ValidateJobTasks(JobDefinition jobDefinition, CancellationToken cancellationToken = default(CancellationToken)) { try { var tasks = await _jobDefinitionService.GetJobTaskDefinitions(jobDefinition.Id, cancellationToken : cancellationToken); foreach (var task in tasks) { await _jobDefinitionService.ValidateJobTaskDefinition(jobDefinition, task, cancellationToken : cancellationToken); } } catch (Exception ex) { throw new TaskValidationException(jobDefinition.Name, ex.Message, ex); } }