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

Document the expected JSON format of batch job definition

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 1.3.0.Final
    • 1.3.0.Beta7
    • docs
    • None

      For xml batch job definition file, there is xml schema:
      http://xmlns.jcp.org/xml/ns/javaee/jobXML_1_0.xsd

      JSON format of batch job definition should be documented similarly, to define the expected structure of such JSON object. An example of a simple JSON job defition:

      {
        "job": {
          "id": "simple",
          "listeners": {
            "listener": [
              {
                "ref": "L1",
                "properties": {
                  "property": {
                    "name": "listener-prop",
                    "value": "listener-prop"
                  }
                }
              },
              { "ref": "L2" }
            ]
          },
          "step": [
            {
              "id": "simple.step1",
              "chunk": {
                "reader": {
                  "ref": "arrayItemReader",
                  "properties": {
                    "merge": "true",
                    "property": [
                      {
                        "name": "resource",
                        "value": "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]"
                      },
                      {
                        "name": "beanType",
                        "value": "java.lang.Integer"
                      }
                    ]
                  }
                },
                "writer": { "ref": "mockItemWriter" }
              }
            },
            {
              "id": "step2",
              "chunk": {
                "reader": { "ref": "arrayItemReader" },
                "writer": { "ref": "mockItemWriter" }
              }
            }
          ],
          "decision": {
            "id": "decision1",
            "ref": "decider2",
            "next": {
              "on": "next",
              "to": "step3"
            }
          }
        }
      }
      

              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: