Skip to content

This provides a set of sub-tasks and flows to implement TM Forum OpenAPI Notifications

License

Notifications You must be signed in to change notification settings

IntelligentAutomationCommunity/TMF-Notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

TMF-Notifications

This provides a set of sub-tasks and flows to implement TM Forum OpenAPI Notifications functionality. Client Cortex automation flows that wish to utilise this functionality have the following entry points:

  1. The TMF-Notification-Register-Listener subtask is used to register a listener
  2. The TMF-Notification-Unregister-Listener subtask is used to unregister a listener
  3. The TMF-Notification-Create-Event subtask is used to create a TM Forum notification event. The client Cortex automationflow should add the output from this subtask to a list.
  4. The TMF-Notification-Notify-Listeners-Event-List Cortex automation Flow should be executed (probably asynchronously), passing the list as an input parameter.

TMF-Notification-Register-Listener

This subtask accepts the following parameters:

Input parameter Name Description Type M/O
i_callback The URL to which TM Forum event notifications will be sent Text M
i_query The query parameters which will affect both which events will be selected for notifications, and the content of the notifications Text O

The subtask returns the following parameters:

Output parameter Name Description Type
o_listener-id The unique id for this listener Text

TMF-Notification-Unregister-Listener

This subtask accepts the following parameters:

Input parameter Name Description Type M/O
o_listener-id The id for the listener Text M

The subtask returns no parameters.

TMF-Notification-Create-Event

This subtask accepts the following parameters:

Input parameter Name Description Type M/O
i_eventType The name of the event (e.g., PartyPrivacyProfileCreateEvent) Text M
i_title The title of the event Text O
i_description The description of the event Text O
i_priority The priortity of the event Text O
i_correlationId The corrlation id of the event Text O
i_domain The domain of the event Text O
i_related-object The TM Forum object related to the event Structure M
i_related-object-type The type of the related object (e.g. PartyPrivacyProfile) Text M
i_related-object-specification The structure-to-JSON mapping for the related object, as described in the CTX-Convert-to-JSON repository Structure M

The subtask returns the following parameters:

Output parameter Name Description Type
o_TMF-Event-Notification An internal representation of the event Structure

TMF-Notification-Notify-Listeners-Event-List

This flow should be started to issue notifications to listeners. It accepts the following input parameters:

Input parameter Name Description Type M/O
i_event-list A list of the structures returned by multiple calls to the TMF-Notifications-Create-Event subtask List M

No output parameters are returned.

Listeners

Listeners should be inserted into the TMF-Listener table; only listeners which have a null deleteTime field value will be notified.

Query fields

This notification implementation supports use of the query field in the the URL of the Listener registration request. Listeners may elect to query on top-level fields in either the event or the related object; e.g. setting eventType=PartyPrivacyProfileCreateEvent&event.id=12345678-ABCF-ABCD-ACBD-12345678 will result in receiving notifications when a PartyPrivacyProfile with id value 12345678-ABCD-ABCD-ABCD-12345678 is created.

Response filtering

This notification implementation supports the use of the fields element in the URL of the Listener registration request, which is provided within the i_query parameter to the TMF-Notification0Register-Listener subtask. If the fields element is not present, then all fields in both the event and the related object are included in the notification. If fields is present and set to none then only the id and href of the event object will be issued in the notification. Otherwise, fields is a list of top-level fields in either the event or the related object that wil be included in the notification. For example, including fields=eventType,event.id,event.creationDate in the Listener registration will cause notifications to include just the eventType field of the event, and the id and creationDate field of the related event.

Installation Instructions

This package utilises functionality from the following packages;

  1. CTX-Configuration-Store
  2. CTX-Logging
  3. CTX-Convert-to-JSON

Download the three SQL table creation scripts, and execute them to create the tables in a database. Modify the ConnectionString configuration variable in the TMF-Notifications area of the CTX-Configuration-Store. Download the Studio Package file and Import it into your Cortex Environment. Autogenerate any required subtasks for TM Forum OpenAPIs; extend the state Notify-Listener in the flow TMF-Notification-Notify-One-Listener to handle the specific notifications required, following the approach outlined for the PartyPrivacyProfile related notifications Modify Don't forget to apply rights using the Studio Authorization module.

๐Ÿ‘ Enjoy! ๐Ÿ˜‰

About

This provides a set of sub-tasks and flows to implement TM Forum OpenAPI Notifications

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages