TI Process for all user groups

Post Reply
ravi
Posts: 138
Joined: Mon Apr 26, 2010 12:39 pm
OLAP Product: cognos
Version: tm1 9.5
Excel Version: 2007

TI Process for all user groups

Post by ravi »

Hi All,

I need to create a TI process for to set the security on version dimension once the version is locked.
for this i need to automate and create a chore for it including all user groups.

is there process in a way that it will add groups without us having to touch the process everytime a new group is added.

Please advise.
ravi
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 for all user groups

Post by Alan Kirk »

ravi wrote: I need to create a TI process for to set the security on version dimension once the version is locked.
for this i need to automate and create a chore for it including all user groups.

is there process in a way that it will add groups without us having to touch the process everytime a new group is added.
Option 1: Use the All subset of the }Groups dimension as the data source and set the values as you loop through it;
Option 2: In the prolog of a process with no data source, get the size of the }Groups dimension using DimSiz, then use a While loop to iterate through each element using DimNm to get the element name.
"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.
ravi
Posts: 138
Joined: Mon Apr 26, 2010 12:39 pm
OLAP Product: cognos
Version: tm1 9.5
Excel Version: 2007

Re: TI Process for all user groups

Post by ravi »

Hi,

I am currently testing TI Process- But it fails and generates the process is failed and send the email to group.

I not too sure- where to look at and how to disable the auto -email until the TI Process is success.Please advise.

Also, I want to comment some code in TI Prolog and Data tab-not too sure sign I need to use to comment the the code ("----", " ///" or "###")

Appreciate your help.
Regards,
ravi
lotsaram
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: TI Process for all user groups

Post by lotsaram »

ravi wrote:I am currently testing TI Process- But it fails and generates the process is failed and send the email to group.

I not too sure- where to look at and how to disable the auto -email until the TI Process is success.Please advise.
To disable some code usually you would comment it out ;)
Emailing?! Well that is certainly new information that you might have thought to mention earlier. Clearly from the remainder of your question you are not the original developer of this model. Have you thought perhaps to ask them?
ravi wrote:Also, I want to comment some code in TI Prolog and Data tab-not too sure sign I need to use to comment the the code ("----", " ///" or "###")
Not to be too tetchy but this really doesn't dignify a response. If you're being expected to do TM1 development then presumably you have received some training? Or even if not you have an existing model and no matter how badly or sloppily developed I can not imagine that it would contain a sum total of zero comments. Use some common sense and review an example in the model (probably even within the very TI process you are editing!) of how a line of code is commented.
ravi
Posts: 138
Joined: Mon Apr 26, 2010 12:39 pm
OLAP Product: cognos
Version: tm1 9.5
Excel Version: 2007

Re: TI Process for all user groups

Post by ravi »

Hi,

I am still working on this issue-
I have code in DATA tab like below:
TI Process -have some issue for user group COG8_TM1_CORPFIN_ ALLOCATIONS_UPLOAD_CORP_PATENT_WRITE , rest of the user groups are passing through and process runing successfully........it says:

Error in Data tab(TI) user group for COG8_TM1_CORPFIN_ ALLOCATIONS_UPLOAD_CORP_PATENT_WRITE -execution was aborted....

Please advise
Ravi

#****Begin: Generated Statements***
#****End: Generated Statements****

ElementSecurityPut('Read','Version',V1,'COG8_TM1_CORPFIN_ALLOCATIONS_READ_ALL');

IF(EDW_TM1_CORP_LOCK@='Read' & EDW_TM1_FPA_LOCK@='Read' );

ElementSecurityPut(EDW_TM1_CORP_LOCK,'Version',V1,'COG8_TM1_CORPFIN_ ALLOCATIONS_UPLOAD_CORP_LITIGATION_WRITE ');
ElementSecurityPut(EDW_TM1_CORP_LOCK,'Version',V1,'COG8_TM1_CORPFIN_ALLOCATIONS_UPLOAD_CORP_PATENT_WRITE ');
ElementSecurityPut(EDW_TM1_CORP_LOCK,'Version',V1,'COG8_TM1_CORPFIN_ ALLOCATIONS_UPLOAD_QCT_INTERNATIONAL_WRITE ');



ELSEIF((EDW_TM1_FPA_LOCK@='Read' & EDW_TM1_Corp_LOCK@='Allocation_Write') % (EDW_TM1_FPA_LOCK@='Write' & EDW_TM1_Corp_LOCK@='Write') );

ElementSecurityPut('Write','Version',V1,'COG8_TM1_CORPFIN_ ALLOCATIONS_UPLOAD_CORP_LITIGATION_WRITE ');
ElementSecurityPut('Write','Version',V1,' COG8_TM1_CORPFIN_ALLOCATIONS_UPLOAD_CORP_PATENT_WRITE');
ElementSecurityPut('Write','Version',V1,'COG8_TM1_CORPFIN_ ALLOCATIONS_UPLOAD_QCT_INTERNATIONAL_WRITE ');

ENDIF;
Attachments
Error Messsage
Error Messsage
Error.JPG (74.74 KiB) Viewed 4524 times
User avatar
vinnusea
Posts: 116
Joined: Thu Sep 23, 2010 6:12 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2010
Location: San Diego ,CA

Re: TI Process for all user groups

Post by vinnusea »

Hi Ravi,
I strongly prefer you to get back to the TM1 developer if that's not possible you can try some of these.Based on topics you mentioned.What i think is

#Simpler first
1.To comment a line you need to add # at the beginning of the code.If the line is too big please beak down to 2-3 lines of comments each begin with #
2. If you are testing a process then enabling email is not a good idea, as for each attempt people gets an email. To disable the email please check the entire tabs for any kind of code that is triggering a batch file which an email or a line of code saying Executeprocess(<processname>,parameter,parametervalue) which is receving parameter from the main process and sending emails. TM1 doesnot have any automatic email setup built in.

#Groups
3. i Think the process couldnot find a group name in your }Groups dimension you better create a while loop and iterate through your }Groups dim and only apply security if you find a groupname match .

example

idx = 1;
nGroupSiz = DIMSIZ('}Groups');
While(idx<= nGroupSiz);

sGroupNM = DIMIX('Groups',idx);

#Now you got your first group in groups dim do what ever security you want to put here
#This will iterate entire groups elements


idx= idx+1;
END;


#ELSE IF YOU want to just put some security for only few groups then you better check if the group is present in your TM1 System
#To check that use logic below

nGroupExists = DIMIX( '}Groups' , <any group name> );
IF( nGroupExists >0 );
#Then groups exists in dimension

ElementSecurityPut('Read','Version',V1,'COG8_TM1_CORPFIN_ALLOCATIONS_READ_ALL');
IF(EDW_TM1_CORP_LOCK@='Read' & EDW_TM1_FPA_LOCK@='Read' );
ElementSecurityPut(EDW_TM1_CORP_LOCK,'Version',V1,'COG8_TM1_CORPFIN_ ALLOCATIONS_UPLOAD_CORP_LITIGATION_WRITE ');
ElementSecurityPut(EDW_TM1_CORP_LOCK,'Version',V1,'COG8_TM1_CORPFIN_ALLOCATIONS_UPLOAD_CORP_PATENT_WRITE ');
ElementSecurityPut(EDW_TM1_CORP_LOCK,'Version',V1,'COG8_TM1_CORPFIN_ ALLOCAIONS_UPLOAD_QCT_INTERNATIONAL_WRITE ');
ELSEIF((EDW_TM1_FPA_LOCK@='Read' & EDW_TM1_Corp_LOCK@='Allocation_Write') % (EDW_TM1_FPA_LOCK@='Write' & EDW_TM1_Corp_LOCK@='Write') );
ElementSecurityPut('Write','Version',V1,'COG8_TM1_CORPFIN_ ALLOCATIONS_UPLOAD_CORP_LITIGATION_WRITE ');
ElementSecurityPut('Write','Version',V1,' COG8_TM1_CORPFIN_ALLOCATIONS_UPLOAD_CORP_PATENT_WRITE');
ElementSecurityPut('Write','Version',V1,'COG8_TM1_CORPFIN_ ALLOCATIONS_UPLOAD_QCT_INTERNATIONAL_WRITE ');
ENDIF;


Endif;
Thanks
Vinnusea
Post Reply