Uploaded image for project: 'mod-orders-storage'
  1. mod-orders-storage
  2. MODORDSTOR-275

Implement Kafaka consumer for EDI export job finish message

    XMLWordPrintable

Details

    • Story
    • Status: Closed (View Workflow)
    • P2
    • Resolution: Done
    • None
    • 13.2.0
    • None

    Description

      Purpose/Overview:
      On first phase user should have ability to filter POL by last EDI export date

      Requirements/Scope:

      1. Create Kafka consumer for handling EDI export job events
      2. Update last EDI export date in the POL
      3. Save export history in the "export_history" table (scope MODORDSTOR-274)
      4. Save last exported date in the POLs

      Approach:
      Take a look mod-invoice or mod-data-export-spring as examples

      Schema of the export_history:

      {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Export orders or order lines history",
        "type": "object",
        "properties": {
          "id": {
            "description": "UUID of this history record",
            "$ref": "../../common/schemas/uuid.json"
          },
          "exportType": {
            "description": "UUID of the export Job",
            "$ref": "../../common/schemas/uuid.json"
          },
          "exportJobId": {
            "description": "Free form commentary",
            "type": "string"
          },
         "exportDate": {
            "description": "Export date",
            "type": "string",
            "format": "date-time"
          },
          "exportedPoLineIds": {
            "description": "References the purchase order lines associated to the export",
            "id": "exportedPoLineIds",
            "type": "array",
            "items": {
              "description": "UUID of the purchase order line",
              "type": "string"
            }
          }
        },
        "additionalProperties": false,
        "required": [
          "exportType",
          "exportJobId",
          "exportDate"
        ]
      }
      
      

      Sample:

      {
        "id": "99fb699a-cdf1-11e9-a9d9-f2801f1b9aa1",
        "exportType": "EDIFACT_ORDERS_EXPORT",
        "exportJobId": "22fb627a-cdf1-11e8-a8d5-f2801f1b9aa1",
        "exportDate": "2020-12-25",
        "exportedPoLineIds": [
          "11fb627a-cdf1-11e8-a8d5-f2801f1b9fd1",
          "11fb627a-cdf1-11e8-a8d5-f2801f1b9fd2",
          "11fb627a-cdf1-11e8-a8d5-f2801f1b9fd3",
          "11fb627a-cdf1-11e8-a8d5-f2801f1b9fd4"
        ]
      }
      
      

      Acceptance criteria:

      • Consumer created
      • Unit tests added
      • API/Postman collection for testing created

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                siarhei_hrabko Siarhei Hrabko
                siarhei_hrabko Siarhei Hrabko
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases