Notification on macro failure?

Post Reply
bts050
Posts: 1
Joined: Wed Aug 18, 2010 7:09 pm
OLAP Product: TM1
Version: 9.5
Excel Version: 2003

Notification on macro failure?

Post by bts050 »

I have a macro scheduled to publish a series of models every hour, but often times the macro fails and I'd like to receive some kind of notification when it fails. There are about 10 macro steps (all publishes), and it fails at different points each time. Any thoughts on how to do set up notification on failure? Cognos Planning v8.4.2.
User avatar
mce
Community Contributor
Posts: 352
Joined: Tue Jul 20, 2010 5:01 pm
OLAP Product: Cognos TM1
Version: Planning Analytics Local 2.0.x
Excel Version: 2013 2016
Location: Istanbul, Turkey

Re: Notification on macro failure?

Post by mce »

Hi,
There is a table in Planning Store that stores the macro status information, such as failed, succeeded ...etc, as well as the macro error information if it errored.
- Create a Framework Manager package that points to this table, and publish it to Cognos 8 Connection.
- Then create Report Studio or Query Studio Report that displays the content of this table for Failed macros.
- Then create an Event Studio Event Job that checks this table and if finds any new errors, runs the report that you created and sends it in an email to a list of people.
- Then schedule the Event Studio Job to run every 1 hour, so that it will check every hour if there is any new errors and will send the email accordingly.
This approach works well.

Kind regards,
usagimd
Posts: 16
Joined: Mon Jan 24, 2011 12:41 pm
OLAP Product: TM1, Cognos Planning and BI
Version: 9.5
Excel Version: 2010
Location: PoA - Br

Re: Notification on macro failure?

Post by usagimd »

To minimize errors while publishing (in Analyst) use a step called "Delay" with around 10 seconds, depending on the size of the cube that is going to be published.

Look if this fits your need for notification without causing problems in the project (considering you are Publishing with Analyst):

1 - Create a .bat file to write a .txt, using one param that you can call "PublishingCube" or something like that.

2 - After each publish step on the macro place a step for a macro execution calling the macro of the step 1 of this post and the name of the last cube published.

3 - Create an event on Event Studio to send an e-mail notifying about the error, schedule it to run by trigger.

4 - Create another .bat to test the .txt created with the first .bat file testing if all cubes where published, if not, trigger the event to send an e-mail.

5 - On the event scheduled for one hour add another step to run the second .bat file after the publish (I don't know if you can run a macro directly from events but if not, you can call a macro from Analyst).

I'm looking for something to help you with the second .bat file maybe till there i'll be able to see id it'll help if it won't I won't post
Matheus Dewes
Developer/Consultant
usagimd
Posts: 16
Joined: Mon Jan 24, 2011 12:41 pm
OLAP Product: TM1, Cognos Planning and BI
Version: 9.5
Excel Version: 2010
Location: PoA - Br

Re: Notification on macro failure?

Post by usagimd »

Hello again,

I think it may help:

http://bicentre.blogspot.com/2009/04/tr ... nally.html

Best regards,
Matheus Dewes
Developer/Consultant
Post Reply