TI Process with Parameters in a Chore

Post Reply
ExApplix
Posts: 103
Joined: Mon Sep 21, 2009 7:09 pm
OLAP Product: Cognos Tm1
Version: 10.2.2
Excel Version: 2016

TI Process with Parameters in a Chore

Post by ExApplix »

I have got some TI Process which accept parameters when executed manually. Can I put the same process in the Chores which run overnightly?

If yes then do I have to change anything in my existing Processes (with parameters)?

Please help me in understanding in how these processes will behave if they are in a Chore?

Thanks!
Alan Kirk
Site Admin
Posts: 6667
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: TI Process with Parameters in a Chore

Post by Alan Kirk »

ExApplix wrote:I have got some TI Process which accept parameters when executed manually. Can I put the same process in the Chores which run overnightly?

If yes then do I have to change anything in my existing Processes (with parameters)?

Please help me in understanding in how these processes will behave if they are in a Chore?
When you created the process you would have had to specify default parameter values. When you create the chore, you'll also need to specify default parameter values for each process which has them. The chore parameters will be used in preference to the process parameters when the process is run as part of the chore.

(Be careful; if you have a string parameter and enter a default value which is in a numeric format, you're likely to have problems. Chores, unlike processes, don't store the data type for each parameter. They "guess" when they are loaded based on what the parameter default is. Accordingly if you have a process that's expecting a string parameter and the chore passes it a number, you'll get an error.)

Other than that, parameters function exactly as variables do.

Suppose that you have a string parameter P0. When you put the process into the chore you need to define a default value for it; let's say that you assign 'abc'. When the chore runs, it will use 'abc' as the value for the parameter.

However, if you wish you can assign a different value to P0 in, say, the Prolog tab. This could be a value that's derived from formulas, or read from a cube, or even hard coded. So if you were to assign

Code: Select all

P0 = 'def';
then when the chore runs, 'def' will be used as the parameter value instead of 'abc'.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
ExApplix
Posts: 103
Joined: Mon Sep 21, 2009 7:09 pm
OLAP Product: Cognos Tm1
Version: 10.2.2
Excel Version: 2016

Re: TI Process with Parameters in a Chore

Post by ExApplix »

Yes, I do have the default parameter values defined in the Parameter Tab. Please see the attached screen shot.

I have understood that whatever is the 'Default Value' of the parameter it will be used when the Process is ran through a Chore. If I want to change the 'Default Value' during the process execution then I have to do it within the Prolog tab.

My parameters are defined as Strings. Please let me know if there will be any problems if I put this process in a Chore? If there is problem, then please suggest me a solution.

Thanks
Attachments
Parameters
Parameters
Parameters.jpg (12.48 KiB) Viewed 14634 times
Alan Kirk
Site Admin
Posts: 6667
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: TI Process with Parameters in a Chore

Post by Alan Kirk »

ExApplix wrote:Yes, I do have the default parameter values defined in the Parameter Tab. Please see the attached screen shot.

I have understood that whatever is the 'Default Value' of the parameter it will be used when the Process is ran through a Chore.
Have you? Because that's not at all what I wrote.

I wrote that when you define a process with a parameter as part of a chore, you also need to define a default value in the chore. These will not be the ones in the screenshot that you've provided, though you can assign the chore level defaults the same values if you want subject to the caution that you should not assign numeric-type values as the default for a string parameter at chore level. The way you have 2008 as the default for pYear, for example, would cause you a world of problems were you to do it at chore level.
I wrote:When you create the chore, you'll also need to specify default parameter values for each process which has them. The chore parameters will be used in preference to the process parameters when the process is run as part of the chore.
(Emphasis added.)
ExApplix wrote: If I want to change the 'Default Value' during the process execution then I have to do it within the Prolog tab.
As with any variables you could technically change them on any tab, but the Prolog would be the most conventional (and usually useful) place to do it.
ExApplix wrote:My parameters are defined as Strings. Please let me know if there will be any problems if I put this process in a Chore? If there is problem, then please suggest me a solution.
Yes, the problem that I described in the initial post and again above. The solution is to put a text default value in for all string parameters, safe in the knowledge that you'll never actually use the default value.

Instead, assign the value that you do want to use in the Prolog, before you start the data processing.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Alan Kirk
Site Admin
Posts: 6667
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: TI Process with Parameters in a Chore

Post by Alan Kirk »

To put this more clearly...

If THIS is the process' Parameters tab, with the default value ABC:
01_Process_Params.jpg
01_Process_Params.jpg (16.21 KiB) Viewed 14633 times
And THIS is the code on the Prolog tab:
02_Process_Prolog.jpg
02_Process_Prolog.jpg (29.72 KiB) Viewed 14633 times
(Edit: That should of course be override, not overrode. Common or garden typo.)

