Alternatives to ProcessBreak & Avoiding Error Logs

Ideas and tips for enhancing your TM1 application
Post Reply
pmakulski
Posts: 60
Joined: Mon Jun 06, 2011 6:07 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2010

Alternatives to ProcessBreak & Avoiding Error Logs

Post by pmakulski »

I have a Chore set up to run every 5 minutes. The process does something if it finds a trigger.
In the Prolog, I determine if there are any triggers
NumberofProcesses = SubsetGetSize( '}Processes' , 'ToRun' );
If there are none, it calls a ProcessBreak
IF( NumberofProcesses = 0 );
ProcessBreak;
ENDIF;

This works as I want except it puts the following into the messagelog:
3048 [] ERROR 2012-03-12 11:53:10.039 TM1.Process Process "zRunTriggeredProcesses": finished with ProcessBreak

I would really prefer that it not call this an ERROR, since it is an expected condition of no interest.
Is there any way to use ProcessBreak without causing an error message in the log?

9.5.2
User avatar
Martin Ryan
Site Admin
Posts: 1988
Joined: Sat May 10, 2008 9:08 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010
Location: Wellington, New Zealand
Contact:

Re: Alternatives to ProcessBreak & Avoiding Error Logs

Post by Martin Ryan »

Would it be possible to nest everything in an if stmt? You could do that in the prolog/epilog, then in the metadata/data tab have an if statement at the top that says
if(numberofprocesses=0, itemskip, 0);

Not ideal, but will get rid of that message for you.

Martin
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: Alternatives to ProcessBreak & Avoiding Error Logs

Post by rmackenzie »

In the Prolog, I determine if there are any triggers
NumberofProcesses = SubsetGetSize( '}Processes' , 'ToRun' );
If there are none, it calls a ProcessBreak
IF( NumberofProcesses = 0 );
If you have the process data source set to the 'ToRun' subset of the '}Processes' dimension then you don't need to do anything at all. Where it is the case that the 'ToRun' subset is empty then the Prolog will execute and go directly to the Epilog as there are no records (i.e. subset elements) to process during the Metadata and Data tabs - meaning your IF statement and the ProcessBreak are redundant anyway.
Robin Mackenzie
lotsaram
MVP
Posts: 3652
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Alternatives to ProcessBreak & Avoiding Error Logs

Post by lotsaram »

Another option along the same line as Robin's point is if your trigger condition is not met that you can set the data source type in the prolog to NULL which means the meta data and data won't execute and the code will go straight to the epilog after the prolog. In other words more or less the same effect as a ProcessBreak but without any error message, this can be a useful strategy if your data source is not empty but you don't want to process it. This is a better alternative than Martin's suggestion which would still process the data source but just not do anything (sorry Martin.)
Post Reply