Question 121
You are designing a SharePoint 2010 workflow that will be used to monitor invoices. The workflow has the following requirements:
.Invoices may have a status of Submitted, Reviewed, Rejected, Returned for Revision, or Approved.
.Not every status applies to every invoice. You need to design the workflow to monitor the status of the invoices as they are processed. Which approach should you recommend?
A. Use Visio 2010 to create the workflow. Select the Set Workflow Status shape and configure it to execute when the status of an invoice changes.
B. Use Visio 2010 to create the workflow. Before each status action, add a Start shape to initiate the workflow action.
C. Use SharePoint Designer 2010 to create a reusable declarative workflow.
D. Use Visual Studio 2010 to create a state machine workflow.web
解析:
你设计一个Sharepoint2010工做流来监控收据清单,须要知足以下要求:
要求1. 收据清单记录必须有提交,检查,拒绝,退回,修订以及赞成等状态。
要求2. 并不是全部的收据清单都有上述的全部状态。你的工做流要能识别和判断出处理过程当中清单的各类状态值。
很明显本题用到状态机工做流,而此类工做流是基于事件驱动的,既然基于事件驱动,你就没法按预约义的方式建立它,换句话说,你必需要经过代码才能建立它,经过代码判断状态并进行相应的处理。在本题的全部备选项中,只有选项D即VS2010才支持代码开发。其它选项(经过Viso或SPD)均没法用来建立状态机工做流。
所以本题答案应该选 D app
参考
http://msdn.microsoft.com/zh-cn/library/gg508985(v=office.14).aspx
http://msdn.microsoft.com/en-us/vstudio/ff623023.aspxide
Question 122
You are designing a custom workflow for a SharePoint 2010 solution. You need to specify which type of workflow form to use. The requirements for the form are:
.Specify the main list, library, or content type that the workflow will affect.
.Provide a form to display the Add a New Workflow page.
.Provide the form where the administrator can specify settings common to all workflows, such as the workflow definition and initiation conditions, and whether the workflow runs on items or folders, or both. You need to specify which type of workflow form should be used for each phase of the workflow process to meet all these requirements. Which form should you recommend?
A. Association
B. Initiation
C. Modifications
D. Task网站
解析:
你设计了一个Sharepoint2010工做流并须要肯定此工做流应该使用哪一种工做流表单以知足下面要求:
要求1.须要肯定此工做流应用到主要的列表,库与内容类型
要求2.提供一个表单用于显示添加一个新工做流界面
要求3.为管理人员肯定针对全部工做流的通用设置信息提供表单。这些设置信息诸如:工做流定义,工做流初始化条件,工做流是否运行于列表项或文件夹或二者都可等等。
你须要肯定在工做流处理的哪一个阶段使用哪一种工做流表单以知足上述要求。
本题涉及Sharepoint工做流表单相关知识:
Sharepoint经过向工做流中添加表单,可使工做流更加动态和灵活。表单使您可以在工做流生命中的预约义时间收集用户的信息,并可以让用户与该工做流的任务进行交互。
Sharepoint工做流表单有以下类型
1.关联(Association)和初始化表单(Initiation) 在任何工做流实际开始以前,将为用户显示关联和初始化表单以供其填写。可使用这些表单让用户可以在工做流开始以前为其设置参数和其余信息。
关联表单说明工做流如何应用于特定列表、库或内容类型【见本题要求1】;初始表单说明工做流如何应用于特定的 SharePoint 项目。
2.修改表单(Modifications) 修改是为用户显示的一些选项,以供其在针对某个项目运行工做流时更改此工做流。而后,能够建立使用户可以指定修改参数的修改表单。
3.任务表单(Task) 也能够为工做流中的任务指定自定义表单。不过,因为任务是分配了内容类型的 SharePoint 项,所以其实是由内容类型来决定用于任务类型的自定义表单。
所以本题答案应该选 A ui
参考
http://msdn.microsoft.com/zh-cn/library/ms457061(v=office.14).aspx
http://msdn.microsoft.com/zh-cn/library/ms481192(v=office.14).aspx
http://msdn.microsoft.com/zh-cn/library/ms480794(v=office.14).aspx
http://msdn.microsoft.com/zh-cn/library/ms438856(v=office.14).aspxspa
Question 123
You are designing a custom workflow for the Human Resources department. The workflow will add the business logic for hiring approval to a SharePoint 2010 Web application. The requirements specify that the workflow must:
.Be used to manage the hiring approvals for the employee new-hire lists on all department sites.
.Encapsulate all of the required business logic for the approval process.
.Make changes to list data that requires higher privileges than the user initiating the workflow might possess.
You need to design the workflow to meet all these requirements. Which approach should you recommend?
A. Add the business logic to an assembly and deploy it to the global assembly cache.
B. Add the business logic to an assembly and place it in the _app_bin directory of the Web application.
C. Add the business logic as a declarative workflow and run it using the SharePoint system account.
D. Create custom actions that specify the business logic and then add the actions to the Web application.设计
解析:
你为人力资源部门建立一个工做流, 此工做流为容许雇用应聘人员添加新的商业逻辑并须要知足以下要求:
要求1. 可用于管理各部门新聘雇员列表的容许雇用审批流程
要求2. 封装了所有所需的商业逻辑到审批流程
要求3. 对列表数据作修改须要比启动工做流更高的操做权限
你该如何操做?
根据题干描述, 此工做流为容许雇用应聘人员添加新的商业逻辑(实际就是各类工做流活动 Workflow Activity),这就意味着你不能够建立声明性工做流(declarative workflow)【选项C】。声明性工做流是在 Microsoft SharePoint Designer 中建立的,并保存为一个或多个 XOML 文件而不是编译的 C# 或 Microsoft Visual Basic 代码。而后,该工做流会以 SharePoint 解决方案包(.wsp 文件)的形式保存到网站的“网站资产”库中,能够下载该解决方案包,而后将其做为解决方案安装到任何网站集中。运行时,会将 XOML 标记转换为代码,并对其进行编译和执行,这种工做流没法让你添加新的商业逻辑进去。
因为工做流的所谓商业逻辑可能是经过建立工做流活动实现。当咱们建立一个工做流活动后,要想使用,首先要部署到sharepoint上。一般咱们将.actions文件copy到 14/template/1033/workflow文件夹下,而后将dll文件添加到GAC,最后在web.config文件中添加 orm
结点到configuration/System.Workflow.ComponentModel.WorkflowCompiler/authorizedTypes结点下.重启iis,在SPD2010中建立workflow的时候就可使用这个activity。
当咱们想在多个farm上部署activity时,这是很麻烦的事,最好就是将activity打包成wsp格式进行部署.workflow activity打包成wsp文件须要在原工程(包括.actions文件以及dll文件)基础上添加feature.xml和manifest.xml件。
因此,从以上描述咱们知道,新建立的商业逻辑应该部署到GAC中【选项A】,至于选项B提到的_app_bin目录,一般不会把用户开发的程序集(包括Web Part)部署到这个目录下。而选项D的描述则试图把工做流活动添加到应用程序(而不是工做流)中,这显然是不对的。
所以本题答案应该选 Axml
参考
http://msmvps.com/blogs/sundar_narasiman/archive/2010/12/26/develop-custom-workflow-activity-for-sharepoint-2010-workflow.aspx
http://msdn.microsoft.com/zh-cn/library/ms414613(v=office.14).aspxblog