Page 1 of 1
TI Process to Update Security 9.5.2
Posted: Thu Aug 11, 2011 7:38 pm
by rfielden
I am attempting to develop my first TI process to update group security based upon our current store hierarchy (pull the info from Oracle tables).
The cube I need to update is }ElementSecurity_CostCenters.
My intent is to:
1. clear all values associated with stores
2. repopulate values based on current hierarchy
3. run security refresh
Is anyone willing to share any gotchas that I should be aware of?
Thanks, Rick.
Re: TI Process to Update Security 9.5.2
Posted: Thu Aug 11, 2011 7:49 pm
by qml
One that pops up to mind is to check the "Security Access" option from the context menu for this TI (or any process that is meant to update security cubes).
Also, in theory, you shouldn't need to run a security refresh if there are no rule calculations for your security cubes. But maybe someone else has a different experience with that.
Re: TI Process to Update Security 9.5.2
Posted: Thu Aug 11, 2011 8:19 pm
by John Hammond
Skip the admin groups when you are cellputsing stuff otherwise you get write access denied. You enter the access as a word eg READ
Re: TI Process to Update Security 9.5.2
Posted: Thu Aug 11, 2011 9:02 pm
by tomok
qml wrote:Also, in theory, you shouldn't need to run a security refresh if there are no rule calculations for your security cubes. But maybe someone else has a different experience with that.
it depends on which TI function you use to update the security. If you use ElementSecurityPut then that includes the security refresh in it and the changes are immediate. If you use CellPutS then you have to issue the SecurityRefresh command yourself to make the changes active.
Re: TI Process to Update Security 9.5.2
Posted: Wed Aug 31, 2011 2:29 pm
by rfielden
As I am setting back into this picture after a few yrs absence and filling in for someone that left the company, I have completed a TI process to udpate the security values based on hierarchy changes but getting the following error due to a rule assigned to the cube:
Error Date procedure line (3): Rule applies to cell
Is there a way to bypass the rule check?
Rule is:
FEEDSTRINGS;
SKIPCHECK;
[]= S: If(ATTRS('Cost Center Security', SUBST(!CostCenters,1,long(!CostCenters)-11) , 'Type') @= 'STORE HIERARCHY',
DB('Cost Center Security',SUBST(!CostCenters,1,long(!CostCenters)-11),!}Groups,'Applied Security'),
If(ATTRS('Cost Center Security', !CostCenters , 'Type') @<> 'STORE HIERARCHY',
If( ELLEV('CostCenters', !CostCenters ) = 0 & DB('Cost Center Security', ATTRS('CostCenters', !CostCenters,'Current District') ,!}Groups,'Applied Security') @<> '',
DB('Cost Center Security', ATTRS('CostCenters', !CostCenters,'Current District') ,!}Groups,'Applied Security'),
If( ELLEV('CostCenters', !CostCenters ) = 0 & DB('Cost Center Security', ATTRS('CostCenters', !CostCenters,'Overhead Parent') ,!}Groups,'Applied Security') @<> '',
DB('Cost Center Security', ATTRS('CostCenters', !CostCenters,'Overhead Parent') ,!}Groups,'Applied Security'),
If( ELLEV('CostCenters', !CostCenters ) = 0 & DB('Cost Center Security', ATTRS('CostCenters', !CostCenters,'All Level Parent') ,!}Groups,'Applied Security') @<> '',
DB('Cost Center Security', ATTRS('CostCenters', !CostCenters,'All Level Parent') ,!}Groups,'Applied Security'),
DB('Cost Center Security', !CostCenters,!}Groups,'Applied Security')))),
DB('Cost Center Security', !CostCenters,!}Groups,'Applied Security')));
FEEDERS;
Re: TI Process to Update Security 9.5.2
Posted: Fri Sep 02, 2011 12:42 am
by rmackenzie
Is there a way to bypass the rule check?
The TI function CellIsUpdateable could help here. Usage:
Code: Select all
nRuleAppliesToCell = CellIsUpdateable ( sCubeName, sElem1, sElem2, sElem3, ... sElemN );
IF ( nRuleAppliesToCell = 0 );
CellPutN ( nValue, sCubeName, sElem1, sElem2, sElem3, ... sElemN );
ENDIF;
Re: TI Process to Update Security 9.5.2
Posted: Tue Sep 06, 2011 2:18 pm
by rfielden
rmac, thanks for the suggestion. I tried but still got rule err msg. Good think this is becoming a great learning process for me and appreciated learning how to use another TM1 function.
Re: TI Process to Update Security 9.5.2
Posted: Tue Sep 06, 2011 10:02 pm
by paulsimon
Hi rfielden
Just a thought, did you change the CellPutN to a CellPutS in Rob's example code? If so then that should have worked.
I haven't got enough knowledge of your application to understand all the rules that you already have in your security cube. However, is there a reason why they aren't giving you what you need? It may be that all you need is a security refresh. You can do that by right clicking on the server just to try it and then put it into a TI later.
Regards
Paul Simon
Re: TI Process to Update Security 9.5.2
Posted: Wed Sep 07, 2011 7:16 pm
by rfielden
Paul, yes I did change to an 'S' before running the process. Received the rule err msg while running the TI process, thus, I did not do security refresh. As I have inherited this I can't find anyone that knows why rule was put on the cube and against a dimension no one knows why exists. I am a little leery to disconnect due to possible 'unknown' connections but did do that in test and the TI process ran fine. Thanks for the follow-up, Rick.