Monday, September 14, 2020

#800 OIC Technical Accelerator - Alert Notifications

What is it?

A technical accelerator package that allows one to send Alert Notifications from your integrations, based on a variety of parameters - 
  • channels - EMAIL, Pager, JIRA, Custom
  • integrations - different channels/recipents for different integrations etc.
  • Errors/Failure Messages -  different channels/recipients based on the error message thrown etc.
Ergo, this technical accelerator is designed to be called from one or more of your integrations.

What's in it?

The Accelerator contains the following artifacts -

  • integration - Oracle Alerting Service
  • connection - Oracle altering Service Invoke
  • lookups - 3 of them - discussed below.

Lookups -

The first lookup contains details of who should be informed and how -

The second lookup specifies the channel(s) to be used for each integration -

The third and final lookup allows one to specify the channel, based on error type/Nr -

Let's look at the Integration -

Anatomy of the Integration

REST Trigger Request Payload -

messageID is the error message id, thrown by the integration.

assign_notificationType - create variables and assign initial values to some of them

Scope by Scope...


Here the variable are set to the request values, where the latter is not null.
integration variable var_integrationcodeversion is set to request IntgCode_Version

This assign action below leverages the Lookup - ORCL-T-GENRIC_ENS_NOTIFICATION_SELECTOR -

to set var_NotificationType, based on the version of the integration, i.e.
request parameter - IntgCodeVersion

Simple stuff!


This scope sets the var_instanceID and then leverages the Lookup -
to set var_notificationType and var_Subject.

Email_Scope -

This scope sets the Email Address(es), leveraging the Lookup -
ORCL-T-GENRIC_ENS_NOTIFICATION_DATA and then sends the email.


This scope sets the Pager fields, leveraging the Lookup -
ORCL-T-GENRIC_ENS_NOTIFICATION_DATA and then creates the pager duty incident.

JIRA_Scope - 

This scope sets the JIRA fields, leveraging the Lookup -
ORCL-T-GENRIC_ENS_NOTIFICATION_DATA and then creates the JIRA ticket.

CustomService_Scope -

notificationType="CUSTOM" -
This scope is essentially a placeholder for you to do your own custom processing.

Leveraging the Technical Accelerator

First step is to clone the base integration -

and then Activate it.

Next step is to review the request payload - 

I will need to pass the above payload to the Alerting Service integration.

Now to the calling integration - 

I will add a Global Fault Handler to this integration later.

The Lookups will need to be amended for my AA-BigFileTest integration - 

Ok, so back to my calling integration - 

I add a Global Fault handler that calling the Alerting Service -

Mapping -

Mapping Test result -

This integration simply copies a file from one ftp directory to another -
The file is called testFile.xml.

I delete this file from the ftp source directory - this will cause an error.

Here is the output of my test -

Here is the email I received - 

No comments: