@Test public void instance() throws Exception { final JobInstanceMojo mojo = mojo(JobInstanceMojo.class); final long id = mojo.getOrCreateOperator().start("simple", null); waitForEnd(mojo.getOrCreateOperator(), id); mojo.executionId = id; mojo.execute(); final String output = BatchEEMojoTestFactory.output(mojo).toLowerCase(Locale.ENGLISH); assertTrue(output.contains("job name for execution #0: simple")); }
@Override public void execute() throws MojoExecutionException, MojoFailureException { final JobInstance instance = getOrCreateOperator().getJobInstance(executionId); getLog().info("Job name for execution #" + executionId + ": " + instance.getJobName()); }
JobInstanceMojo extends BatchEEMojoBase { @Override public void execute() throws MojoExecutionException, MojoFailureException { final JobInstance instance = getOrCreateOperator().getJobInstance(executionId); getLog().info("Job name for execution #" + executionId + ": " + instance.getJobName()); } }
JobInstanceMojo extends BatchEEMojoBase { @Override public void execute() throws MojoExecutionException, MojoFailureException { final JobInstance instance = getOrCreateOperator().getJobInstance(executionId); getLog().info("Job name for execution #" + executionId + ": " + instance.getJobName()); }  }
JobInstanceMojo extends BatchEEMojoBase { @Override public void execute() throws MojoExecutionException, MojoFailureException { final JobInstance instance = getOrCreateOperator().getJobInstance(executionId); getLog().info("Job name for execution #" + executionId + ": " + instance.getJobName()); }  @Override void execute(); }
JobInstanceMojo extends BatchEEMojoBase { @Override public void execute() throws MojoExecutionException, MojoFailureException { final JobInstance instance = getOrCreateOperator().getJobInstance(executionId); getLog().info("Job name for execution #" + executionId + ": " + instance.getJobName()); }  @Override void execute();  }