Sharepoint学习笔记—习题系列--70-576习题解析 -(Q141-Q143)

Question  141
 You are planning an upgrade to a SharePoint 2010 application. You have the following requirements:
.Modify an existing workflow to include a new code activity.
.Ensure running instances of the workflow continue to work.
.Ensure new instances of the workflow include the modifications.
You need to plan the upgrade the application to meet these requirements. After the workflow code is modified, what should your plan specify?
A. Deploying the code to the global assembly cache (GAC) and deactivating the workflow feature.
B. Incrementing the version of the workflow assembly, deploying to the GAC, and activating the workflow feature.
C. Incrementing the version of the workflow assembly, deploying to the GAC, deactivating the workflow feature, and then activating the workflow feature.
D. Incrementing the version of the workflow assembly, deploying to the GAC, and modifying the appropriate workflow. xml file to reference the new version.服务器


解析:
 你计划升级一个Sharepoint应用程序,须要知足以下要求:
 要求1.为一个已经存在的工做流添加一个新的代码活动
 要求2.保证那个已经使用的工做流实例的继续正常运行
 要求3.保证新的工做流实例包含了要求1中所做的修改
 你该如何操做以确保升级活动达到上述要求?
 因为本题要求“保证那个已经使用的工做流实例的继续正常运行”,因此你必须另外部署新Workflow的程序集。即” Incrementing the version of the workflow assembly, deploying to the GAC”,选项B.C.D前面部分的描述。而选项A则排除,由于部署到GAC中的是程序集(通过编译后的代码)而非代码。
  咱们知道,每一个工做流都具备一个工做流定义(workflow. xml)文件。此 XML 定义指定实际工做流程序集的标识、该程序集中的类以及工做流必须运行的任何工做流表单的位置。选项B.C均未对原来的工做的工做流定义(workflow. xml)文件进行修改,这样就达不到要求1,即必需要为已经存在的工做流添加一个新的代码活动。只有选项D,经过修改这个workflow.xml文件,把原来已经存在的工做流所依赖的工做流程序集的标识指向新建立的工做流程序集,从而达到本题的要求。
所以本题答案应该选 D app

参考 
http://msdn.microsoft.com/zh-cn/library/ms434426(v=office.14).aspx
http://msdn.microsoft.com/en-us/library/ms414556(v=office.14).aspx
http://social.msdn.microsoft.com/Forums/en-US/6034c5d5-86b2-45dc-a9cc-4ebf4930668e/how-to-increment-the-version-of-my-workflow工具

 


Question  142
 You have a SharePoint 2010 application deployed in production. The application has a list with a single longrunning workflow named Version A. You design a new version of the workflow named VersionB. You have the following requirements:
.Existing instances of Version must continue to run until completed.
.VersionB must always be instantiated in the future.
.Version A must no longer be instantiated.
You need to design the solution to meet the requirements. Which approach should you recommend?
A. Disable the Start this workflow when a new item is created property in the Start Options of Version A.
B. Disable the Start this workflow when a new item is created property in the Start Options of VersionB.
C. Set the No New Instances property in the Remove Workflows settings of Version A.
D. Set the Optionally limit the number of versions to retain property in the Versioning Settings of the list.网站


解析:
  你开发部署了一个Sharepoint2010应用在生产环境,此应用包含了一个长期运行某个列表上的工做流,此工做流当前版本号为A,你准备开发此工做流的新版本B,并知足以下要求:
  要求1.已经运行的版本A必须继续运行,直到它执行完成
  要求2.升级后新建立的此工做流实例必须基于版本B建立
  要求3.版本B生效后,再也不基于版本A建立新的工做流实例
 你该如何操做以知足上述要求呢?
  咱们知道,经过将工做流与列表、文档库、内容类型或网站关联,能够添加工做流。经过取消工做流与列表、文档库、内容类型或网站的关联,能够移除工做流。或者,您能够阻止工做流的新实例启动,但仍容许全部正在运行的工做流实例完成。这正是本题所须要作的事情。
  下面是如何从列表或文档库移除工做流关联的具体步骤:
从列表或文档库移除工做流关联
1. 验证您是否拥有如下管理凭据:
    o 您必须是所配置的 SharePoint 网站上的 Site Owners 组的成员。
2. 经过浏览找到要从其中移除工做流的列表或库。
3. 执行下列操做之一:
   o 对于列表,在“列表工具”选项卡上单击“列表”。
   o 在“设置”组中,单击“列表设置”。
   o 对于库,在“库工具”选项卡上单击“库”。
   o 在“设置”组中,单击“库设置”。
4. 在“列表设置”或“库设置”页上的“权限和管理”部分,单击“工做流设置”。
5. 在“工做流设置”页上,单击“删除工做流”。
6. 在“删除工做流”页上,找到要移除的工做流并从如下选项中进行选择:
   o 选择“没有新实例(No New Instances)”以防止此工做流的新实例运行,但仍然容许正在运行的实例完成。【正是本题要求的效果,也只有选项C使用了此属性设置,因此选项C为本题的答案】
全部正在运行的工做流均完成后,您能够返回到此页以彻底移除工做流关联。
   o 选择“移除”以防止此工做流的新实例运行并移除此工做流的全部实例。此选项将移除已在运行的实例。
7. 单击“肯定”。
  选项A.B分别关闭自动启动工做流。与本题的要求没太大关系。
  选项D则涉及列表项(主要是文档库内文档的版本)的版本保存限制,与本题的工做流无关。因此也应该排除。
所以本题答案应该选 Cui

