Archive

Archive for the ‘SharePoint Designer 2010’ Category

Preparation materials published for Exam 70-668: PRO: Microsoft SharePoint 2010, Administrator

The study guide has been published for

Exam 70-668: PRO: Microsoft SharePoint 2010, Administrator

 

Skills Being MeasuredThis exam measures your ability to accomplish the technical tasks listed below.The percentages indicate the relative weight of each major topic area on the exam.

Designing a SharePoint 2010 Farm Topology (27 percent)

  • Design physical architecture.
    • This objective may include but is not limited to: translating information architecture to physical architecture, determining capacity for a SharePoint farm (storage, number of users, bandwidth utilization, intranet/extranet, hardware), and scaling Web farm and services infrastructure
  • Design SharePoint integration with network infrastructure.
    • This objective may include but is not limited to: planning for internal and external farm communications, establishing network perimeter configuration, networking, Active Directory, DNS, SQL storage, IIS, and analyzing infrastructure services
  • Design logical taxonomy.
    • This objective may include but is not limited to: planning sites and site collections, planning for collaboration sites, planning My Site sites, planning for zones, planning for Service Applications, Web applications, content databases, sites and sub-sites vs. libraries, libraries vs. folders vs. document sets, security boundaries, site hierarchy, and content deployment path methodology
  • Plan for sandbox solutions.
    • This objective may include but is not limited to: content isolation, feature deployments, and trusted solutions
  • Plan for farm deployment.
    • This objective may include but is not limited to: sequential deployment, planning standalone deployment (Microsoft SQL Server Express), planning single-server farm (SQL Server), planning multi-server deployment in an N-Tier Farm, and designing a SharePoint virtual environment
  • Plan for availability.
    • This objective may include but is not limited to: designing SQL Server failover clustering strategy, types of availability (high-performance, acceptable downtime, Recovery Point Objective, Recovery Time Objective ), types of mirroring, high availability, high protection, whole farm as a failover cluster, and designing the Web Front-End NLB strategy

Planning SharePoint 2010 Deployment (26 percent)

  • Plan service applications.
    • This objective may include but is not limited to: formulating a Business Connectivity Services (BCS) strategy, planning a Microsoft Excel Services strategy, implementing a BI solution, planning service application server roles, and planning a Web server forms strategy (Plan InfoPath Forms Services)
  • Plan a SharePoint component strategy.
    • This objective may include but is not limited to: Web parts, Web applications, Microsoft .NET, Microsoft Silverlight, SharePoint features and solutions, workflow, site templates, site definitions, multilingual deployment, master pages and layout files, and e-mail integration
  • Plan an upgrade strategy.
    • This objective may include but is not limited to: supporting hardware upgrades (for example, 32 to 64 bit), OS upgrade, in-place upgrade, MOSS upgrade, and SQL Server upgrade
  • Design a migration strategy.
    • This objective may include but is not limited to: database migration, custom features, read-only and detached databases, designing a test and QA implementation plan (for example, development to production), migrating content databases, moving content between farms, moving content to and from the farm, moving content within the farm, and rollback
  • Design security architecture.
    • This objective may include but is not limited to: planning security for WebApp site collection, designing SharePoint users and groups administration, taxonomy of SharePoint security groups, managed accounts, site security (permission levels , list permissions, site permissions, personal permissions, default and custom security groups), and planning for Secure Sockets Layer (SSL)
  • Plan and deploy authentication methods.
    • This objective may include but is not limited to: planning for integration of multiple authentication sources/types, planning for NTLM authentication, planning for Kerberos authentication, planning for Forms-Based Authentication (FBA), planning for Claims Authentication (Identity and Access Management), planning for Secure Store Service

Defining a SharePoint 2010 Operations Strategy and Business Continuity (25 percent)

  • Design a maintenance strategy.
    • This objective may include but is not limited to: preparing test plans for patching and maintenance, SharePoint Maintenance Manager, rebuilding SQL indexes, search maintenance
  • Recommend provisioning strategies.
    • This objective may include but is not limited to: managing self-service components (My Sites, service architecture administration), delegating site administration, limiting site templates and page layouts, assigning quotas, defining policy for Web application
  • Establish an enterprise monitoring plan.
    • This objective may include but is not limited to: developing monitoring points for performance and availability, utilizing performance monitoring, analyzing search reports, Web analytics, diagnostic logging, usage logging, analyzing health and usage data (SharePoint Health Analyzer), and validating farm topology against performance requirements
  • Plan SharePoint backup and restore.
    • This objective may include but is not limited to: developing and testing recovery strategy and implementation plan, server recovery, site recovery, granular backup and recovery strategy, exporting a site or list, recovering data from an unattached content database, and backup and restore of the following: farm, farm configuration, site collection, Web applications, Secure Store Service, snapshots, content database, configuration database, custom features, solutions, code, service, site, list, document library, performance site collection, and recycle bin

Planning for Search and Business Solutions (22 percent)

  • Define search requirements.
    • This objective may include but is not limited to: types of data, types of distribution (Internet, extranet), segregation of data, index file location, index size, federation requirements, content sources, search scopes, search taxonomy, server name mappings, promoting or demoting exclusions, synonyms and compound search processing, and defining facets for search
  • Plan search topology.
    • This objective may include but is not limited to: indexing strategy, index partition, query component, property database, crawler component, separate crawler servers, and administration component
  • Plan an enterprise search strategy.
    • This objective may include but is not limited to: designing information access and enterprise search strategy, planning for metadata and search, people search, search reporting, and planning enterprise search technology
  • Plan enterprise content management.
    • This objective may include but is not limited to: records management, BPM (record deployment), document management, metadata planning, information management policies, implement data taxonomy structure, Web Content Management (WCM), and Information Rights Management (IRM)
  • Plan for social computing and collaboration.
    • This objective may include but is not limited to: user profile service, user profiles, organization profiles, audiences, My Sites, social tags, and planning enterprise wikis, blogs, and personalization sites
  • Plan for a business intelligence strategy.
    • This objective may include but is not limited to: PerformancePoint service (dashboards and scorecards), Excel Services Service, Visio Graphics Service, SQL Reporting Services, chart Web parts, and report center
May 17th, 2010 Neal McFee 1 comment

Preparation materials published for Exam 70-667: TS: Microsoft SharePoint 2010, Configuring

The study guide has been published for

Exam 70-667: TS: Microsoft SharePoint 2010, Configuring

 

Skills Being MeasuredThis exam measures your ability to accomplish the technical tasks listed below.The percentages indicate the relative weight of each major topic area on the exam.

Installing and Configuring a SharePoint Environment (25 percent)

  • Deploy new installations and upgrades.
    • This objective may include but is not limited to: running Visual Upgrade, performing an in-place upgrade, performing a database attach upgrade, analyzing a PreUpgradeCheck report, installing language packs, and scripting installations; analyzing ULS logs, installation error logs, and event logs to identify installation problems; and repairing installation errors
  • Configure SharePoint farms.
    • This objective may include but is not limited to: configuring inter-server communications, server roles, high availability, InfoPath Forms Services (IPFS), Alternate Access Mappings (AAM), external sites, host headers, and applying and managing patches
  • Configure service applications.

    • This objective may include but is not limited to: configuring service applications such as Business Connectivity Services (BCS), Access Services, Visio Services, Microsoft Office PerformancePoint Server 2007, user profiles, Microsoft Office Excel services, Managed Metadata Services (MMS), and IPFS
  • Configure indexing and search.
    • This objective may include but is not limited to: configuring FAST Search for SharePoint, crawl schedules, iFilters, crawl rules, content sources, scopes, managed properties, content types, search components, index partitioning, and federated search locations

Managing a SharePoint Environment (26 percent)

  • Manage operational settings.
    • This objective may include but is not limited to: configuring logging, quotas, monitoring levels, health reports, security, and SQL Server Reporting Services (SSRS) integration
  • Manage accounts and user roles.
    • This objective may include but is not limited to: managing user accounts, group accounts, managed accounts, computer accounts, and service accounts; and delegating site collection administration
  • Manage authentication providers.
    • This objective may include but is not limited to: managing NTLM, Kerberos, claims-based, and forms-based authentication; and configuring Secure Store Service (SSS) and Active Directory Federation Services (AD FS).

Deploying and Managing Applications (24 percent)

  • Manage Web Applications.
    • This objective may include but is not limited to: managing databases, Web Application settings, security, and policies.
  • Manage site collections.
    • This objective may include but is not limited to: managing site collection policies, features, caching, and auditing; configuring site collection security; configuring multi-tenancy; and configuring site collection quotas and locks.
  • Deploy and manage SharePoint solutions.
    • This objective may include but is not limited to: deploying and managing SharePoint solution packages, managing sandbox solutions, and managing user solutions

Maintaining a SharePoint Environment (25 percent)

  • Backup and restore a SharePoint environment.
    • This objective may include but is not limited to: configuring backup settings; backing up and restoring content, search, and service application databases; detaching and attaching databases; and exporting lists and sites
  • Monitor and analyze a SharePoint environment.
    • This objective may include but is not limited to: generating health, administrative, and Web analytics reports; interpreting usage and trace logs; identifying and resolving health and performance issues
  • Optimize the performance of a SharePoint environment.
    • This objective may include but is not limited to: configuring resource throttling (large list management, object model override); configuring remote Binary Large Objects (BLOB) storage and BLOB and object caching; and optimizing services

Preparation Tools and ResourcesTo help you prepare for this exam, Microsoft Learning recommends that you have hands-on experience with the product and that you use the following training resources. These training resources do not necessarily cover all of the topics listed in the "Skills Measured" tab.

Classroom Training

  • 10174A: TS ITPro: Configuring and Managing Microsoft SharePoint 2010 (5 Days)

Microsoft E-Learning There is no Microsoft E-Learning training currently available.

Microsoft Press Books There are no Microsoft Press books currently available.

Practice Tests There are no practice tests currently available.

Have Questions? For advice about training and certification, connect with peers:

For questions about a specific certification, chat with a Microsoft Certified Professional (MCP):

To find out about recommended blogs, Web sites, and upcoming Live Meetings on popular topics, visit our community site:

May 17th, 2010 Neal McFee No comments

Free evaluation of online hosted SharePoint 2010

Here is a free trial to a hosted instance of SharePoint 2010. Try for 90 days and check out the new features of SharePoint 2010 on your own hosted version.

Thanks to ICS Solutions which has this to say about their offering:

Simplifying the evaluation of SharePoint 2010 by providing free and instant online access to a unique, private and customisable beta trial. The portal allows users to share in the same private space without the hassle of installing the beta software locally – saving time, money and IT resources.

The Portal aims to be one of the world’s most comprehensive sources of SharePoint 2010 information with over 600 vetted and categorised items that will assist in your evaluation. 

Dip into SharePoint 2010

http://www.dipintosharepoint2010.co.uk/Pages/default.aspx

February 22nd, 2010 Neal McFee 1 comment

SharePoint Developer credit class at DePaul University in Chicago

This looks like a great option to learn SharePoint 2007 and SharePoint 2010 development while earning college credit at a well known University in Chicago.

It is rare to see universities offering classes on very current technologies not to mention offering college credit for a very current version and the future version of SharePoint.

http://www.cdm.depaul.edu/ipd/Programs/Pages/SharePointDeveloperProgram.aspx

Overview
A 10-week comprehensive program covering Microsoft SharePoint development. The program exposes students to SharePoint architecture and the use of SharePoint as a development platform for building customized solutions, focusing on SharePoint as a collaboration framework and content management system.

The program will begin with an overview of the various product editions and their features as well as a refresher of the .NET 2.0+ fundamentals that SharePoint is built upon. The program will then provide in-depth coverage of the core development constructs of SharePoint to enable the student to understand how the pieces fit together in common use cases. Finally, the program will expose the student to current development trends and how they will carry over into the next release of the product, SharePoint 2010.

Admission Requirements
Applicants must have a solid programming background (at least two years of professional experience is preferred), including some experience building dynamic websites using ASP.NET and C#, and knowledge of basic HTML/CSS.

Dates & Location: Spring Quarter 2010
Application deadline: Mar. 12, 2010
Tuition deadline: Mar. 18, 2010
Classes begin: Mar. 30, 2010 
Classes end: Jun. 3, 2010
Classes meet on Tuesday and Thursday evenings (5:45pm-9pm) at DePaul University’s Loop Campus at 243 South Wabash Avenue, Chicago, IL.

Online Section:
Students may elect to register for an online section of the course. For more information about the online section, click here.
DePaul University reserves the right to cancel any program prior to that program’s first class meeting.

Course Credit

The SharePoint Developer Program is an accredited course of DePaul University, which follows the quarter system (as opposed to the semester system).
Course #: IPD 358
Credit hours: 10 undergraduate

For a complete program description, download the program brochure.

February 20th, 2010 Neal McFee No comments

Course 50354A: SharePoint 2010 SharePoint Designer

http://www.microsoft.com/learning/en/us/Course.aspx?ID=50354A&Locale=en-us#tab2

 

Course Outline

Module 1: Overview

A simple introduction module.

Lessons

  • Overview

After completing this module, students will be able to:

  • Understand your course, classroom, classmates, facility and instructor.

Module 2: 2010 ChangesIn this module we are going to take a look at some of the major changes between SharePoint Designer 2007 and SharePoint Designer 2010.Lessons

  • Changes

After completing this module, students will be able to:

  • Describe the changes to SharePoint Designer 2010

Module 3: User Interface

In this module we take a look at common features of the basic team site. Throughout this course we will create and manage several different pieces of content and the team site will be our site of choice for doing this!  Understanding this site is the center piece of starting your journey of understanding SharePoint and applying it to you everyday life!

Lessons

  • New SharePoint Features

Lab : SharePoint Designer Interface

  • Explore new interface of SharePoint Designer
  • Review new work areas of Designer
  • Browse Site Pages
  • Browse Master Pages
  • Browse Lists and Libraries
  • Browse Workflows
  • Browse Content Types
  • Browse Data Sources
  • Browse Entities
  • Explore Site Structure

Lab : SharePoint Designer (Basics)

  • Create a new site
  • Create a new page
  • Create a new master page
  • Attach a master page
  • Create a list
  • Change list settings
  • Create Content Type
  • Create/Modify CSS

Lab : SharePoint Designer (Basics)

  • Check-In/Check-Out
  • Add Web Parts
  • Add Web Part Zone
  • Adding Images (_images directory)
  • Reset to Site Definition

After completing this module, students will be able to:

  • Describe the new UI features of the basic team site
  • Log in and out of a site
  • What the Quick Launch bar is
  • Describe the Security Trimmed Interface of SharePoint
  • Know where to create items on a site
  • Find out who has access to a site
  • Understand how to undelete items on a site (recycle bin)

Module 4: Data Views

In this module we are going to take a look at Data Views and Data Sources.

Lessons

  • DataSources and DataViews

Lab : DataViews

  • Create/Manage Data Views
  • Create/Manage Data Sources
  • Merge Two Data Sources
  • Link Two Data Sources
  • Data View Parameters

After completing this module, students will be able to:

  • How to create and use Data Views and Data Sources

Module 5: External Content TypesIn this module we are going to take a look at the new Business Connectivity Services (BCS), the replacement/new version of Business Data Catalog (BDC).Lessons

  • Business Connectivity Services

Lab : External Content Types

  • Explore External Content Types
  • Create a new External Content Type
  • Create an External List

After completing this module, students will be able to:

  • Understand what BCS is
  • How to create and use Entities with SharePoint Designer

Module 6: WorkflowsIn this module we are going to take a look at implementing workflows with SharePoint Designer 2010.Lessons

  • Workflows

Lab : BuiltInActivities (2007)

  • Use one of each Built-In Activity (2007)

Lab : BuiltInActivities (2010)

  • Use one of each Built-In Activity (2010)

Lab : LoopingWorkflow

  • Create a looping set of workflows

Lab : ReusableWorkflows

  • Create Reusable Workflows (Site/Global)
  • Export a workflow to Visio
  • Import a workflow from Visio
  • Save as Template

Lab : ModifyOOBWorkflow

  • Modify Out Of Box Workflows

After completing this module, students will be able to:

  • Build workflows with SharePoint Designer 2010
  • Understand how to edit built in workflows
  • Implement logging in your workflows

Before attending this course, students must have:

  • Understanding of SharePoint site elements (Lists, Libraries, Content Types, etc)
February 12th, 2010 Neal McFee No comments

United States Olympic Committee Media Site Shines With Microsoft SharePoint Server 2010

Everything the U.S. Olympic press corps needs to report from the Games is now in one place, with the ability to share, e-mail, print and download information from one simple Web site.

http://www.microsoft.com/Presspass/Features/2010/jan10/01-27USOCpresssite.mspx

February 12th, 2010 Neal McFee No comments

SharePoint Server 2010 Information Worker Demonstration Virtual Machine (Beta)

Here is another development VHD that contains the following products:

Microsoft Download Center

  1. Windows Server 2008 SP2 Standard Edition x64, running as an Active Directory Domain Controller for the “CONTOSO.COM” domain with DNS and WINS
  2. Microsoft SQL Server 2008 SP1 + CU2 Enterprise Edition with Analysis, Notification, and Reporting Services
  3. Microsoft Office Communication Server 2007 R2
  4. Visual Studio 2010 Beta 2 Ultimate Edition
  5. Microsoft SharePoint Server 2010 Enterprise Edition Beta 2
  6. Microsoft Office Web Applications Beta 2
  7. FAST Search for SharePoint 2010 Beta 2
  8. Microsoft Project Server 2010 Beta 2
  9. Microsoft Office 2010 Beta 2
  10.   Microsoft Office Communicator 2007 R2

Keep in mind that many of the software included on the VHD require activation after 30 days.

MSDN, TechNet, or Partner Action Pack license keys will active software that is not Beta.

If you wish to activate Beta software check the Microsoft.com sites for each respective product and retrieve the key there.

February 11th, 2010 Neal McFee No comments

Code samples from: – SharePoint Conference 2009, "Advanced Development for Silverlight 3 in SharePoint 2010"

Code samples from:
- SharePoint Conference 2009, "Advanced Development for Silverlight 3 in SharePoint 2010"
- MSDN Webcast Feb 2010, "Developing Rich Solutions in Silverlight for SharePoint 2010"
- ReadMe.docx

This release includes a recording of the MSDN Webcast,

“Developing Rich Solutions in Silverlight for SharePoint 2010”

along with the code shown in the webcast. These are updates of the same solutions shown at SharePoint Conference 2009 in the talk, “Advanced Development for Silverlight 3 in SharePoint 2010”; this Code Gallery release will serve to provide the sample code from both talks.

The code samples are as follows:

SharePoint and Silverlight from Scratch

This walkthrough was presented only in the webcast to show how to get stared developing in Silverlight for SharePoint 2010. The sample includes only the snippets (in Visual Studio snippet format); it will be necessary to watch the webcast to see how to use them.

Picture View Web Part

This is a Silverlight web part that shows a slide show of images stored in a SharePoint picture library. This demonstrates how to use the HTML bridge to reduce the number of round-trips to the server. In this case, the server side web part passes the URL’s of the pictures to Silverlight in a hidden form field, removing the need for the Silverlight application to query the server for the list of pictures.

Paged List View Web Part

This is a Silverlight web part that shows a grid of data from a SharePoint list. It allows paging, sorting and filtering, and only loads an n-row page at a time to allow viewing a large data set without downloading the whole thing to Silverlight. In addition to loading the first “page” of data in a hidden field (like the Picture View web part) , it obtains additional content using ADO.NET Data Services and SharePoint’s new RESTful interface.
NOTE this release does not include the target list, and the sample will not run without it. A future release may include a matching list definition with sample data.

Video Field Control

This adds a Video field to SharePoint, using Silverlight applications to view and select the video. The actual field simply stores the URL of the video. The Silverlight display application is very simple, and just plays the video based on this URL. The selector application is more interesting as it uses the client object model to provide a simple browsing and preview feature in which the user can select a site, library and video to be shown.

Connected Silverlight Web Parts

This sample includes a pair of web parts – a source and target. When connected via the web browser, text entered into the source web part will appear on all targets as it is typed. This shows how to use SharePoint’s web part connection mechanism – which runs on the server side – as a broker to connect the Silverlight applications. The Silverlight applications communicate using the new Silverlight 3.0 Local Messaging API.

 

Extracted from

http://code.msdn.microsoft.com/SP2010Silverlight

February 11th, 2010 Neal McFee No comments

Minimal master page file for SharePoint Foundation 2010

This master page is meant as a starting point for creating master pages for Microsoft SharePoint Foundation 2010. Most of the controls on the page are hidden. You can move these controls into other locations based on your design. You can find the default controls in the v4.master page that ships with the product.

 

Example starter.master

February 11th, 2010 Neal McFee No comments

Walkthrough 3: SharePoint Designer Workflows imported to Visual Studio 2010

 

Exercise Duration : 20 minutes

Exercise Overview

This exercise shows how to create a custom workflow activity used by a SharePoint Designer reusable workflow and deploy them together as a single *.WSP. It also shows how to import that whole workflow model into Visual Studio 2010.

Feature Overview 

SharePoint Designer allows creating a workflow that is reusable across multiple lists and multiple sites. The workflow can be exported as a SharePoint Solution File (*.WSP). 

Task 1: Create and Prepare Project 

1. Open Visual Studio 2010 from the Start | Programs | Visual Studio 2010 menu.

2. Create a new project by using File | New Project.

3. Pick the SharePoint | 2010 templates.

4. From the SharePoint | 2010 templates select the Empty Project template.

5. Use SPDWorkflowDemo as the name.

6. Set the location to be C:\SPHOLs.

7. Press OK to create the project.

image

 

 

8. When the SharePoint Customization Wizard dialog appears, select Deploy as a farm solution, and press Finish.

 

image

Task 2: Create a new Workflow Activity for use by the Reusable Workflow

1. Right-click on the SPDWorkflowDemo solution in the Solution Explorer and select Add | New Project.

2. Under the Visual C# | Workflow project templates, select  the Workflow Activity Library template.   

3. Name the project SPDActivityDemo and press OK to add the project to the SPDWorkflowDemo solution. 

 

image

4. Right-click on the SPActivityDemo project in the Solution Explorer and select Add Reference.

5. Under the .Browse tab, browse to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI  and select both Microsoft.SharePoint.dll and Microsoft.SharePoint.WorkflowActions.dll.

6. Press OK to add these two references to the SPDActivityDemo project.

7. Right-click on the Activity1.cs (under the SPActivityDemo project in the Solution Explorer) and select rename.

8. Rename the file CreateDocumentLibrary.cs.

9. Select Yes when the Microsoft Visual Studio dialog appears to allow Visual Studio to re-factor the code.

 

 

Task 3: Add code to create a document library based on parameters passed to our activity.

 

1. Right-click on the CreateDocumentLibrary.cs activity and select View Code.

2. Change the CreateDocumentLibrary base class from SeqeuenceActivity to : Activity

 

public partial class CreateDocumentLibrary: Activity

 

3. Add the following using statements to the activity:

 

using Microsoft.SharePoint;

using Microsoft.SharePoint.Workflow;

using Microsoft.SharePoint.WorkflowActions;

 

4. Add a new DependencyProperty to the CreateDocumentLibrary class named UrlProperty of type string. (Hint – type wdp inside of the class definition and then tab twice – this will create the DependencyProperty using the built-in Workflow Dependency Property snippet)

This will be the location where the document library will be created.

 

public static DependencyProperty UrlProperty = DependencyProperty.Register("Url", typeof(string), typeof(CreateDocumentLibrary));

[DescriptionAttribute("Url of base site")]

[CategoryAttribute("Input Property")]

[BrowsableAttribute(true)]

[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]

[ValidationOption(ValidationOption.Required)]

public string Url

{

    get

    {

        return ((string)(base.GetValue(CreateDocumentLibrary.UrlProperty)));

    }

    set

    {

        base.SetValue(CreateDocumentLibrary.UrlProperty, value);

    }

}

 

5. Add a new DependencyProperty  of type string to the activity named DocLibNameProperty.

This will be the name of the document library created by the activity.

 

 

public static DependencyProperty DocLibNameProperty = DependencyProperty.Register("DocLibName", typeof(string), typeof(CreateDocumentLibrary));

[DescriptionAttribute("Used as doc lib name")]

[CategoryAttribute("Input Property")]

[BrowsableAttribute(true)]

[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]

[ValidationOption(ValidationOption.Required)]

public string DocLibName

{

    get

    {

        return ((string)(base.GetValue(CreateDocumentLibrary.DocLibNameProperty)));

    }

    set

    {

        base.SetValue(CreateDocumentLibrary.DocLibNameProperty, value);

    }

}

 

6. Add the following code inside of the CreateDocumentLibrary class:

 

protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)

{

    CreateDocLib();

    return ActivityExecutionStatus.Closed;

}

 

private void CreateDocLib()

{

    using (SPSite sps = new SPSite(Url))

    {

        using (SPWeb spw = sps.RootWeb)

        {

            Guid ID = spw.Lists.Add(DocLibName, DocLibName + " Document Library", SPListTemplateType.DocumentLibrary);

            SPList spdl = spw.Lists[ID];

            spdl.OnQuickLaunch = true;

            spdl.Update();

        }

    }

}

 

Task 4: Configure activity for deployment.

 

1. To deploy the assembly to the GAC with your SharePoint project you need to configure the project to have a strong-name.

2. Right-click on the SPActivityDemo project and select Properties.

3. Click on the Signing tab in the properties page.

4. Select New under the Choose a strong name key file text from the combo box.

5. Type key as the Key file name value, uncheck Protect my key file with a password and press OK.

 

image

6. Build your project (CTRL-SHIFT-B or use Build | Build Solution) and fix any errors.

7. Right click on the SPDWorkflowDemo project and click Add | SharePoint Mapped Folder.

image

8. Browse to Template\1033\Workflow and select OK to add the mapped folder to the SPWorkflowDemo

9. Right-click on the  SPDWorkflowDemo folder in the Solution Explorer (under the Workflow folder).  

10. Right-click on the Workflow folder and select Add | New Item.

