Thủ thuật Sharepoint 2010 part 102 pptx

6 115 0
Thủ thuật Sharepoint 2010 part 102 pptx

Đang tải... (xem toàn văn)

Thông tin tài liệu

764 ❘ CHAPTER 25 BUildiNg WorkfloWs iN sharePoiNt 2010 High-Privilege Workfl ows The standard workfl ow runs with the permissions of the user who initiated the workfl ow, so if a user submits a document for approval, that approval workfl ow is running with that user’s creden- tials and can perform only those actions that the user would be able to do in SharePoint. This is lim- iting, as in some instances you would like the workfl ow to perform with higher permissions — for example, when using the Copy List Item or Create List Item actions. You may want to copy or create a list item to an archive list or library that has custom permissions so that all users have read-only access. This will be impossible for a standard workfl ow to run. When the copy or create action step is run, the workfl ow will throw an error. Fortunately, a new feature allows you to change the user account that the workfl ow uses. This is known as an impersonation step, and it allows users to create high-privilege workfl ows. After this step is added to your workfl ow, any subsequent actions run as the author of the workfl ow. This is a great advancement for workfl ow creators, and the only restriction is that the user who is creating the workfl ow must have the appropriate access for any condition or action it will perform. However, it is much more secure to give permissions to one user, rather than a whole group of users. In some situations, a designated user account can be created specifi cally for this purpose. O ce InfoPath 2010 Compatibility With SharePoint Server 2010, you can now create SharePoint Designer workfl ows that leverage Offi ce InfoPath 2010 forms. These forms are much easier to create and edit than the previous ASPX forms used in 2007. You can also use the additional conditional formatting and easy branding that is included with the InfoPath client. For users to be able to have this type of integration with InfoPath browser- enabled forms, you must be using SharePoint Server 2010 Enterprise, which has the licensing for Forms Services. This integration is also possible with SharePoint Foundation 2010 and SharePoint Server 2010 Standard, but users will either have to have the InfoPath client installed on their machines or the environment will need to be licensed to support clientless forms. Associated Columns Another innovative feature available with SharePoint Designer 2010 is the capability to create asso- ciated columns. These columns are placeholders for information needed for the workfl ow to run, and will be added to the list or library schema when the specifi ed workfl ow is associated. These can be columns that require user input, or they can simply be a choice column that contains status infor- mation used throughout the process of the workfl ow that defi nes the subsequent steps. However you choose to use them, they provide yet another advantageous feature that enables users to create suc- cessful workfl ow solutions. Workfl ow Visualization Using Visio Premium 2010 ❘ 765 Site Workfl ows Although workfl ows can now be associated with sites, the out-of-the-box templates do not provide a workfl ow option that can be run at the site level. That may beg the question, why is this needed? In the past, workfl ows were designed for workfl ow instances to run on items. However, in the grand scheme of things, in some workfl ow scenarios list and/or library items aren’t an integral part of a workfl ow process. Yet to create a workfl ow, an item had to be created to trigger the process. This led to workfl ow authors arbitrarily creating useless lists and libraries, simply out of the need to have a workfl ow run. The ability to associate workfl ows at the site level enables workfl ow authors to write solutions that aren’t dependent upon a list or library item. This is benefi cial from both a user and management per- spective, as unnecessary lists and libraries won’t be created in their SharePoint sites. Unfortunately, this advantage is also this option’s major drawback. Because these types of workfl ows are not depen- dent on items, they must be manually started from the SharePoint API or through the SharePoint UI. Any time a business process relies on human input, it will be prone to errors. WORKFLOW VISUALIZATION USING VISIO PREMIUM 2010 In the previous SharePoint release, there was a noticeable gap between business analysts and infor- mation technology workers when it came to workfl ow. The fl ow, or path, of a workfl ow wasn’t always clear. On the business side, users could create nice diagrams and outline what they wanted, but from their perspective, things still got lost in the mix. On the other side, you had IT members trying to decipher a request, without each party having a common tool to visualize or create the end solution. Enter Visio 2010 and the new SharePoint workfl ow visualization feature in SharePoint 2010. Whether it’s creating a fl ow chart in Visio 2010 and then exporting the Workfl ow Visio Interchange (*. vwi) fi le to SharePoint Designer 2010, or creating a workfl ow in SharePoint Designer 2010 and importing the . vwi fi le into Visio 2010, the solution provides the ultimate workfl ow collaborative tool. Although it is incapable of applying the conditions and actions that make up the bulk of a workfl ow, this new feature bridges the gap between the two sets of users and gets everyone on the same page. In addition to playing a role in creating workfl ows and/or visualizing them, you can also view the status of workfl ows that are currently running in SharePoint 2010 environments. All that is required is to confi gure the workfl ow with the “Show workfl ow visualization on Status page” setting. Being able to view the individual steps of a custom workfl ow as they execute makes debugging and trou- bleshooting issues much easier. It’s true that you could always log workfl ow history entries for every step in the workfl ow, but this new feature eliminates that tedious extra work. To fully utilize the visualization functionality, you must have Visio Premium 2010, SharePoint Designer 2010, and SharePoint Server 2010 Enterprise. 766 ❘ CHAPTER 25 BUildiNg WorkfloWs iN sharePoiNt 2010 USING VISUAL STUDIO 2010 TO CREATE WORKFLOWS The last option to create workfl ows for SharePoint 2010 is using Visual Studio 2010. This is by far the most fl exible option and it can be used to create almost any type of workfl ow an organization could need. The major downside to this option is cost and time. Creating a workfl ow in Visual Studio requires a seasoned developer. Out-of-house developer resources can be expensive, and if you have developers in-house, they are typically in high demand, so availability may be nonexistent. Therefore, time is a factor not only from an availability standpoint, but depending upon the solution, chances are good that the solution itself will take some time to create. In addition, best practices recommend that workfl ow solutions created with Visual Studio 2010 be packaged as . wsp fi les and installed and deployed to your SharePoint environment as Features. This is an added portion of time that must be accounted for when planning this type of solution. Even taking into account these disadvantages, Visual Studio 2010 is still the ideal method for creating complex reusable workfl ow solutions. SELECTING A WORKFLOW METHOD Finding the right method for creating a workfl ow solution can be relatively simple. The fi rst step is clearly defi ning the workfl ow. This means creating a fl ow chart with the exact functionalities, condi- tions, and actions that are needed. Identify the plan, and then fi nd the method. If the out-of-the-box workfl ows don’t provide the functionality you need, then you have to go with SharePoint Designer (possibly in conjunction with Visio Premium 2010 and SharePoint Server 2010 Enterprise) or Visual Studio 2010. From there, look at the need for reusability. If you need a truly reusable template, Visual Studio may be the way to go. If you think you can use the reusable workfl ow in SharePoint Designer, that option would be best from a time and cost perspective. We’ve said that both SharePoint Designer 2010 and Visual Studio 2010 can be used to create custom reusable workfl ows, but keep in mind that the SharePoint Designer 2010 reusable workfl ows are limited. To create a reusable workfl ow in SharePoint Designer 2010, the workfl ow is associated with a content type. This content type can then be reused in any list or library you want. The reusability of the workfl ow requires that the specifi ed content type be added to a list or library for the workfl ow to be available. Visual Studio 2010 reusable workfl ows are reusable in the sense that they are deployed as solutions, activated as features, and can be used wherever it is needed. This allows users to select a Visual Studio 2010 workfl ow template and associate it with any list, library, content type, or site of their choice. This makes the Visual Studio 2010 solutions a complete and unrestricted “reusable” option. It sounds simple, right? In fact, fi n d i n g the right method may be relatively easy, but actually choosing the method can be much more diffi cult. Unfortunately, everything comes into play: cross-department communication problems, offi ce politics, money, time, and so on. This can make the process diffi cult Summary ❘ 767 to finalize. Moreover, the workflow requirements always seem to be in that little gray area where you are unsure whether the out-of-the-box options will suffice, whether SharePoint Designer will work, or whether you have the time and money to create something custom with Visual Studio. Ultimately, the best advice is to find what will work for your organization. Sometimes this means settling for less and going with the out-of-the-box templates, and sometimes this means going all out and creating a workflow to end all workflows. Either way, each scenario is unique, so be prepared and know what you have to work with. SUMMARY A successful SharePoint 2010 collaborative solution effectively incorporates workflow into its stra- tegic layout. By utilizing the capability to automate various business processes, your organization can reap the benefits of consistency and efficiency without the negative costs related to process management. Creating, editing, managing, and deleting workflows, workflow associations, and workflow instances can be done from several applications and user interfaces. As you learned in this chapter, each has its own advantages and disadvantages. SharePoint 2010, Office 2010, Visio 2010, SharePoint Designer 2010, and Visual Studio 2010 all contain several new and improved tool sets that can be leveraged to create workflow solutions. From the creation of flowcharts and defining processes through the build- ing of the workflow solutions, users have the tools needed to implement successful solutions. Index . must have Visio Premium 2010, SharePoint Designer 2010, and SharePoint Server 2010 Enterprise. 766 ❘ CHAPTER 25 BUildiNg WorkfloWs iN sharePoiNt 2010 USING VISUAL STUDIO 2010 TO CREATE WORKFLOWS The. chapter, each has its own advantages and disadvantages. SharePoint 2010, Office 2010, Visio 2010, SharePoint Designer 2010, and Visual Studio 2010 all contain several new and improved tool sets that. must be using SharePoint Server 2010 Enterprise, which has the licensing for Forms Services. This integration is also possible with SharePoint Foundation 2010 and SharePoint Server 2010 Standard,

Ngày đăng: 02/07/2014, 12:20

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan