企业绩效管理网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 807|回复: 6

ProcessBreak

[复制链接]

86

主题

402

帖子

589

积分

高级会员

Rank: 4

积分
589
QQ
发表于 2014-3-16 18:16:25 | 显示全部楼层 |阅读模式
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
回复

使用道具 举报

73

主题

406

帖子

585

积分

高级会员

Rank: 4

积分
585
发表于 2014-3-16 19:37:47 | 显示全部楼层
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.
回复 支持 反对

使用道具 举报

94

主题

397

帖子

609

积分

高级会员

Rank: 4

积分
609
QQ
发表于 2014-3-16 20:42:22 | 显示全部楼层
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
回复 支持 反对

使用道具 举报

80

主题

399

帖子

573

积分

高级会员

Rank: 4

积分
573
QQ
发表于 2014-3-16 20:42:23 | 显示全部楼层
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.
回复 支持 反对

使用道具 举报

64

主题

404

帖子

556

积分

高级会员

Rank: 4

积分
556
QQ
发表于 2014-3-16 20:47:07 | 显示全部楼层
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.)
回复 支持 反对

使用道具 举报

87

主题

428

帖子

615

积分

高级会员

Rank: 4

积分
615
QQ
发表于 2014-3-16 21:00:14 | 显示全部楼层
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!   Can we put this one in the Tips and Tricks forum?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

93

主题

423

帖子

630

积分

高级会员

Rank: 4

积分
630
QQ
发表于 2014-3-16 21:46:20 | 显示全部楼层
Done, can be viewed at  and i have locked this thread to enable the discussion to continue over there  

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|企业绩效管理网 ( 京ICP备14007298号   

GMT+8, 2023-9-25 15:48 , Processed in 0.077117 second(s), 12 queries , Memcache On.

Powered by Discuz! X3.1 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表