11. Select XML File from the list of Installed Templates, name the file SPDActivityDemo.ACTIONS¸ and select OK to add the file.

image

 

12. Replace the contents of SPDActivityDemo.ACTIONS with the following XML

 

<WorkflowInfo>

  <Actions Sequential="then" Parallel="and">

    <Action Name="Create Document Library"

  ClassName="SPDActivityDemo.CreateDocumentLibrary"

  Assembly="SPDActivityDemo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1a4a7a2c3215a71b"

  AppliesTo="all"

  Category="Labs">

      <RuleDesigner Sentence="Document Library Name %1 to site %2.">

        <FieldBind Field="DocLibName" Text="Document Library Name"  

           DesignerType="TextArea" Id="1"/>

        <FieldBind Field="Url" Text="Url of base site" Id="2" 

           DesignerType="TextArea"/>

      </RuleDesigner>

      <Parameters>

        <Parameter Name="DocLibName" Type="System.String, mscorlib" 

      Direction="In" />

        <Parameter Name="Url" Type="System.String, mscorlib" 

      Direction="In" />

      </Parameters>

    </Action>

  </Actions>

</WorkflowInfo>

10. IMPORTANT – Update the PublicKeyToken within the .ACTIONS file with the public key token from SPDActivityDemo.dll. Do not use the PublicKeyToken in this example. Ensure you generate your own. 

11. To find the PublicKeyToken start a Visual Studio 2010 Command Prompt from the Start | All Programs | Visual Studio 2010 | Visual Studio Tools |Visual Studio Command Prompt (2010) menu

12. Type the following command:

 

sn -tc:\SPHOLS\SPDWorkflowDemo\SPDActivityDemo\bin\Debug\SPDActivityDemo.dll | clip

13. In the of SPDActivityDemo.ACTIONS file highlight the value of the PublicKeyToken ("1a4a7a2c3215a71b") and paste (CTRL-V).

14. Remove all the pasted text except the value of your public key.  Make sure there are no extra spaces or line feed characters after the public key token (the quote needs to be next to the value of the public key token).

15. Highlight the whole value of the Assembly attribute and copy that value to the clipboard (CTRL-C).

 

 

Task 5: Add the SPDActivityDemo activity to be deployed with SPDWorkflowDemo.

1. In the Solution Explorer, under the SPDWorkflowDemo project, double-click on Package folder

2. In the Package designer click on Advanced (at the bottom of the designer in the middle pane).

3. Click on the Add button.

4. Click on the ellipses button in the Add Custom Assembly dialog.  Browse to the SPDActivityDemo.dll file (C:\SPHOLS\SPDWorkflowDemo\SPDActivityDemo\bin\debug).

5. Within Safe Controls add the following:

 

Assembly Name: SPDActivityDemo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=YOURPUBLICKEY – ensure you use a Public Key Token you generated using the sn.exe utility. (Hint – you can paste the value you copied to the clipboard in the last step here).

Name Space: SPDActivityDemo

Safe: Checked

Type Name : *

6. Select OK to add the assembly as part of the SharePoint project deployment package.

 

image

 

Task 6: Configure a Feature using Feature Designer

1. Right-click on SPDWorkflowDemo project Features folder and select Add Feature.

2. Right-click on the Feature1 node and select Rename. Rename it to SPDWorkflowDemoFeature. 

3. In the Feature designer change the value of the Scope combo box to WebApplication.

4. Change the feature title to SPDWorkflowDemoFeature. 

 

image

Task 7: Add and code a Event Receiver for the Feature

1. Right-click on the SPDWorkflowDemoFeature in the Solution Explorer and select Add Event Receiver 

 

image

2. Add a using statement to the top of the code file that appears in the editor:

 

using Microsoft.SharePoint.Administration;

 

3. Add the following code to your FeatureReceiver class declaration: 

 

 

public override void FeatureActivated(SPFeatureReceiverProperties properties)

{

    SPWebApplication wappCurrent = (SPWebApplication)properties.Feature.Parent;

    SPWebConfigModification modAuthorizedType = new SPWebConfigModification();

    modAuthorizedType.Name = "AuthType";

    modAuthorizedType.Owner = "SPDActivityDemo";

    modAuthorizedType.Path = 

    "configuration/System.Workflow.ComponentModel.WorkflowCompiler/authorizedTypes";

    modAuthorizedType.Type =

    SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode;

    modAuthorizedType.Value = @"<authorizedType Assembly=""SPDActivityDemo, 

    Version=1.0.0.0, Culture=neutral, PublicKeyToken=YOURPUBLICKEYTOKEN"" 

    Namespace=""SPDActivityDemo"" TypeName=""*"" Authorized=""True"" />";

    wappCurrent.WebConfigModifications.Add(modAuthorizedType);

    wappCurrent.WebService.ApplyWebConfigModifications();

}

 

