Batch Console: List *all* steps of a job execution, not just those which started or completed.

12 views
Skip to first unread message

ET92

unread,
May 5, 2017, 9:30:54 AM5/5/17
to trooper-users
I've looked at having a page "Steps for job=jobId..." similar to the "Step Executions for job=jobId ..." page but with all steps
listed to provide a kind of step queue overview where all steps of the job can be seen whether they have been executed or not.
The steps with a StepExecution can display the details of it, those (currently) without a StepExecution can just list the name of the step.
Can you provide a pointer to the code where this functionality can be added/changed?

Having the steps sorted in expected execution order would be needed (I recognize that there can be conditionals that complicate this).

Regunath Balasubramanian

unread,
May 6, 2017, 12:12:51 AM5/6/17
to ET92, trooper-users
This is a slightly involved effort as it requires understanding some of the Spring Batch admin library that we use internally and the classes that were written for Trooper Batch as well.
  • All the UI parts are implemented using Freemarker Template i.e. .ftl files. E.g. You will need to update /batch-core/src/main/resources/WEB-INF/web/layouts/html/navigation.ftl to include the "Steps for Job" link.
  • You will then need to implement the additional method for this in the MVC controller i.e. /batch-core/src/main/java/org/trpr/platform/batch/impl/spring/web/JobController.java for say processing a path like "/stepsForJob". Use methods from Trooper JobService.java and SimpleJobService.java to get the Steps for a Job. The JobService is the interface to all Job definitions and execution details.
  • Then add this MVC controller as a bean to /batch-core/src/main/resources/WEB-INF/servlet/manager/controller-context.xml.
By doing the above, you should have added the UI element, the MVC controller (with JobService integration) and declared it at the right place for the servlet container to recognize and process the request. That should do it.

Hope this helps.
Reply all
Reply to author
Forward
0 new messages