Announcement Announcement Module
No announcement yet.
Adding custom parameters for app status Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding custom parameters for app status

    I need to add some custom parameters for each job run , like output file names, input files, count etc.
    Some of which are not already present in any of the contexts like stepcontext , jobcontext, etc

    What is best way to add these params , so that those are presisted in spring batch tables and can be retrieved using jobexplorer


  • #2
    I must be missing something. Why don't you use JobParameters?


    • #3
      These are runtime parameters which are generated dynamically and added at various steps.

      I can add most of the params in beforestep in stepcontext and jobcontext but is there any way of adding params at runtime so that those are presisted


      • #4
        The ExecutionContext is persisted. You can use ItemStream to manage the step-level context, and there are established patterns for transferring data to/from the job-level ExecutionContext. This is all covered in the user guide (, Since you mention stepContext and jobContext, I assume that is what you are already doing?