Page 1 of 1
ProcessQuit Error
Posted: Fri May 02, 2014 12:37 pm
by krithika331
TM1 Version 10.2.
In the TI process, the processQuit command executed correctly and the values got updated in the Cube as per the code. After the process is completed it throws an error and when I check the Error Log it shows an error of the child process used but the Log file error for the Child process is not present in the Error Logs. The values in the Cube are updated as expected but donot why the process is generating an error. I have searched the forums and used the Processbreak also but here the values are comming wrongly but I am not getting Error. Any ideas??
Thanks in Advance.
Re: ProcessQuit Error
Posted: Sat May 03, 2014 5:17 am
by EvgenyT
Hi there,
Obviously if TI throws an error then ProcessQuit is doing what its meant to do: terminates the process.
Post the TI code and error log for us to be able to help
Thanks
Re: ProcessQuit Error
Posted: Tue May 06, 2014 1:00 am
by dweebernot
If you are using a process quit as part of your code, the process quits and displays an error. If you use a Process break, the process will still run the epilog and complete without an error. Please specify, your code and at which tab the process quit/break is used.
Re: ProcessQuit Error
Posted: Thu May 15, 2014 12:52 pm
by krithika331
Hi Everyone,
I have two Processes (Process1, Process2) which are required to calculate the YTD value for a measure. The measure dimension has the elements Measure1, YTD_Measure1. The Date dimension has the structure ( Year -> Month -> WeekDate). Process1 will calculate the YTD for the current period. If the date is not the first period (Day number=1) , it will pick the prior period YTD value and adds to the Current period measure value ( achieved by process2 , which is called in Process in epilog) and displays the YTD for the current Period. If the date is the first period, then Process2 is executed and processquit happens. So I am using the ProcessQuit funtion in the Prolog of Process1. The YTD values are getting updated correctly, but it throws the error after the process is completed. In the Error logs, there is no log file which details about the error. When I use the Processbreak instead of ProcessQuit, I don't get the error but the value gets doubled for the first period because the process2 is called in Epilog. I cannot use the Processbreak function because my logic will double the value. Any idea how to overcome the problem of ProcessQuit. The calculation of logic is working correctly but threws the error. I am looking for an Error free code. Any ideas??
Thanks in Advacne
Re: ProcessQuit Error
Posted: Thu May 15, 2014 2:50 pm
by dan.kelleher
Hi,
Firstly, may I ask why you are calculating your YTD as part of a TI process? This is something that is done really easily using consolidations in your time dimension (simplified to months in the example below):
2014_04_YTD (Consolidation)
2014_01 (weight 1)
2014_02 (weight 1)
2014_03 (weight 1)
2014_04 (weight 1)
If you wanted to show this as a separate measure, I would then use rules to transpose it across to your measures dimension:
Code: Select all
['YTD_Measure1'] =
DB('cube', dim1, dim2, ..., !time | '_YTD', 'Measure1');
If you do decide to do this in a process, you can use IF statements and a flag variable to control what sections of code gets executed. Do you even need 2 processes?
Re: ProcessQuit Error
Posted: Thu May 15, 2014 3:26 pm
by krithika331
Thanks for the reply.
Actually I need to show YTD as a separate measure and want to do it through the TI process. I have used the IF statement in applying the logic. How does the flag variable control the section of the code. Can you please tell me.
Below is what used:
IF ( ATTRS ( 'yDate', x, 'DayNo' ) @='1' );
ExecuteProcess ( 'Process2, 'x', x );
ProcessQuit;
ELSE;
period_bf= ATTRS ( 'yDate', x, 'Period_last' );
SubsetElementInsert ( 'ydate', 'datesubset1', period_bf, 1 );
ENDIF;
Thanks in advance
Re: ProcessQuit Error
Posted: Thu May 15, 2014 6:06 pm
by dan.kelleher
Maybe I'm misunderstanding what you're trying to do but something like the below may suffice:
IF ( ATTRS ( 'yDate', x, 'DayNo' ) @='1' );
ExecuteProcess ( 'Process2, 'x', x );
vnRunProcess2 = 0;
ELSE;
period_bf= ATTRS ( 'yDate', x, 'Period_last' );
SubsetElementInsert ( 'ydate', 'datesubset1', period_bf, 1 );
vnRunProcess2 = 1;
ENDIF;
# And in the epilog
If(vnRunProcess2 = 1);
ExecuteProcess(...);
EndIf;