Project and Portfolio Management Practitioners Forum
cancel

How to generate dynamic notifications on the fly?

Highlighted
TurboMan
Honored Contributor.

How to generate dynamic notifications on the fly?

Hi,

 

Is there any way to generate dynamic notifications on the fly?

Or maybe there is a special Mail send command in the WorkBench?

Any help is appreciated.

 

Regards

T.M.

7 REPLIES
Mohit_Agrawal
Outstanding Contributor.

Re: How to generate dynamic notifications on the fly?

Hi TM,

 

The notifications can be send in the following ways:

 

1) Configure the notification in Notifications tab of the workbench for any request type

2) Configure the notification at any workflow step (Edit and go to -> Notifications tab)

3) You can send notifications from Database end.

 

Now if your requirement is to send the notifications depending on some dynamic condition then you can achieve this by creating any function/procedure at DB end, which will check for the condition and send the notification. 

 

Thanks!!

Mohit Agrawal

 

d4y4n4
Honored Contributor.

Re: How to generate dynamic notifications on the fly?

Hi TM,
Can you provide an example of what you are trying to do? In which action do you want the notification to be send?

Regards,
Dayana
TurboMan
Honored Contributor.

Re: How to generate dynamic notifications on the fly?

Hi Dayana,

 

Defining the notifications in the WB is too static and to work with WB is cumbersome and it is too sluggish.

That's why, instead of defining in the notification tabs, I would like to keep those messages in some tables and in the execution steps willing to send.

Then I will be able to manage the notifications before sending.

I noticed there is a package called KNTA_NOTIFICATION which does this kind of things, but could not figure out how?

 

Regards

T.M.

Mohit_Agrawal
Outstanding Contributor.

Re: How to generate dynamic notifications on the fly?

Hi TM,

 

The KNTA_NOTIFICATIONS table actually stores the definition of each notification created by the User and this table stores the notifications and their timestamps, which are sent by the application.

 

I dont this you can use this for sending the notifications. However you can create any function/procedure to create the notification and use the func/proc in execution steps in the workflow. That will be easier.

 

Thanks!!

Mohit Agrawal

Vibhor_Dwivedi
Contributor.

Re: How to generate dynamic notifications on the fly?

For creating your own notification system you can use execution steps and call the sql function to trigger emails using the oracle utl_smtp  package.

 

other way could be database triggers to trigger the notification based on the DB transactions.I find PPM notifications ok.

TurboMan
Honored Contributor.

Re: How to generate dynamic notifications on the fly?

Hi,

 

There must be an easier way.

There is a PPM ORACLE package called KNTA_NOTIFICATION and a procedure named Notify.

I've figured out this procedure (Notify) does all the jobs, but I could not figure out how?

May be there is someone more experienced who can shed a light on me on how to use the package KNTA_NOTIFICATION.

 

Regards

T.M.

 

d4y4n4
Honored Contributor.

Re: How to generate dynamic notifications on the fly?

Hi TM,

We do not have information on how to use the package, however here are some info about how notifications will be sent from HP PPM

The notifications created in the PPM application will be present in the KNTA_NOTIFICATIONS table, however, the records in that table will be cleared after some time based on the service running internally. So, if we have mentioned the recipients in any notification setup, then the record will be created in the KNTA_NOTIF_TXN_RECIPIENTS table. All the notifications created in the PPM application, will be created in the KNTA_NOTIFICATIONS table based on the NOTIFICATION_TYPE_ID i.e. type of notification created for timesheet/requests/reports/projects etc. The details of the notifications will be present in the KNTA_NOTIFICATIONS table and the notification type details will be present in the KNTA_NOTIFICATION_TYPES table.

For troubleshoot:

There is a way to check if the notifications were correctly created by running the following SQL queries:

1: Select * from knta_notif_txn_parents where notification_sent_flag='N'
In the table called "knta_notif_txn_parents" all notifications are listed. If the "notification_sent_flag" is set to "N", the notification was correctly created but rejected by the mail server.

2: Select * from knta_notif_txn_parents where notification_sent_flag='Y'
If the notification is listed in this output it was correctly created and not rejected by the mail server.
For example:

If 20 entries are found in that table before and after the execution of the notification step 21 entries can be found the creation and sending of notifications to the mail server works fine.
If the creation and sending of notifications to the mail server works fine, the following line should be entered in the logging.conf: com.kintana.core.logging.PRODUCT_FUNCTION_LOGGING_LEVEL = com.kintana.core.notifications, DEBUG
Then, let the notification step trigger again and have a look at the server.log files.

To check if a task or project have notifications set, Within the Workplan, there is an option that shows if Notification has been tagged for a task. Under the Actions tab, Configure Indicator Columns, click the option of show notifications. This will give at a glance within the Workplan what notifications are setup

This SQL can be used to return all the workflow steps (Decision and Execution workflow steps defined on Request type and Package type workflows) on which notifications are defined. This can mostly be used for debugging issues dealing with notifications not being sent out.

This will return all the workflow steps with notifications defined on them:
Usage Details: In the nn.notification_type_id filter of the SQL 1 corresponds to Notificatiosn from packages, 2 for requests and 6 for request field changes.

select distinct ww.workflow_name, wws.sort_order "Step No",
wws.step_name
from KWFL_WORKFLOWS ww,
KWFL_WORKFLOW_STEPS wws,
KNTA_NOTIFICATIONS nn,
KNTA_USERS nu
where ww.enabled_flag = 'Y'
and ww.workflow_id = wws.workflow_id
and wws.workflow_step_id = nn.condition_value
and nn.condition_value is NOT NULL
and nn.enabled_flag = 'Y'
and nn.notification_type_id in (1,2,6)
order by ww.workflow_name, wws.sort_order

To Truncate notifications
In order to purge email notifications from workflows, you can use the Truncate Syntax command on the tables associated with the notifications. The tables to truncate to remove all notifications are the following:
KNTA_NOTIF_TXN_COLUMNS
KNTA_NOTIF_TXN_DETAILS
KNTA_NOTIF_TXN_RECIPIENTS
KNTA_NOTIF_TXN_PARENTS
The syntax to use is 'TRUNCATE TABLE [TABLENAME]'. It is better to use truncate instead of deleting all the rows because truncate leaves the table's settings in a better state in terms of performance. The TURN_ON_NOTIFICATIONS and ENABLE_TIME_SHEET_NOTIFICATIONS_SERVICE server.conf parameters control whether to run the services to send out the notifications queued up. It does not stop notifications from queuing up.

Regards,
Dayana