Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Microsoft SharePoint 2010 Development with Visual Studio 2010 Expert Cookbook
Microsoft SharePoint 2010 Development with Visual Studio 2010 Expert Cookbook

Microsoft SharePoint 2010 Development with Visual Studio 2010 Expert Cookbook: Develop, debug, and deploy business solutions for SharePoint applications using Visual Studio 2010 with this book and ebook.

Arrow left icon
Profile Icon Balaji Kithiganahalli
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (4 Ratings)
Paperback Sep 2011 296 pages 1st Edition
eBook
€28.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Balaji Kithiganahalli
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (4 Ratings)
Paperback Sep 2011 296 pages 1st Edition
eBook
€28.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
€28.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Microsoft SharePoint 2010 Development with Visual Studio 2010 Expert Cookbook

Chapter 2. Workflows

In this chapter, we will cover:

  • Creating a sequential workflow

  • Creating a site workflow with initiation form

  • Deploying an InfoPath form with a workflow

  • Creating a task from the workflow

  • Creating a custom task form

Introduction


According to Workflow Management Coalition (http://www.WFMC.org) a standards organization that solely concentrates on processes, defines a workflow as follows:

The automation of a business process, in whole or part, during which documents, information or tasks are passed from one participant to another for action, according to a set of procedural rules.

In simple terms, it means a workflow is a system that manages the execution of a business process. Organizations implement workflows for many different reasons such as:

  • Auditing and tracking

  • Better efficiency

  • Consistency

  • Better customer support

Whatever may be the reason for workflow implementation; it is implemented by breaking up the business processes into small activities and executed in a logical order.

An activity in a workflow is the smallest piece or item that you execute. Take for instance a business process that manages employee time and expense reporting (T&E). In here, when employee submits the T&E, a notification...

Creating a sequential workflow


In this recipe, we will learn how to create a sequential workflow. For this recipe, we will model a credit approval process. When a user adds an item to a list, we will let the workflow instantiate automatically on the inserted item and flow through the process of checking the user's requested credit line and approving it based on user's employment and credit history.

Getting ready

You should have a fully functional development machine with SharePoint 2010 installed and configured. You also need Visual Studio 2010 IDE installed on the same development machine. We are using a team site template for our examples.

Use the custom list template and create a list from the SharePoint user interface called Credit Approval. The following table provides information on fields and its properties:

Field Name

Data Type

Required

Credit Requested

Currency

Yes

Employment History

Choice (Choices - Good, Bad, and None Exists)

...

Creating a site workflow with an initiation form


The previous recipe is a good example of a sequential workflow where there is no human interaction. If it were really dealing with a credit approval process on a credit application, this could have gone through the external applications to verify the credit history and employment history and made the decision. So to take advantage of this automation, let us create our own credit application approval system. In this recipe, we will create a site workflow to enact our credit application approval process. Since site workflows are not associated with any lists, there is no form that we can get out of the box for a user to input data and start the workflow. For this purpose, we will also incorporate an initiation form that upon submission will start the workflow.

To keep the workflow simple, the workflow will base its decision on the credit amount requested. If the credit amount is less than $1000.00 it will be automatically approved or if it is...

Deploying an InfoPath form with the workflow


In this recipe, we will recreate the previous recipe to use InfoPath forms for initiation form.

Getting ready

This recipe assumes that you are familiar with creating InfoPath forms using InfoPath designer 2010. Your SharePoint server should be configured to use form services. Refer to MSDN at: http://technet.microsoft.com/en-us/library/cc262263.aspx for more information on configuring the form services.

How to do it...

  1. Using InfoPath designer, create a browser compatible form template.

  2. Add a textbox control and name it txtCreditRequested. Also add a Submit button.

  3. Go to the Submit Options of the button and add a new data connection to submit to the Hosting environment as shown in the following screenshot:

  4. From the File tab, click on the Form options button to open the options dialog box.

  5. Uncheck the Automatically determine security level (recommended) and select Domain (the form can access content from the domain in which it is located) security as...

Creating a task from the workflow


So far we created workflows that run automatically without stopping for user input in the middle of the process. Initiation or association data come before the workflow is started. There are many situations where in the middle of the workflow process you may want input from a user to proceed further. To do this, we will create tasks in SharePoint.

In this recipe, we will create an Employee Suggestion Program (ESP) workflow, where employees of a company can provide suggestions on the betterment of the business processes that are in place in the company. For this, when an employee suggests a process improvement, a task is assigned to the department director to take a look at and decide on the value of the suggestion.

Getting ready

Create a custom list from the SharePoint UI called ESP. The following table lists all the attributes of the fields in the list:

Field Name

Data Type

Required

Title

Single line of text

Yes

...

Creating a custom task form


In the previous recipe, when the department director completes the task, we cannot determine whether he wants the suggestion implemented or rejected. We may have to find out using the comments field as there is no other field that provides a way for him to convey that information. If the workflow has to take action based on this input, the default form provided will not fit the situation. We may have to create a custom form and present it to the user to perform their tasks. You can use either the ASPX page or InfoPath form to create the custom task form. In this recipe, we will create a custom InfoPath task form.

Getting ready

This recipe is an extension of the previous recipe. Hence, a successful completion of the previous recipe will provide a good foundation for understanding this. This recipe also assumes that you have working knowledge of designing InfoPath forms.

How to do it...

  1. Using InfoPath designer, create a form named TaskEditForm.xsn with a drop-down list...

Left arrow icon Right arrow icon

Key benefits

  • Create applications using the latest client object model and create custom web services for your SharePoint environment with this book and ebook.
  • Full of illustrations, diagrams and key points for debugging and deploying your solutions securely to the SharePoint environment.
  • Recipes with step-by-step instructions with detailed explanation on how each recipe works and working code examples.

Description

Microsoft SharePoint 2010, is the best-in-class platform for content management and collaboration. With the combined capabilities of Sharepoint and Visual Studio, developers have an end-to-end business solutions development IDE. To leverage this powerful combination of tools it is necessary to understand the different building blocks. This book will provide necessary concepts and present ways to develop complex business solutions and take them further.SharePoint 2010 Development Cookbook With Visual Studio 2010 is an instructional guide for developing and debugging applications for SharePoint 2010 environment using Visual Studio 2010. The cookbook approach helps you to dip into any recipe that interests you, you can also read it from cover to cover if you want to get hands on with the complete application development cycle.With this book you will learn to develop event handlers, workflows, content types, web parts, client object model applications, and web services for SharePoint 2010 in an instructional manner. You will discover the less known facts behind debugging feature receivers, deployment of web parts, utilizing free toolkits to enhance the development and debugging experience. You will learn the newer development approach called Visual Web Parts, how to develop and deploy Silverlight applications that can be used with Silverlight web part. You will also explore SandBoxed deployment model and its usage. You will create your own web services for SharePoint and the Client Object Model introduced in SharePoint 2010. All in all, you will develop Sharepoint solutions in an instructional manner that eases the learning process.

Who is this book for?

This book is for .NET developers to understand the building blocks for SharePoint 2010. Although the book can be used by beginners, it is recommended to have understanding of the previous versions of SharePoint. Developing SharePoint solutions needs solid understanding of ASP.NET architecture. The book assumes that the reader is familiar with ASP.NET technology and development concepts.

What you will learn

  • Develop client applications using all three Client Object Models and exception handling techniques
  • Explore visual web parts, Silverlight web parts, code-only web parts, connectable web parts, custom configuration properties for web parts, and AJAX-enabled web parts
  • Respond to list events, list item events, and feature events
  • Develop and deploy complex sequential and state machine workflows with InfoPath forms deployed as task forms and association forms
  • Create custom workflow activities and send alerts to the task owners
  • Create content types and link external data with business connectivity services
  • Understand the out-of-the-box web services and REST services available with SharePoint
  • Develop client applications to consume web services
  • Write custom WCF web service and consume it in a custom application

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 23, 2011
Length: 296 pages
Edition : 1st
Language : English
ISBN-13 : 9781849684583
Vendor :
Microsoft
Category :
Languages :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Sep 23, 2011
Length: 296 pages
Edition : 1st
Language : English
ISBN-13 : 9781849684583
Vendor :
Microsoft
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 117.97
Microsoft SharePoint 2010 Business Application Blueprints
€37.99
Microsoft SharePoint 2010 Development with Visual Studio 2010 Expert Cookbook
€41.99
Microsoft SharePoint 2010 Power User Cookbook
€37.99
Total 117.97 Stars icon

Table of Contents

7 Chapters
Lists and Event Receivers Chevron down icon Chevron up icon
Workflows Chevron down icon Chevron up icon
Advanced Workflows Chevron down icon Chevron up icon
List Definitions and Content Types Chevron down icon Chevron up icon
Web Parts Chevron down icon Chevron up icon
Web Services and REST Chevron down icon Chevron up icon
Working with Client Object Model Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(4 Ratings)
5 star 50%
4 star 25%
3 star 0%
2 star 25%
1 star 0%
Sk Jun 21, 2012
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I got tired of books talking about what SharePoint can do and how good SharePoint is.They all seem to be looking at 30,000 feet level with lot of SharePoint buzz words.This books takes you straight to how to dot it with clearly identified tasks/solutions followedby explanations of each solution.After few useless books, finally I hit the right one, that will accelerate my learning
Amazon Verified review Amazon
Joel Plaut Dec 26, 2011
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Cookbook is a good term for this book. It is an excellent overview of SharePoint programming, with a task focus on the core programming tasks and deliverables a typical programmer is faced with. This means it's a handy shelf reference when faced with an assignment.I particularly enjoyed the common approach of "How it works" and "There's more" to continue exploration. This is a well structured and approachable programming reference book I would recommend.Joel Plaut[...]#spfanatic
Amazon Verified review Amazon
Amazon Customer Dec 02, 2017
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
I purchased this book because I needed a good reference explaining business connectivity services, and also one that contained some code snippets demonstrating how to connect project code to the business data connectivity model. This book met that need.
Amazon Verified review Amazon
William van Strien Dec 28, 2011
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
Both the book title (expert cookbook) as the table of contents (e.g. advanced workflow) sound good and promising. However the book content does not deliver on this. It certainly is no book for the SharePoint expert; there it tries to explain basic concepts as the structure of content types and site columns, webparts, features and SharePoint solutions. All this is and should be known stuff for the medium till experienced SharePoint developer.But it is neither applicable for novice SharePoint developers because it directly dives deep into the treated SharePoint subjects.Also you do not effectively learn how to apply Visual Studio for SharePoint 2010 development and deployment.The recipe format is a nice gimmick, but it soon starts to annoy since there is a lot of duplication per recipe: steps + figures. Effectively you have less content for your money.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.