public static void validateNotSingleJobInstance(String definition, Collection<String> jobInstances) {
		JobSpecification jobSpecification = null;
		try {
			JobParser parser = new JobParser();
			jobSpecification = parser.parse(definition);
		} catch (JobSpecificationException e) {
			return; //failed to parse.
		}
		if (jobSpecification.getJobReferences().size() == 1) {
			String jobName = jobSpecification.getJobReferences().get(0).getName();
			if (jobInstances.contains(jobName)) {
				throw new IllegalStateException(String.format(
						"Job Instance specified  %s must use transitions.  Or just " +
								"launch the job instance directly", jobName));
			}
		}
	}
Throws exception if user tries to create a single job instance with no transitions.
@param definition the definition to be validated
@param jobInstances collection of available job instances
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/job/dsl/ComposedJobUtil.java