Uploaded image for project: 'JBeret'
  1. JBeret
  2. JBERET-452

Make jobName and jobExecutionId optional in job schedule configuration

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 1.4.0.Final
    • 1.3.0.Final
    • jberet-rest-api
    • None

      when scheduling a batch job execution with jberet-schedule, currently the jobName attribute is required. This causes duplicate info for jobName to be in both the REST api path and schedule config attributes. For instance,

      curl -s -X POST -H 'Content-Type:application/json' -d '{"jobName":"numbers", "initialDelay":1, "interval":60}' "http://localhost:8080/numbers-chunk/api/jobs/numbers/schedule" | jq
      
      or, 
      
      /Users/cfang/dev/numbers-chunk > 
      curl -s -X POST -H 'Content-Type:application/json' -d '{"jobName":"numbers", "initialDelay":1, "interval":60}' "http://localhost:8080/api/jobs/numbers/schedule" | jq
      {
        "id": "1",
        "jobScheduleConfig": {
          "jobName": "numbers",
          "jobExecutionId": 0,
          "jobParameters": null,
          "scheduleExpression": null,
          "initialDelay": 1,
          "afterDelay": 0,
          "interval": 60,
          "persistent": false
        },
        "createTime": 1537830699404,
        "status": "SCHEDULED",
        "jobExecutionIds": []
      }
      
      

      User should be able to omit the jobName attribute in schedule config since the same info is already present in request path, which will make it easier to schedule job executions.

      The same problem exists with jobExecutionId attribute in job schedule configuration.

              cfang@redhat.com Cheng Fang
              cfang@redhat.com Cheng Fang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: