Essential SharePoint 2013: Practical Guidance for Meaningful Business Results (2014)
Part II. Optimizing
Chapter 17. Planning Business Solutions
In Chapter 5, “Planning for Operational Governance,” we discussed the importance of governing the customizations made to your SharePoint environment that support business solutions built with SharePoint. In this chapter, we discuss three key concepts that enable you to create and manage those business solutions by customizing SharePoint, along with the changes to these functions that have been introduced in SharePoint 2013:
Composite Applications, which are a way to assemble business-critical solutions via premade components
Business Connectivity Services, which enable you to connect SharePoint to external data sources
Workflows, which provide the basis for automating business processes within the organization
Companies far and wide struggle to connect their users with the business data stored in various locations such as databases and file shares across the organization in a simple, easy-to-use manner, and to use that data in business processes, making sure employees are performing the right tasks in the right order. As these companies become more successful at getting the data into an electronic format, IT departments are under pressure to meet the demands of the data consumer to build complex applications to manage that information. In most cases, custom development has been required to build those applications—which increases time, effort, cost, and project risks.
SharePoint Composite Applications were introduced to address this issue. By using the suite of client applications (SharePoint Designer, InfoPath, Excel, Access, and Visio), and leveraging the flexible nature of SharePoint Web Part pages, IT departments can enable a self-service environment for the business—significantly reducing the need for IT to be involved in data-driven solutions while still maintaining control over the systems and the data itself. Another way to connect users with business data is to leverage the SharePoint platform to enable business process automation, specifically through workflows and tasks. Solutions in this category can provide functionality to capture data and move it through a defined business process. These business processes, whether connected to external databases or not, are another must-have solution set in the business user’s arsenal. Assigning and managing user tasks in SharePoint is a way to keep business processes running smoothly, especially when associated with a project or process.
What’s New in SharePoint 2013?
Before we dive into the details, here’s a summary of what is new in SharePoint 2013 with respect to Composite Applications, business connectivity, and workflows:
Business Connectivity Services (BCS). BCS has been enhanced in SharePoint 2013 to connect to OData sources (an industry-standard way of accessing data) and receive events from external systems. In addition, External Content Types can now be scoped at the application level. Finally, support for Representational State Transfer (REST) and the client object model has been enhanced. These features provide the ability to create sophisticated, modern applications without significant coding. We’ll review the core pieces of BCS and how to plan for it in the first half of this chapter.
Access Services. Access Services still provides a way to put an Access database into SharePoint, giving you the ability to manage, secure, and control databases that would otherwise have existed on someone’s hard drive away from the control of IT. This feature was available in SharePoint 2010. However, in SharePoint Server 2013, an Access Services database is actually a SQL Server database, rather than a list as it was in SharePoint 2010. When you create an Access Services app, SharePoint talks to a SQL Server 2012 instance and creates tables within SQL Server for the tables in the Access database, giving you a SQL Server database that you can use directly, or with the front end in SharePoint. We don’t cover Access Services in this book; for more information, check out http://technet.microsoft.com/en-us/library/ee748634.aspx.
Napa. The new Napa Office 365 Development Tools, which are Web-based and used with an Office 365 tenant, can be used to build apps for Office or SharePoint without the need for Visual Studio. Instead, you use an Office 365 developer site and a supported browser. That said, Napa apps will still require coding, which is outside the scope of this book (for more information, check out http://msdn.microsoft.com/en-us/library/jj220038.aspx). We’ll stick to the browser and SharePoint Designer in this chapter.
Work management. The Work Management Service application provides functionality to aggregate tasks to a central location, where users can view and track their to-dos and tasks. In addition, tasks can be cached to a user’s personal site, aggregated from Exchange, Project Server, and SharePoint. The Work Management Service is usually exposed as part of each user’s My Site/newsfeed experience. If you use tasks with Project Server, SharePoint sites, or Outlook/Exchange to-dos, this feature alone can help social adoption within your organization by consolidating task management. For more information on work management, visit http://social.technet.microsoft.com/wiki/contents/articles/12525.sharepoint-2013-work-management-service-application.aspx.
Workflow Manager. Workflow in SharePoint 2013 introduces a number of enterprise features such as fully declarative authoring, REST and Service Bus messaging, elastic scalability, and managed service reliability. SharePoint Server 2013 can use either the old SharePoint 2010 engine or a new workflow service built on the Windows Workflow Foundation using .NET Framework 4.5. The new service, called Workflow Manager, is designed to play a major role in the enterprise by organizing central processes. We’ll discuss workflows in the second half of this chapter.
Note that we didn’t mention enhancements to InfoPath Forms Services. This is because Forms Services in SharePoint 2013 is essentially the same as in SharePoint 2010. We cover InfoPath and Forms Services very briefly at the end of the chapter.
What Is a Composite Application?
SharePoint 2013 provides users with a suite of applications and functionality to allow them to take more control over how they represent their data. With the help of Visio Services, Excel and Access Services, and SharePoint Designer, it is possible for these users to build no-code collaborative solutions through browser-based customizations.
Note
With SharePoint composites you can
Rapidly create no-code collaborative solutions
Unlock the value of enterprise data
Maintain control over user solutions
Prior to SharePoint, those client applications could be used to create solutions that were trapped on a single machine. With SharePoint in the mix, Visio 2013, Excel 2013, and Access 2013 allow the user to work on local data and then publish it to SharePoint, leveraging enterprise-class services such as scalability, a Web-based interface, and IT control for things such as backups and permissioning. Even with this level of functionality, accessing external data has always been a challenge. Microsoft recognized this and filled this gap in SharePoint 2010 with Business Connectivity Services.
Using Business Connectivity Services
Business Connectivity Services is a component of SharePoint 2013 and Office 2013 that provides a way to create business solutions for scenarios that require integration of external data sources. With BCS, you can use SharePoint 2013 sites (and Office 2013 clients) as an interface into data that doesn’t live in SharePoint 2013 itself (see Figure 17-1).
Figure 17-1 Business connectivity services provides the ability to connect SharePoint to other databases, such as Oracle, a line-of-business database, or a SQL database running on Azure
Back in SharePoint 2007, the Business Data Catalog (BDC) was introduced as a way to bring enterprise data from SQL Server, Oracle, and other sources directly into SharePoint in a real-time manner. This was the first step in bridging the gap between SharePoint data and external enterprise data. While it was an important step, it proved to be difficult to work with and limited in functionality. In SharePoint Server 2010, Microsoft took a giant leap forward by introducing BCS. With BCS in SharePoint 2010, users could read and write data as easily as they interacted with a standard SharePoint list. In addition, business solution designers could use SharePoint Designer to create and manage external connections. The Business Data Web Parts helped expose the external data for building Composite Applications. SharePoint 2013 continues the evolution of BCS, providing enhanced access to data sources using OData (the Open Data Protocol) for developers.
In short, BCS provides the ability to
Expose enterprise data from external sources such as databases and Web services through the user interface in SharePoint 2013 and Office 2013
Map Office-type objects and capabilities such as appointments, tasks, and contacts to external data
Enable a two-way synchronization between the external data and SharePoint, allowing the data to be updated as well as consumed in SharePoint
Provide offline accessibility to the external data using clients such as Outlook
While the BCS platform gives power users great functionality and flexibility to create data-centric applications, IT departments need not fret, as SharePoint still allows IT to control who gets to create what and where.
Understanding BCS Components
BCS provides many tools for connecting to and managing how users interact with external data. While SharePoint Server 2013 Enterprise license holders get more goodies, SharePoint Foundation 2013 is certainly not left completely out in the cold. Figure 17-2 shows the distribution of components across the Office products. Before exploring the various components, however, it is important to understand the fundamental building block of BCS—the External Content Type.
Figure 17-2 Business Connectivity Services provides a number of components depending on the version of SharePoint 2013
External Content Types
External data is represented through an object called an External Content Type. With an External Content Type you get to define the following for the data connection:
External data source (What is SharePoint connecting to?)
Office item type (What is the data mapped to as far as Office is concerned?)
Operations (What can the user do? Create? Read? Update? Delete? Query?)
Fields (What data Columns do we have access to?)
Permissions (Who has access to do what?)
Once you have defined your External Content Type, you can use it directly from within SharePoint lists. In doing so, all the data from the external source will now be available in what appears to be a standard SharePoint list. Using an External Data Column, several of the external data Columns can be added to other lists.
As you can see, there are many pieces to the BCS puzzle. Table 17-1 summarizes the components and capabilities for each of the SharePoint deployment options.
Table 17-1 Comparison of Capabilities of BCS in Various Flavors of SharePoint
Types of BCS Solutions
Given the list of components described in Table 17-1, it is easy to see that you have many options when it comes to building solutions. Whatever solution you choose to build will fall into one of the following categories:
SharePoint Web-based solution
Simple solution in Outlook 2013
Declarative solution in Outlook 2013
Code-based solution using the BCS API
The SharePoint Web-based solution is the type that will be created most frequently, and this is the one we will cover in the rest of this section.
BCS Web Parts
BCS provides several Web Parts that you can use to build a Composite Application. Out of the box, you get the Web Parts listed in Table 17-2.
Table 17-2 Out-of-the-Box BCS Web Parts
Note
The Business Data Web Parts are part of the Enterprise license; to access them you must activate the Enterprise Site Collection Features through Site Settings.
The BCS Web Parts (see Figure 17-3) provide options for creating Composite Applications for integrating SharePoint pages with your enterprise data. Let’s say that you want users to be able to review invoice information from your accounting system right within a SharePoint site. A SharePoint site could use the Business Data List Web Part to show a list of active invoices, for example. When a user clicks on an invoice, the Business Data Item Web Part displays detail for the invoice, such as an invoice due date and a total amount. Finally, the Business Data Related List Web Part could show detailed line items if the user elected to drill down.
Figure 17-3 The BCS Web Parts can be found in the Business Data category after you enable Enterprise features
Planning for BCS Solutions
Since business solutions are typically built for the specific need that they will serve, BCS solutions are harder to plan for than most other SharePoint features. Until you build a solution, you probably don’t know exactly how they will be used. Therefore, this book won’t go into the detailed walkthrough needed to build effective solutions using BCS—that’s a topic for an entire other book. Instead, we’ll focus on how to plan for BCS solutions if your organization will be using them.
What’s the first step of building a BCS-based solution? Planning. Before you design a Business Connectivity Services solution strategy, seek to understand the business needs that are driving the solution and the environment in which the solution must operate. As with any solution in SharePoint, involve your stakeholders to make sure that they understand how external data will be used and the responsibilities of the user, designer, developer(s), and the owner of the external data itself—now and over time.
Let’s walk through the list of design factors that you’ll establish when you set out to build a solution that relies on BCS—and the “gotchas” that come with each:
Location of the data
Access protocols
Security and permissions
Presentation layer
Location of the Data
Your external data could be located in many possible places. In most cases, it’s probably in a database on your corporate network. If so, you can only use an on-premises SharePoint environment. If your data is in the cloud, you can use either an on-premises SharePoint environment or SharePoint Online. What’s the implication here? SharePoint Online cannot be used to access data in your corporate environment. So if you’ve deployed SharePoint Online and want to use BCS, you’ll need to ensure that your data is accessible in the cloud—most typically through SQL Azure. SQL Azure provides a way for you to use SharePoint Online and still access corporate data—so consider this in your overall cloud strategy.
No matter where the data resides, you’ll need to work with the person or group who has daily administrative responsibility for the external data source. You’ll want to make sure you’re ready to answer questions about your use of the data and its potential impact on the performance of its primary solution. For example, if you’re looking to connect SharePoint to an Oracle ERP system, the Oracle administrator might not take kindly to you wanting to connect SharePoint to it. This is why you’ll likely need a planning team—aligned with your governance strategy—to help get buy-in on your overall design.
Access Protocols
Now that you’ve solved what you are connecting to, the next question is “How do I connect SharePoint to it?” BCS can connect to external data through OData, SQL Server, SQL Azure, WCF endpoints, and .NET assemblies. This topic is important for two reasons: (1) the protocol in question could impact internal firewall ports, so work with your network team to make sure you can talk to the data source; and (2) the choice of protocol will impact your choice of development tools. Table 17-3 provides a list of which tool should be used with which protocol.
Table 17-3 BCS Tools and Corresponding Data Access Protocols
Security and Permissions
The next item you’ll need to consider is security—both of the external data (or the system that owns the external data) and of your solution and its capabilities. Business Connectivity Services supports three authentication models for connecting to data:
Credentials-based authentication models, where a username and password are sent to the external system
Claims-based authentication, where the external system accepts credentials from a third-party authentication service that it trusts
Custom authentication, where you develop a custom solution (mainly since the external solution doesn’t support credentials or claims)
You’ll also need to identify which users will have permission to use various parts of your solution. You should plan for things like who will administer the solution, because the administrator will need permission to connect your model to the external data source; who will design the solution, because that person will need access to the admin screens and the BDC model itself; and who will use the solution, because users will need a way to query and update the data via BCS Web Parts and the sites and pages in which they live. This is another topic to discuss when you meet with the owner of the external system or database.
Presentation Layer
The final item you’ll need to consider is the user interaction method—will it be external lists, BCS Web Parts, SharePoint search, or Office 2013 clients? Will users need access to external data as a substitute for the external system’s regular user interface? If so, that’s probably a good candidate for BCS Web Parts. Do users need to find information from an external system based on keyword searches? That’s a good candidate for crawling the external system and enabling external data search and search profiles. What about adding metadata to documents? In addition to standard text fields and Managed Metadata Columns, external data connections can also be used as a data type in a document library or list. In short, make sure you think through the way that external data will show up in SharePoint, mainly since most enterprise databases contain a large number of rows. If you simply create an external connection with a “Select * from DatabaseTable” approach, you might be disappointed by performance—along with all of your users. Be sure to understand where the connections will be used, how much information will be pulled back from the external data source, and whether enabling updates is really necessary. Just because a solution is easy to pull together via BCS, it doesn’t mean you can ignore basic application design principles.
In short, Business Connectivity Services can provide a powerful mechanism to connect SharePoint to external data sources. Be sure to plan using the recommendations listed here. Once you get your data sources planned, you can move into another key business solution area: business processes and workflow.
Understanding Business Processes
Organizations large and small typically need to capture documents and/or data—and then act upon that set of information through a defined process. In this section, we’ll cover two key SharePoint functions—workflow and electronic forms—that help to meet this business need.
Workflow
SharePoint workflow features enhance the document library and list functionality inherent in SharePoint. Workflow features are useful when you want to orchestrate document authoring, review, approval, and publishing processes—or to simply capture information and then put it through a repeatable set of steps.
Many business processes are somewhat ad hoc and loosely defined. A challenge of network-drive-based and e-mail-attachment-based collaboration (admit it—this is still the way most folks collaborate) is the proper routing of content to “the right people at the right time.” Typically, coworkers are either blind to activity on shared drives or inundated with e-mail discussions about content that they are not actively monitoring. Automated workflows ease this burden by offering a structured means of transporting content, typically documents or forms, to the appropriate reviewers for comments, approval, or publishing. In some ways, think of workflow as a manageable business rules engine that allows administrators to predefine the routing of information across its life cycle. As an example, consider a standard employee expense reimbursement form. Typically, a manager or supervisor must review or approve the submitted claim before it is processed. Let’s say that the approvals happen over ad hoc e-mail. This causes two challenges: (1) the coordination among employee, reviewer, and finance representative is sometimes clunky and error-prone, and (2) there is no auditing maintained around the form activity (e.g.: Who approved the submission? When? Why haven’t I received my check?). Workflow solves both problems by allowing for the routing and auditing of content in a standardized way, along with on-demand status information.
You can also use workflow in business scenarios—for example, invoice approval, purchase order routing, and other scenarios. The workflow engine manages the execution of activities by enabling business users to extend SharePoint by providing rules, conditions, and activities. SharePoint can also do simple approval scenarios, supporting both parallel and serial processes.
If you’re already familiar with SharePoint workflow, SharePoint 2013 changes workflow by providing two engine options: stay with the SharePoint 2010 engine, or use the new 2013 Workflow Manager. The SharePoint 2010 workflow platform has been carried forward to SharePoint Server 2013, so workflows that were built using SharePoint Server 2010 will continue to work in SharePoint Server 2013. As in SharePoint Server 2010, the workflow engine is installed automatically with the product. If you simply install SharePoint Server 2013 and do nothing else, you will have a nearly identical experience with building workflows as you did in SharePoint Server 2010.
SharePoint 2013 workflows, on the other hand, are powered by Windows Workflow Foundation 4 (WF), which was substantially redesigned from previous versions. If you want to use the new SharePoint 2013 workflow tools, you need to download and install the new Workflow Manager service and configure it to communicate with your SharePoint Server 2013 farm. The Workflow Manager is separate from SharePoint. Microsoft did this to allow for enterprise scenarios where SharePoint can be the conduit and user experience for a business process that can scale separately from SharePoint itself—even into the cloud if necessary.
From a SharePoint perspective, workflow allows for the management of content movement (through a review or approval cycle), auditing of all activity associated with the content, and task list integration that allows users to see the items that are pending their review or approval. This is all done in an interface that most employees interact with regularly. Notifications from workflow processes can be e-mailed so users do not have to monitor task lists. In addition, exceptions can be defined, so if unexpected delays in processing occur, someone is notified.
One of the biggest challenges in implementing a successful workflow strategy is not so much becoming an expert in the custom workflow creation process as understanding how to define a clear and accurate business process. Before associating a workflow with a SharePoint list or document, ask:
How do you define the life cycle of the associated business process? (Who should approve it first? How many people should we ask for feedback? If this document should go to someone’s manager, does the system have that data?)
What is the current process? What are the benefits of automating this process?
How do you deal with exceptions (i.e., if someone is away or sick)?
How important is it that we log all activity associated with this list item or document? Do we need to look back historically at previous content for insight into the approval process?
Whether it is a simple serial, single-person approval process or a complex workflow associated with many conditional layers and approvers, designing the business rules first will ensure that the right technology decisions are made later. As you’ll see in the coming sections, SharePoint offers some native workflow processes as well as integration with SharePoint Designer custom workflows (and even Visio, .NET-based, or third-party created complex solutions). In every case, it is important to effectively manage the processes and expectations surrounding business-critical content movement.
Understanding Workflow Terminology
SharePoint 2013 includes the capability to use workflows within a list or document library as well as at the site level (i.e., not associated with a list item). While both SharePoint Foundation and SharePoint Server offer the same fundamental platform (Windows Workflow Foundation), the difference comes down to what default workflows are offered (see Table 17-4). Beyond the default workflows, custom workflows can be developed using SharePoint Designer 2013 or Visual Studio 2012. Since this book focuses on creating solutions without custom code, we’ll focus on the SharePoint Designer solutions only, which we will cover later in the chapter. For now, let’s focus on the fundamentals of workflow in SharePoint, including the differences among workflow templates, workflow associations, and workflow instances.
Table 17-4 SharePoint 2013 Standard Workflow Templates
Templates, Associations, and Instances
There are three ways to describe a workflow. A workflow template is the initial description of what should happen (steps, conditions, activities, etc.). When you bind a template to a list or library, that linkage is called an association. When you add an item to a workflow-enabled list, the workflow that starts up and processes that item is called a workflow instance.
Let’s say you have a workflow template called Approval. You could associate the workflow template to three separate lists (list A, list B, and list C). Within each list, there are ten items, each in one of the various stages of workflow processing. In this scenario, there is a total of
One workflow template
Three associations (one template x three lists)
Thirty workflow instances (three associations x ten items each)
Using the Standard Workflows
To get you started, SharePoint provides several out-of-the-box standard workflows that can be applied to your lists and libraries. While SharePoint Foundation 2013 users get only one such workflow (the Three-State workflow), SharePoint Server 2013 users have several to choose from. The advantage of using these workflows is that users can simply apply them directly without waiting for custom workflows to be built and deployed. The standard workflows are designed to be generic enough that they can be applied to many review and approval processes. Table 17-4 lists some of the more popular standard workflows.
Associating a Workflow with a List
By default, workflows are not associated with any of the list templates provided, but using them is very simple. To see the workflows that are available for a list, look at a document library. To associate a workflow, simply open the document library and select the Library tab in the ribbon. In the settings section on the right, you will notice an icon menu for Workflow Settings (see Figure 17-4).
Figure 17-4 The workflow menu under Workflow Settings on the list ribbon allows you to add a workflow to your list
From here, you can select to Add a Workflow to your library. This will open the Add a Workflow page shown in Figure 17-5.
Figure 17-5 The first page of the out-of-the-box workflow wizard lets you configure its name, associated template, and start-up parameters
On the Add a Workflow page, you will find several options:
Select a workflow template
Enter a unique name for this workflow
Select a task list
History list
Start options
The template list displays all the workflows available for your library. For example, you could use the Approval workflow for your Annual Newsletter Review. The task list is used to store tasks that are assigned during the workflow (in this case reviewer tasks). The history list is used by the workflow to store messages such as status, errors, and general feedback. Table 17-5 shows the start-up options on workflows.
Table 17-5 Workflow Start-up Options
Once you have all options configured, the Properties page for the workflow lets you define the default list of approvers among other values such as approval order, notification message, and task due dates. When you choose to let users initiate the workflow manually, these settings can be overridden by the user who initiates the workflow. If you elect to start the workflow automatically, the default settings will always be used when the workflow begins.
If you select a different workflow, the options presented in the properties page may be completely different. Indeed, certain workflows may not require default properties at all.
The workflow templates that SharePoint Server 2013 provides have plenty of functionality that will suit the majority of simple approval workflows. However, the user is not limited to these workflows alone. The next section discusses using SharePoint Designer to take workflows to the next level.
Creating Custom Workflows with SharePoint Designer 2013
If you find that the workflows SharePoint provides do not quite fit your process, Microsoft SharePoint Designer 2013 provides the ability to modify them or even design your own from scratch. This gives business analysts or power users the ability to create their own workflows without requiring IT involvement and/or developer time. It also enables developers to create workflows quickly without having to write custom code. Using a predefined list of activities, users can create a workflow to route their documents for approval, move their documents, modify properties, and so on.
Note
SharePoint Designer is an essential tool for managing SharePoint content by both IT personnel and power users. SharePoint 2013 features controls and settings for IT administrators to have more granular control over who can use SharePoint Designer, the actions they can perform, and on which sites.
SharePoint Designer connects directly to a SharePoint site and allows the user to manage content in a rich user interface. The workflow tools within Designer allow the user to develop a workflow specifically for a list, or a generic workflow that can be used by many lists.
Introducing SharePoint Designer (for Workflow Development)
SharePoint Designer 2013 is a free download that can connect to SharePoint 2013 on-premises and SharePoint Online. Figure 17-6 shows SharePoint Designer 2013 opened at its home page for a site. From the home page you can get a quick overview of the site, including general information, permissions, sub-sites, and other settings.
Figure 17-6 The SharePoint designer 2013 home page displays general site information as well as sub-sites and permissions for the site
In the navigation pane on the left, you will see a list of all available objects such as lists and libraries, workflows, site pages, and so on. As you can see, you can browse the majority of objects within SharePoint related to design. With our focus being on workflow, let’s open that tab to see what there is.
Figure 17-7 shows the Workflows tab selected. You will notice that the options on the ribbon are related to the various ways to construct a new workflow. The main pane lists the available workflows; because we have not created any custom workflows yet, this list displays only the reusable workflow templates provided with SharePoint Server 2013—in this case, we see the Approval workflow for all of the language packs we have installed. The ribbon keeps us focused on the task at hand by making only our workflow options available.
Figure 17-7 The Workflows tab displays the available workflow templates and provides all workflow options in the ribbon
Clicking any of the workflows listed will open an information page for that workflow template (see Figure 17-8). This gives a quick overview of information about the workflow, start options, and even the forms associated with the workflow. This is very useful for troubleshooting.
Figure 17-8 The Workflow Information page displays an overview of the workflow, including the forms that it uses
Workflow Types
There are three types of workflows that you can create with Designer: list workflows, reusable workflows, and site workflows. The differences are explained in Table 17-6.
Table 17-6 SharePoint Designer 2013 Workflow Types
Let’s say you want to build a custom workflow that is targeted at SharePoint 2013 and doesn’t need to be backward compatible with SharePoint 2010. In addition, you want the workflow to be available for any list or document library. To create the workflow, simply click on Reusable Workflow in the ribbon, which presents you with the Create Reusable Workflow dialog box (see Figure 17-9). Note that you can give the workflow template a name and a description and indicate which version of SharePoint you’re targeting.
Figure 17-9 The Create Reusable Workflow provides a way to use SharePoint Designer to create a custom sequential workflow by using workflow actions
Workflow Association Options
When you create a reusable workflow, it cannot be used until it has been associated with a list or Content Type. When you open the workflow in Designer, you will have both association options in the ribbon in the Manage section. When you click Associate to List, you will see the available lists to associate with. Similarly, when you click Associate to Content Type, you will see available Content Types. The benefit of associating a workflow to a Content Type is that it will work for all items using that Content Type in any list.
Workflow Actions
As your workflow is moving through its steps, you’ll need to define things that happen—in other words, what actions will occur. SharePoint Designer ships with a set of actions specifically for SharePoint interaction—things like doing calculations, sending e-mails, and updating properties on an item. This list can be extended by installing third-party actions or even by developing your own. Table 17-7 lists the commonly used actions provided with SharePoint Designer 2013. For a full list of workflow actions, refer to http://msdn.microsoft.com/en-us/library/jj164026.aspx.
Table 17-7 SharePoint Designer Actions for Workflows
SharePoint Designer is a good tool for defining the steps in a workflow process. It does not, however, help in visualizing the workflow process itself as the steps in SharePoint Designer are linear. The next section will discuss how Microsoft Visio 2013 can be used to design the workflow and render it in the browser to give the user a visual representation of the workflow process.
Designing Workflows with Visio 2013
A common practice in organizations is for a business analyst to work with business users in Visio when designing workflows. The end result, a Visio diagram, is handed to a developer, who turns it into a SharePoint Designer workflow or Visual Studio workflow.
Visio 2013 provides a template specifically for designing workflows that can be imported directly into a SharePoint Designer workflow. Selecting the SharePoint workflow template in Visio 2013 Pro opens up shape stencils specifically for SharePoint workflows. Each of these shapes relates to the actions and conditions that are available in SharePoint Designer. As in any Visio diagram, these shapes can be dragged onto the canvas to build a full workflow solution. Each shape reflects a default action, so dragging it onto the canvas has the same effect as adding the action to the SharePoint Designer canvas. It is not possible to define the properties on the shapes, however. For example, adding the “Log to history list” action does not allow you to define the message you are logging to history. These properties need to be set after the workflow has been imported into SharePoint Designer. Even though the properties cannot be set by the workflow designer from within Visio, you can add details to each step specifying what any values should be. This additional description can be added directly on the design canvas and will be ignored by SharePoint Designer on import.
Once the workflow is imported into SharePoint Designer and deployed to SharePoint, Visio Services can be used to display a Web-based view of the workflow process. Visio Services is part of the SharePoint Enterprise CAL.
Creating Electronic Forms
When you create a new item, SharePoint displays a form that enables you to enter data into the associated list. Sometimes, however, the default SharePoint forms are not sufficient for capturing data in a complete way, since you may need to look up information from other sources, make one choice field be dependent on another, and so on. In addition, users may be used to filling out paper-based forms, so you might want to make a form that behaves like the paper form. For example, you may want to enable job applicants to fill out a fairly complex application form.
So do you really need electronic forms? In most cases, organizations are using SharePoint lists, Word documents, or Excel worksheets. But a real forms package gives you rich design, validation, prepopulation of information, multiple roles, digital signatures, and rich security. Take a look at this list of common issues and see if any of them sound familiar:
In your existing forms-submission process, do you have challenges around incomplete, inaccurate, or lost information? Do you face challenges around locating that information? Does it take too long for information to get to its final destination(s)? Electronic forms can drive business processes so that these issues are minimized or eliminated, validating the data by checking it as the user is supplying it.
Are your users overwhelmed with the number of business processes or sources of information that exist within your company? Electronic information capture helps streamline the complex processes sitting behind forms.
Are people filling out paper forms that need to be rekeyed? Electronic forms capture data at the source.
If you are experiencing any of these issues, you’re probably a good candidate for capturing information via electronic forms. InfoPath 2013 is Microsoft’s offering for electronic forms creation and use. In the next section, we’ll describe the process of using an InfoPath-based electronic form with SharePoint. We’ll focus not on the technical details of InfoPath, but rather the key integration points with SharePoint.
Introducing InfoPath 2013
InfoPath 2013 is a client application that lets you visually design forms using layout tables and controls for gathering data such as text boxes, choice fields, and buttons. In addition to quickly formatting a form, InfoPath allows you to connect the form to various data sources such as a database or a SharePoint list. InfoPath is divided into two key tools: InfoPath Designer 2013, which enables a developer or designer to create a new form, and InfoPath Filler 2013, which enables a user to make use of a form to enter data.
InfoPath Forms Services
SharePoint 2013 allows you to create forms libraries that capture form data, enabling users to publish their information directly to SharePoint via InfoPath. In this scenario, all users need to have the InfoPath Filler 2013 client installed on their computers to work with the forms.
SharePoint Server 2013 Enterprise provides InfoPath Forms Services, which can render a published form template as a Web page. This eliminates the need for the user to have the InfoPath client installed. The experience in the browser is exactly the same—allowing the user to pick dates using a date picker, for example, and even adding additional rows for fields with unlimited line items.
Note
While InfoPath Forms Services can convert many form elements from the client to the browser, it may have difficulty with certain controls depending on how complicated your form is. For this reason, InfoPath provides a Design Checker to check compatibility.
InfoPath 2013 gives the business user tremendous power for creating forms quickly and relatively easily. Even developers can take advantage of the advanced features such as data connections to really bring the forms to life. With the addition of InfoPath Forms Services, the need for another deployed client can be eliminated, which is always welcome by IT departments.
Key Points
In this chapter, we reviewed the various business services that SharePoint 2013 provides for creating business solutions, including connectivity to external databases and workflows for business processes. The following list is a review of the key points:
Composite Applications are a way to assemble business-critical solutions via premade components by using SharePoint and Office.
Business Connectivity Services is a component in SharePoint 2013 and Office 2013 that provides a way to create business solutions for scenarios that require integration of external data sources.
External Content Types allow you to easily connect to external data from sources such as SQL, Oracle, or Web services.
OData is a new protocol that is supported for BCS connections and used by developers via Visual Studio 2012.
External lists in SharePoint can display content directly from an external source using an External Content Type.
External content can be updated directly from an external list as if you were updating a standard SharePoint list item.
BCS provides several Web Parts for creating Composite Applications.
SharePoint 2013 introduces a new workflow engine powered by Windows Workflow Foundation 4.
SharePoint 2013 provides several out-of-the-box workflows, including
Approval
Collect Feedback
Collect Signatures
Disposition Approval
Three-State
Publishing Approval
SharePoint Designer 2013 allows you to modify out-of-the-box global workflows as well as design unique ones.
Visio 2013 allows you to design SharePoint workflows that can be imported directly into SharePoint Designer 2013.
With SharePoint Server 2013 Enterprise, Visio Graphical Services allows you to render your Visio workflow in the browser.
With InfoPath 2013, you can publish form templates to document libraries as well as submit the form data to a SharePoint list.
With SharePoint Server 2013 Enterprise, you can publish an InfoPath form and have it rendered as a Web form.
Advanced workflows can be created by using Visual Studio 2012 (which is beyond the scope of this book).