Page 1 of 1

TI Process for all user groups

Posted: Tue Jan 17, 2012 7:03 am
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

Re: TI Process for all user groups

Posted: Tue Jan 17, 2012 8:28 am
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.

Re: TI Process for all user groups

Posted: Wed Jan 18, 2012 1:14 pm
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

Re: TI Process for all user groups

Posted: Wed Jan 18, 2012 2:12 pm
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.

Re: TI Process for all user groups

Posted: Thu Jan 19, 2012 9:00 am
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;

Re: TI Process for all user groups

Posted: Sat Jan 21, 2012 11:38 pm
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;