Page 1 of 1

ProcessBreak

Posted: Mon Mar 12, 2012 4:00 pm
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

Re: ProcessBreak

Posted: Mon Mar 12, 2012 4:16 pm
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.

Re: ProcessBreak

Posted: Mon Mar 12, 2012 10:05 pm
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

Re: ProcessBreak

Posted: Mon Mar 12, 2012 10:33 pm
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.

Re: ProcessBreak

Posted: Tue Mar 13, 2012 8:02 am
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.)

Re: ProcessBreak

Posted: Tue Mar 13, 2012 12:13 pm
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?

Re: ProcessBreak

Posted: Tue Mar 13, 2012 12:59 pm
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