Then when you add the process to a chore you still need to define chore-level default values via the dialog below, which is accessed via the [Specify Values for Parameters...] button. The chore won't let you move to the next step unless you've specified default chore level parameter values for every process which has them:
03_Chore_Params.jpg
03_Chore_Params.jpg (24.34 KiB) Viewed 14633 times
Note two things in particular:
(a) The fact that the default parameter doesn't need to be the same as the one used at process level; and
(b) The absence of a place to specify whether the chore default is a string or numeric value, which is what causes problems if you have a numeric-type default for a string. (Yes, it shows it on the prompt side, but that's just reading from the process. It's not stored with the chore.)

When the process is run as a stand-alone process, then unless I change the default parameter value via the input prompt the output is:

Code: Select all

"ABC"
"XYZ"
When the process is run as part of a chore, it is:

Code: Select all

"DEF"
"XYZ"
And thus we see why I say that (a) the chore defaults override the process ones and (b) changing the value in the Prolog overrides both.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Chita
Posts: 16
Joined: Tue Jun 02, 2015 5:46 am
OLAP Product: Oracle
Version: 10.2.1
Excel Version: 2007

TI Process with Parameters

Post by Chita »

I have one element in the Dimention Scenario the name is Budget 2, I want copy the value in that element to another Budget whis is in the same dimension. The problem is i don't understand how to make the parameter in Turbointegrator and how to create the formula in Advanced tab. I'm so appreciate any help from my problem
BariAbdul
Regular Participant
Posts: 424
Joined: Sat Mar 10, 2012 1:03 pm
OLAP Product: IBM TM1, Planning Analytics, P
Version: PAW 2.0.8
Excel Version: 2019

Re: TI Process with Parameters in a Chore

Post by BariAbdul »

Plwase go through below links ,You will get answer to your questions.
http://www.olapline.de/docman-hierarchi ... /file.html
http://goo.gl/qh9kj6
"You Never Fail Until You Stop Trying......"
Chita
Posts: 16
Joined: Tue Jun 02, 2015 5:46 am
OLAP Product: Oracle
Version: 10.2.1
Excel Version: 2007

Re: TI Process with Parameters

Post by Chita »

I've make the parameter like in the picture, in Tab Data i've made some formula whis is not work well. Can you help me :|
Attachments
I've make the parameter like in the picture, in Tab Data i've made some formula whis is not work well. Can you help me  :|
I've make the parameter like in the picture, in Tab Data i've made some formula whis is not work well. Can you help me :|
Prm 1.jpg (49.21 KiB) Viewed 13494 times
Chita
Posts: 16
Joined: Tue Jun 02, 2015 5:46 am
OLAP Product: Oracle
Version: 10.2.1
Excel Version: 2007

Re: TI Process with Parameters in a Chore

Post by Chita »

My formula is'nt work well. The value doesn't fill the input Cube where the element is in the same Dimension
Attachments
My formula is'nt work well. The value doesn't fill the input Cube where the element is in the same Dimension
My formula is'nt work well. The value doesn't fill the input Cube where the element is in the same Dimension
Prm 2.jpg (210.82 KiB) Viewed 13493 times
Chita
Posts: 16
Joined: Tue Jun 02, 2015 5:46 am
OLAP Product: Oracle
Version: 10.2.1
Excel Version: 2007

Re: TI Process with Parameters in a Chore

Post by Chita »

Datasource that i used is IBM Cognos TM1 View

I want to copy the value in Budget 2 in Dimension Scenario whisi s in the same Cube
i create :
in Tab Parameter the default value of the parameter that i made is Budget 2
then i make the formula like this :
pBudget = 'Budget 4';

The process run success bt in my Cube the value is'nt copy at all
am i make a mistake formula ?
please give me some advice, thank you..
ashokjb
Posts: 8
Joined: Tue May 26, 2015 11:14 am
OLAP Product: TM1, PAL
Version: 9.5, 10.2.2, 2.0.1
Excel Version: 2010 2013

Re: TI Process with Parameters in a Chore

Post by ashokjb »

Is it possible to insert multiple values for one parameter? Eg: 'Abc' , 'Def' for the same parameter.
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: TI Process with Parameters in a Chore

Post by tomok »

ashokjb wrote:Is it possible to insert multiple values for one parameter? Eg: 'Abc' , 'Def' for the same parameter.
Why would you want to do this? Think about it for a minute. If you had multiple values for the same parameter how would you know which one was the correct one to use when it came time to actually execute the process? If you are talking about submitting an array then no, there is no built-in facility in TM1 for that. You can create your own array by concatenating the values to together, with some sort of separator, and then parsing the string in your TI code.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
User avatar
Steve Rowe
Site Admin
Posts: 2464
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: TI Process with Parameters in a Chore

Post by Steve Rowe »

You can set the chore up twice, each time with a different parameter.
Technical Director
www.infocat.co.uk
Post Reply