Skip to content

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 NameDescriptionTypeM/O
i_callbackThe URL to which TM Forum event notifications will be sentTextM
i_queryThe query parameters which will affect both which events will be selected for notifications, and the content of the notificationsTextO

The subtask returns the following parameters:

Output parameter NameDescriptionType
o_listener-idThe unique id for this listenerText

TMF-Notification-Unregister-Listener

This subtask accepts the following parameters:

Input parameter NameDescriptionTypeM/O
o_listener-idThe id for the listenerTextM

The subtask returns no parameters.

TMF-Notification-Create-Event

This subtask accepts the following parameters:

Input parameter NameDescriptionTypeM/O
i_eventTypeThe name of the event (e.g., PartyPrivacyProfileCreateEvent)TextM
i_titleThe title of the eventTextO
i_descriptionThe description of the eventTextO
i_priorityThe priortity of the eventTextO
i_correlationIdThe corrlation id of the eventTextO
i_domainThe domain of the eventTextO
i_related-objectThe TM Forum object related to the eventStructureM
i_related-object-typeThe type of the related object (e.g. PartyPrivacyProfile)TextM
i_related-object-specificationThe structure-to-JSON mapping for the related object, as described in the CTX-Convert-to-JSON repositoryStructureM

The subtask returns the following parameters:

Output parameter NameDescriptionType
o_TMF-Event-NotificationAn internal representation of the eventStructure

TMF-Notification-Notify-Listeners-Event-List

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

Input parameter NameDescriptionTypeM/O
i_event-listA list of the structures returned by multiple calls to the TMF-Notifications-Create-Event subtaskListM

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

Stars

0 stars

Watchers

0 watching

Forks

Packages

Contributors

Languages