4. Note: You will need to update the YOURPUBLICKEYTOKEN section in the above code with the correct key from the SPDActivityDemo.ACTIONS file.

5. Build and Deploy the SPDWorkflowDemo project by right-clicking on the SPDWorkflowDemo project in the Solution Explorer and select Deploy.

 

Task 8: Create a re-usable workflow using SharePoint Designer

1. Start SharePoint Designer 2010  from the start menu under All Programs | Microsoft Office | Microsoft SharePoint Designer 2010.

2. Click the Open Site button, and put in the address of the site you used to deploy the SPDWorkflowDemo project to as the Site Name.  Press Open twice. Once to open the site, the second to cause SharePoint Designer to open the site at the root level.  

 

image

 

3. Click on the Workflows node in the navigation pane on the left.

4. Click the Workflows tab in the ribbon.

5. Click the Reusable Workflow button in the Workflows ribbon.

image

 

6. Enter SPDWorkflow as the name of the workflow, and press OK to create the workflow.

 

image

 

7. Click the Workflow ribbon, then click Actions and scroll down to Labs and click Create a Document Library. Note: This is the activity you created in Visual Studio 2010 previously

image

 

8. Click the Fx button and select Current Item:Title as the document library name and type in http://servername as the Url of the base site. Click Save

image

 

9. Save the workflow (click the Save button or press CTRL-S).

10. Click the Workflows in the Navigation pane on the left again.

11. Highlight the SPDWorkflow in the right pane.

12. Click the Workflow Ribbon again.

13. Click Save as Template to save the .WSP file in the Site Assets Library SharePoint list.

image

 

14. Go back to Visual Studio 2010.

15. In the Server Explorer (if not visible, go to View | Server Explorer), expand SharePoint Connections 

16. Find your site. If your site isn’t visible, right-click on SharePoint Connections and select Add Connection.  Type in the URL of your site and press OK.

17. In your site, expand Lists and Libraries | Document Libraries

18. Right-click on Site Assets and select View in Browser.

 

image

 

19. Once the Site Assets library appears in the browser, click on the menu to the right of SPWorkflow.

20. Click Send To | Download a Copy

 

image

21. Save the SPDWorkflow.wsp file to the C:\SPHOLS directory.

 

Task 9: Import the reusable workflow into Visual Studio

1. Return to Visual Studio 2010.

2. Right-click on the SPDWorkflowDemo solution, and select Add | New Project.

3. From the SharePoint | 2010 project templates, pick the Import Reusable Workflow project template.

4. Name the project SPDWorkflowImport. 

5. Press OK.

6. On the SharePoint Customization Wizard dialog, make sure the site is the same as the site you deployed the SPDWorkflowDemo project to earlier.

7. Select Deploy as farm solution.

8. Press Next.

9. In the next dialog, browse to C:\SPHOLS and select SPDWorkflow.wsp as the template.

image

 

 

10. Click Next.

11. On the next dialog, press Finish.

12. Right-click on the SPDWorkflowImport project in the Solution Explorer and select Add Reference.

13. Select the Projects tab and select to reference the SPDActivityDemo project.  This is necessary because the newly imported workflow uses the custom activity from that project.

14. Double click on Package folder in the SPDWorkflowDemo project.

15. In the Package designer select the Converted workflows feature in the Items in the Solution pane

16. Click the add button ( > ) to move that feature to Items in the Package pane.  This will cause this feature to be deployed with the solution.

 

image

17. Right-click on the SPDWorkflowDemo project in the Solution Explorer and select Deploy.

 

Task 10: Associate the workflow with a list in SharePoint

1. Open the site you’ve deployed this project to (HINT – you can right-click on the site in the Server Explorer as a short-cut).

2. Create a new custom list named Customers. 

3. Configure the list workflow settings as follows:

 

image

4. Create a new customer list item with the Title of Contoso. A new document library of the same name should be created automatically.

image

 

Exercise Summary

In this walkthrough you built a new Workflow activity for use in SharePoint Designer workflows. You built a reusable workflow in SharePoint Designer and used the custom activity. You then imported that reusable workflow into Visual Studio 2010 and deployed the final workflow back into SharePoint.

  

February 10th, 2010 Neal McFee 1 comment