Uploaded image for project: 'mod-notify'
  1. mod-notify

Change "mod-notify" for preparing and sending email messages



    • Story
    • Status: Closed (View Workflow)
    • P3
    • Resolution: Done
    • None
    • 2.0.0
    • EPAM-Veg Sprint 2, EPAM-Veg Sprint 3
    • 8
    • Vega



      mod-notify should be changed to support the sending and forming of messages using of all available delivery channels.
      The module must provide a simple API for sending a message and creating sending events
      When creating a notification, it will provide the ability to specify which event bound with message, the links to the data that are required for the template engine.
      mod-notify must act as a facade for sending any notifications, use the template engine to generate a message, and delegate the sending of messages to the mod-sender
      Delivery channel will be taken from userData or getting it from eventConfiguration

      Functional flow for sending notification

      • POST the new notification to mod-notify
      • mod-notify start prepareing data for sending message
      • If notify have a eventConfigId and delivery channel is “email” or another except of “inApp”, then get eventConfig from mod-event-config.
      • If notify request have context or contextLinks, then get template id from eventConfig.
      • Call mod-template engine with template id and context for getting a prepared message.
      • Load from userData sender’s and recipient's delivery data (email/phone/etc) and preferable delivery channel for recipient
      • Form message and call to mod-sender for sending notifications using delivery channels.
      Request example

      "recipientId": "a049c22f-694b-41cf-a3b4-8eefd3685cdd",
      "eventConfigId": "d191d212-8f95-496a-9a45-2f2c22812535",
      "lang" : "en",
      "context": {

      { "name": "Alex" }



      Text field should be used only we dont need to generate message from template using context.
      It should be a possibility setup context as object or like a links to entities at the FOLIO system. If it links, mod-notify load data and generate context object for sending it to mod-template-engine.
      EventConfig entity store a information about template, so if eventConfigId is not specified at request, mod-notify shouldn’t send message to mod-sender. Also, update of notification entity this action shouldn’t sending new message to mod-sender.

      Acceptance Criteria

      GIVEN mod-notify is changed for sending all types of messages
      WHEN POST request with notify entity to mod-notify
      THEN message will be generated from template and context
      THEN message will be delivered to recipient using delivery channel setuped at the eventConfig

      • unit test are created and passed

      TestRail: Results


          Issue Links



                kgambrell Khalilah Gambrell
                OleksiiKuzminov Oleksii Kuzminov
                0 Vote for this issue
                1 Start watching this issue



                  TestRail: Runs

                    TestRail: Cases