Hello,
It maybe a strange question but is there any possibility of getting the return value from a TI process without executing it through executeprocess (in another TI process).
I would like to get the returnvalue (regarding the execute status) and get this information as a parameter to another TI process (in the prolog).
At the moment I'm able to get this using another TI process and the executeprocess command.
Thank you for the time and help,
Jorge
Getting TI returnvalue
-
- Posts: 67
- Joined: Fri Oct 14, 2011 3:15 pm
- OLAP Product: TM1
- Version: 10.2.2
- Excel Version: 13
- Location: Portugal
-
- Posts: 67
- Joined: Fri Oct 14, 2011 3:15 pm
- OLAP Product: TM1
- Version: 10.2.2
- Excel Version: 13
- Location: Portugal
Re: Getting TI returnvalue
Iocat,
I can assume that I must have always a "caller process" to obtain the returnvalue of the target TI process.
I was wondering if I could get the returnvalue at the end of the process to pass it to a global variable.
- ioscat
- Regular Participant
- Posts: 209
- Joined: Tue Jul 10, 2012 8:26 am
- OLAP Product: Contributor
- Version: 9.5.2 10.1.1 10.2
- Excel Version: 07+10+13
- Contact:
Re: Getting TI returnvalue
you can store a value in cube with just 1 cell.
- Harvey
- Community Contributor
- Posts: 236
- Joined: Mon Aug 04, 2008 4:43 am
- OLAP Product: PA, TM1, CX, Palo
- Version: TM1 8.3 onwards
- Excel Version: 2003 onwards
- Contact:
Re: Getting TI returnvalue
Jorge, there is always some calling process. Do you mean calling a process via the TM1 API?
Take your TM1 experience to the next level - TM1Innovators.net
-
- MVP
- Posts: 3706
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: Getting TI returnvalue
I think he means is it possible to query the last return state of a process regardless of when it was last executed and how it was executed. Others have asked this in the past too and the answer is of course NO, you have to declare a variable and set it equal to the process execute function.Lazarus wrote:Jorge, there is always some calling process. Do you mean calling a process via the TM1 API?
-
- Posts: 67
- Joined: Fri Oct 14, 2011 3:15 pm
- OLAP Product: TM1
- Version: 10.2.2
- Excel Version: 13
- Location: Portugal
Re: Getting TI returnvalue
Thank you.lotsaram wrote:I think he means is it possible to query the last return state of a process regardless of when it was last executed and how it was executed. Others have asked this in the past too and the answer is of course NO, you have to declare a variable and set it equal to the process execute function.Lazarus wrote:Jorge, there is always some calling process. Do you mean calling a process via the TM1 API?
I was thinking to same but wanted to be sure and avoid missing a solution.
Thanks again for the feedbacks and the help on this issue.
-
- MVP
- Posts: 733
- Joined: Wed May 14, 2008 11:06 pm
Re: Getting TI returnvalue
As the others have commented, your assumption is correct.jviegas@bi4all.pt wrote:I can assume that I must have always a "caller process" to obtain the returnvalue of the target TI process.
This however, is slightly different and somewhat possible. Although the return value is not available until the process has completed, it is possible within the Epilog to count the errors that occurred in the execution of the 3 preceding code tabs i.e. Prolog, Metadata, Data. Although you don't get the full range of information associated with the return code, you do get a basic test of whether the process ran without error versus ran with some minor errors.jviegas@bi4all.pt wrote:I was wondering if I could get the returnvalue at the end of the process to pass it to a global variable.
TI exposes 3 variables for this purpose - the doco calls them global variables that can be used within a chore presumably to get a running count of total errors throughout the chore. However, you can also use them in a single process:
In the prolog, you declare them:
Code: Select all
NumericGlobalVariable ( 'DataMinorErrorCount' );
NumericGlobalVariable ( 'MetadataMinorErrorCount' );
NumericGlobalVariable ( 'PrologMinorErrorCount' );
Code: Select all
nTotalProcessErrors = DataMinorErrorCount + MetadataMinorErrorCount + PrologMinorErrorCount;
IF ( nTotalProcessErrors > 0 );
# take action here like setting a flag in a cube, sending an e-mail, etc
END IF;
Robin Mackenzie