参考 
http://technet.microsoft.com/zh-cn/library/ee662537(v=office.14).aspx
http://technet.microsoft.com/zh-cn/library/ee662537(v=office.14).aspx
http://technet.microsoft.com/zh-cn/library/ee662540(v=office.14).aspx
http://office.microsoft.com/en-au/sharepoint-server-help/enable-and-configure-versioning-for-a-library-HA101853103.aspxthis

 

Question  143
 In your development environment, you designed new versions of a number of features currently working in a SharePoint 2010 farm. The features are being used throughout the farm at all scope levels. You need to meet the following requirements:
.All the features on the farm must be upgraded to the newest version.
.All existing feature instances must be upgraded to the latest version.
.The sites using the features must experience as little downtime as possible.
Which approach should you recommend?
A. Deploy all of the features as one solution package to the farm. Specify the new version number for each feature in the current Feature.xml file for the feature. Activate all of the new features at the farm level.
B. Deploy each of the features in its own solution package to the farm. Specify the new version number for each feature in the current Feature.xml file for the feature. Activate the new features only in the locations where they are currently activated.
C. Specify the new version number and any upgrade actions required in each of the Feature.xml files. Run Feature upgrade as a solution package on the farm.
D. Retract the existing versions of the features. Specify the new version number for each feature in a new Feature.xml file for each feature. Deploy the features as a new solution package. Activate the new features only in the locations where they are currently activated.spa


解析:
 你在开发环境中开发了几个新版本的功能,这些功能的老版本实例已经在生产环境中投入了应用,它们的应用层次是整个场内的任何层次(Web Application, Site Collection, Web, List….),你须要作到以下要求:
  要求1.全部功能都必须被升级到最新版本
  要求2.已经存在的各个层次的功能必须升级到最近的版本
  要求3.尽可能减小功能停运时间
 本题涉及Sharepoint的功能升级,先来看看相关描述:
 在 Microsoft SharePoint Foundation 中,每一个功能都具备一个在与其对应的 Feature.xml 文件中指定的版本号。在某个特定范围内激活一个功能时,会建立一个与该功能的版本关联的功能实例。利用 SharePoint Foundation 中的功能版本控制,可轻松跟踪功能及其关联实例。以后,当您部署新版本的功能时,SharePoint Foundation 检测到关联的功能也须要进行升级,由于功能实例的版本号小于当前的 Feature.xml 文件中指定的新版本号。
 在运行功能升级时,还会根据新 Feature.xml 文件中指定的升级操做对须要升级的功能实例进行升级。SharePoint Foundation 使用新的 QueryFeatures 方法(可应用于顶级对象,如 SPWebApplication 和 SPSite),基于功能实例的版本号来肯定须要升级的功能实例。新 Feature.xml 文件中有一个部分,可用于指定将特定的功能实例从早期版本升级到最新版本所需的升级操做。升级基础结构会查询须要升级的功能实例集,而后升级其中的每一个功能实例。此活动会涉及声明性升级操做和自定义升级代码。在 SharePoint Foundation 中,将跟踪每一个功能实例的版本号。
按如下顺序依次升级功能:服务器场级别、Web 应用程序级别、网站集和特定网站。在网站级别,功能实例的升级顺序是:从根网站开始,而后按照子网站层次结构向下进行升级。将基于依赖性的顺序升级功能,也就是说,在升级功能以前,先升级这些功能所依赖的功能。
当升级期间出现错误时,升级将在指定的功能实例处中止,并在 ULS 日志和 Upgrade.log 文件中记录该错误。(一般,ULS 日志包含有关该错误的详细信息)。同时,继续对其余功能实例进行升级。在完成初始升级后并在从新启动此过程以前,管理员有机会发现并解决致使功能没法升级的问题。以后,当从新启动升级过程时,SharePoint Foundation 会对初次升级失败的功能重复全部升级操做,以便对全部功能和功能实例成功完成升级过程。
   Feature.xml 文件中新增的 <UpgradeActions> 节指定可应用于指定功能的升级操做。
能够将 <UpgradeActions> 节放置在 Feature.xml 文件的开头或末尾,使其位于 <Feature> 元素的内容中。经过该节,您能够为不一样的升级范围指定升级操做,而且能够包含应用于指定范围的升级操做列表。升级定义始终将功能升级到 <Feature> 元素中声明的版本。
 下面咱们来分析各备选项.
 选项A.把全部的功能都打包到一个解决方案中,并从新部署到场级别以及在场级别激活它们。这显然不符合本题描述:” 老版本实例已经在生产环境中投入了应用,它们的应用层次是整个场内的任何层次”。并且此方式也不会满组要求2。因此本选项被排除。
 选项B.从新开发针对各个功能的新版本功能的解决方案并部署到场。这种方式也并无升级已运行的老版本,而仅是开发部署了新版本。且这种不断开发部署新解决方案的方法会频繁形成Sharepoint生产环境停运。因此选项B也应该被排除。
 选项C.经过开发功能升级解决方案包而不是从新开发新的功能解决方案包,这显然符合本题的要求。功能升级解决方案包就是用来完成Sharepoint功能升级的各类操做的。
 选项D.要收回已运行的旧版本的功能。这显然不符合要求2,即不能收回它们,而是升级它们。因此选项D排除。
  
所以本题答案应该选 C
参考 
http://msdn.microsoft.com/zh-cn/library/ee535723(v=office.14).aspx
http://msdn.microsoft.com/zh-cn/library/ee535708(v=office.14).aspx
http://msdn.microsoft.com/zh-cn/library/ee537575(v=office.14).aspx版本控制

相关文章
相关标签/搜索