ProcessBreak

Locked
pmakulski
Posts: 60
Joined: Mon Jun 06, 2011 6:07 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2010

ProcessBreak

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
Steve Vincent
Site Admin
Posts: 1054
Joined: Mon May 12, 2008 8:33 am
OLAP Product: TM1
Version: 10.2.2 FP1
Excel Version: 2010
Location: UK

Re: ProcessBreak

Post by Steve Vincent »

Annoyingly, no. The only way to control messages is via the server config and the next level down is near as damn it nothing gets logged at all. I'd like to suppress messages on certain chores and can't so the log file gets bunged up with 1000s fo unwanted entries.
If this were a dictatorship, it would be a heck of a lot easier, just so long as I'm the dictator.
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet
User avatar
Martin Ryan
Site Admin
Posts: 1989
Joined: Sat May 10, 2008 9:08 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010
Location: Wellington, New Zealand
Contact:

Re: ProcessBreak

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: ProcessBreak

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: 3702
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: ProcessBreak

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.)
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: ProcessBreak

Post by tomok »

lotsaram wrote: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.)
Oooooohh...me likey! :ugeek: Can we put this one in the Tips and Tricks forum?
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
User avatar
Steve Vincent
Site Admin
Posts: 1054
Joined: Mon May 12, 2008 8:33 am
OLAP Product: TM1
Version: 10.2.2 FP1
Excel Version: 2010
Location: UK

Re: ProcessBreak

Post by Steve Vincent »

Done, can be viewed at http://www.tm1forum.com/viewtopic.php?f ... 357#p30357 and i have locked this thread to enable the discussion to continue over there :D
If this were a dictatorship, it would be a heck of a lot easier, just so long as I'm the dictator.
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet
Locked