| 免费下载:IBM® Cognos® Express V9.5 或者 Cognos® 8 Business Intelligence Developer Edition V8.4 试用版 |
|---|
| 下载更多的 IBM 软件试用版,并加入 IBM 软件下载与技术交流群组,参与在线交流。 |
本文描述如何同时打开许多叶子元素,同时向它们应用 IBM TM1 Contributor 安全性。本用例可用于:
- 模仿一个(永久的)多 e.List 打开。
- 允许用户提交合并结点,即使并非所有的叶子节点都已打开。
- 将工作流树限制到规划者(planner)或贡献者(contributor)级别,同时不在树中显示规划对象。
- 克服其他维度限制(例如,顶层元素的索引号、并行层次结构中不同的级别,等等)。
- 在多个 IBM Cognos TM1 Contributor 应用中使用相同的维度。
由于本文中未讨论或介绍的业务需求,该技术可能不适用于所有情况。
本文做出的说明适用于从 IBM Cognos TM1 Contributor 9.5.0(由一位客户使用)和 9.5.1(用于本文)开始的所有版本。本文介绍的概念适用于所有受支持的操作系统,以及这里所列的受支持环境中涉及的所有安装:http://www.ibm.com/support/docview.wss?uid=swg27014444。
本文使用的屏幕截图和样例基于产品随带的规划样例。这能够让我们在一个小环境中简单地复制步骤,然后将其应用到现实模型中。
实现 Multi e.List Item Simulation 方法之前的模型
本文提供一个之前和之后场景来说明实现 Multi e.List Item Simulation 方法的优势。在 “之前” 场景中,有一个规划应用,其中有一个或多个视图,还有一个下到 planner(级别 1)和其负责的规划对象的审批层次结构。
在我们的样例中,应用包含一个视图,plan_BudgetPlanLineItem 多维数据集的 Detail Budget Line Entry。审批层次结构是 plan_department 维度的 All Departments 子集。
图 1. IBM Cognos TM1 Contributor Administrator 视图,包含 plan_BudgetPlanLineItem 多维数据集和充当 e.List 的 plan_department 维度的 All Departments 子集
规划者负责上图中的 main departments、Sales 和 GA。他们具有如下需求:
- 在一个界面内规划所有部门。
- 在自动计算的预算提案无需任何更改时,保持部门不变。
- 没有可供任何人在任何地方查看的部门的工作流状态。
如果您仅仅使用上述需求所需的节点创建视图...
图 2. IBM Cognos TM1 - 创建新视图的 Subset Editor
然后在选择这个子集时您会收到一条错误消息。
图 3. 错误消息:“The hierarchy includes consolidated members but excludes their children.”
因此我们需要创建一个新的审批层次结构,将该子集最下面合并的成员转化为叶子元素。根据您创建维度的方式,有多种方式可以达到这个新维度,例如,使用与创建原维度所用的同一 TI 流程创建该维度。
本例中创建了一个 TI 流程,来读取上述子集的所有元素,并使用所需子集和名称创建一个新维度。
在规划示例中,创建如图 2 所示的子集,创建一个没有数据源的 TI 流程,并将以下代码复制到 Advanced 区域的 Prolog 选项卡下:
#rsr#set constants manual
dimSource='plan_department';
subSource='plan_approval';
attSource='Department';
dimTarget='plan_approval';
#rsr#set initial values for variables
LastElem='';
#rsr#make sure target dimension exists and is empty.
IF (DimensionExists(dimTarget)=0);
DIMENSIONCREATE(dimTarget);
ELSE;
DimensionDeleteAllElements(dimTarget);
ENDIF;
AttrInsert(dimTarget, '', attSource, 'A');
#rsr#read all subset elements and create corresponding
#rsr#elements in the target dimension
i=SubsetGetSize(dimSource, subSource);
While (i>0);
Elem = SubsetGetElementName(dimSource, subSource, i);
DimensionElementInsert(dimTarget, LastElem, Elem, 'N');
LastElem=Elem;
i=i-1;
end;
#rsr#read all subset elements and check which parent element
#rsr#exists in the target dimension
i=SubsetGetSize(dimSource, subSource);
While (i>0);
Elem = SubsetGetElementName(dimSource, subSource, i);
j=ELPARN(dimSource, Elem);
While (j>0);
Parent=ELPAR(dimSource, Elem, j);
IF (DIMIX(dimTarget, Parent)>0);
w=ELWEIGHT(dimSource, Parent, Elem);
DimensionElementComponentAdd(dimTarget, Parent,Elem, w);
j=0;
ELSE;
j=j-1;
ENDIF;
end;
LastElem=Elem;
i=i-1;
end;
#rsr#create subset for Contributor
IF(SubsetExists(dimTarget, subSource)=0);
SubsetCreate(dimTarget, subSource);
ELSE;
SubsetDeleteAllElements(dimTarget, subSource);
ENDIF;
SubsetAliasSet( dimTarget, subSource, attSource);
SubsetIsAllSet( dimTarget, subSource, 1);
|
然后将该文本复制到 Advanced 区域的 Epilog 选项卡中:
#rsr#read all subset elements and set display names i=SubsetGetSize(dimSource, subSource); While (i>0); Elem = SubsetGetElementName(dimSource, subSource, i); Name=ATTRS(dimSource, Elem, attSource); AttrPutS(Name, dimTarget, Elem, attSource); i=i-1; end; |
在尝试使用通过上述 TI 流程创建的新维度的新子集时,您会看到以下错误消息:
图 4. 错误消息:“At least one view in the application must use the approval dimension.”
因此必须创建一个辅助多维数据集和一个视图。
对于多个 IBM Cognos TM1 Contributor 应用,对每个应用重复该步骤和下面的步骤。
现在我们需要创建一个使用新创建的维度的辅助多维数据集。这个多维数据集可以是:
- 显示节点状态的一个状态多维数据集(可以根据一条规则从系统多维数据集中加以引用)。
- 一个用作节点注释的注释多维数据集。
- 一个总为空的多维数据集。
- 您能想到的使用新维度的任何其他多维数据集。
对于该样例,我们创建一个注释多维数据集,它重用现有维度 plan_measure_setting:
图 5. IBM Cognos TM1 多维数据集 plan_comment 和两个维度 plan_approval 和 plan_measure_setting
在创建一个视图(如图 6 所示)之后,我们将其添加到 Base 应用中,我们能够无误地部署我们的应用,但是必须以这样的方式定义我们的原始维度的元素安全性:即 IBM Cognos TM1 Contributor 能够控制它。
对于多个 IBM Cognos TM1 Contributor 应用,对每个应用重复该步骤和前面的步骤。
图 6. IBM Cognos TM1 Cube Viewer 显示 plan_comment 多维数据集的默认视图
如果我们使用服务器资源管理器查看 IBM TM1 服务器,会在新维度 plan_approval 上找到针对元素安全性的一个安全系统多维数据集,这由 IBM Cognos TM1 Contributor 控制:
图 7. 显示 }ElementSecurity_plan_approval 系统多维数据集
为了拥有原始维度 plan_department 的元素安全性,我们必须创建元素安全性多维数据集:
图 8. 显示 plan_department 多维数据集的 Element Security Assignments...
在打开的表单中,可以更改任何条目来创建元素安全性多维数据集。
如果我们想让 IBM Cognos TM1 Contributor 控制安全性,就需要从元素安全性多维数据集中提取安全性,这由 IBM Cognos TM1 Contributor 控制。因此我们为新元素安全性多维数据集(属于原始维度)创建一条规则。
图 9. 为 }ElementSecurity_plan_department 多维数据集创建一条规则
在新规则编辑器窗口中创建提取安全性所需的代码。对于我们的样例,代码是:
SKIPCHECK;
#rsr# For Non-leaf elements pull the corresponding cell
#rsr# from the Contributor controlled security
[ ] = S: IF (ELLEV('plan_department', !plan_department)=0, Continue,
DB('}ElementSecurity_plan_approval', !plan_department, !}Groups));
#rsr# Is the first parent member in the appproval hierary?
#rsr# If yes, pull the rights from them
[ ] = S: IF (DIMIX('plan_approval', ELPAR('plan_department',
!plan_department, 1))=0, Continue,
DB('}ElementSecurity_plan_approval',
ELPAR('plan_department', !plan_department, 1), !}Groups));
#rsr# Is the second parent member in the appproval hierary?
#rsr# If yes, pull the rights from them
[ ] = S: IF (DIMIX('plan_approval', ELPAR('plan_department',
!plan_department, 2))=0, Continue,
DB('}ElementSecurity_plan_approval',
ELPAR('plan_department', !plan_department, 2), !}Groups));
#rsr# Repeat this until you have the maximum number of parents in our dimension
|
对于多个 IBM Cognos TM1 Contributor 应用,您需要从上面创建的所有审批维度上提取安全性信息。根据您需要的业务逻辑,按照目标区域定义和 IF 语句分离元素安全性控制多维数据集中的区域。
另外,您可以创建一个 TI 流程,将安全性信息从 IBM Cognos TM1 Contributor 控制的元素安全性多维数据集复制到原始维度的元素安全性多维数据集。为了让这个解决方案起作用,您要确保在每次 IBM Cognos TM1 Contributor 更改审批层次结构的元素安全性多维数据集时这个 TI 流程运行。
实现 Multi e.List Item Simulation 方法之后的模型
我们看一下修改后的样例模型:
图 10. 实现 Multi e.List 改进后的 IBM Cognos TM1 Contributor Administration
应用中的原始多维数据集和视图不变。有一个新维度(plan_approval),带有包含新维度的所有元素的一个子集。
此外,有一个包含审批维度的额外的辅助多维数据集。该多维数据集可以为空、为 }tp_application_state 多维数据集的一个副本,或为一个注释多维数据集(如在本样例中),或包含针对审批层次结构的任何信息。
最后一个额外对象在 IBM Cognos TM1 Contributor administration 界面不可见,它是将 IBM Cognos TM1 Contributor 控制的元素安全性设置拉入原始维度的元素安全性多维数据集的一条规则。例如,图 11 中显示的安全性设置转化成图 12 中显示的元素安全性设置。
图 11. IBM Cognos TM1 Contributor 安全性设置图像
图 12. 显示被编辑的访问权的图像
这些 IBM Cognos TM1 Contributor 控制的设置产生针对原始维度的以下权利:
图 13. 显示 IBM CognosTM1 Contributor 的访问权的图像
学习
- 通过 developerWorks Information Management 专区:在这里可以学到更多关于 Information Management 的知识。还可以找到技术文档、how-to 文章、培训、下载、产品信息等。
- 通过 Information Management 专区 Cognos BI 专题,了解更多有关 Cognos BI 专题的产品和技术资源。
- 通过 商业智能入门以及 Cognos 产品介绍,了解 商业智能的基本概念和相关技术,并介绍了 Cognos 商业智能相关的产品。
- 关于 Cognos 的安装,请参照 Cognos 8 BI Server 在 Linux 上的安装及与 IHS、WAS、DB2 的配置,学习 Cognos 详细的安装过程。
- 通过访问 IBM Cognos 8 Business Intelligence,学习 IBM Cognos 8 Business Intelligence 产品的相关知识。
- 随时关注 developerWorks 技术活动 和 网络广播。
获得产品和技术
- 在线试用 IBM Cognos BI 试用版软件,了解 IBM Cognos BI 商业智能解决方案的最新版本新功能。
- 下载 IBM Cognos Express V9 试用版软件,了解 IBM 专为中型企业定制的集成商业智能和计划解决方案。
- 下载免费的 IBM Information Management 试用版软件,了解 IBM Information Management 软件的最新版本和特性。
讨论
- 参与 developerWorks
博客 并加入 developerWorks 中文社区,developerWorks 社区是一个面向全球 IT 专业人员,可以提供博客、书签、wiki、群组、联系、共享和协作等社区功能的专业社交网络社区。