Download presentation
Presentation is loading. Please wait.
1
Automating Business Processes
Microsoft SharePoint 2013 Automating Business Processes SharePoint Practice
2
Developing Workflows in Visual Studio 2012
20488B Module Overview 11: Automating Business Processes Developing Workflows in Visual Studio 2012
3
Lesson 1: Understanding Workflow in SharePoint 2013
20488B Lesson 1: Understanding Workflow in SharePoint 2013 11: Automating Business Processes Discussion: Choosing a Suitable Development Approach
4
Introduction to the SharePoint Workflow Platform
20488B Introduction to the SharePoint Workflow Platform 11: Automating Business Processes SharePoint Server 2013 Windows Azure Service Bus This topic is designed to give students a high-level overview of the workflow platform and how it differs from SharePoint More information about how SharePoint and Workflow Manager communicate is provided in the next topic. REST calls Workflow Manager Client 1.0 Service Application Proxy Workflow Manager 1.0 Events SharePoint 2010 Workflow Platform (legacy support)
5
Workflow Associations and Subscriptions
11: Automating Business Processes SharePoint and workflows communicate by using the Windows Azure publication/subscribe service Workflow associations: Bind the definition of a workflow to a scope Represent a set of subscription rules Workflow subscriptions: Enable a workflow to interact with associations Respond to events from an object Starting workflows: Manually Automatically Do not spend too long on this topic, because students do not need to understand the publication/subscribe service in detail; they just need to be aware of how SharePoint and workflows communicate.
6
Types of Workflow List workflows Site workflows Reusable workflows
11: Automating Business Processes List workflows Site workflows Reusable workflows The key point that students need to understand about the different types of workflow is the impact that the type has on the availability and functionality of the workflow.
7
Workflow Development Visio 2013 SharePoint Designer Visual Studio 2012
20488B Workflow Development 11: Automating Business Processes Visio 2013 SharePoint Designer Visual Studio 2012 This is just an introductory topic because the subsequent lessons will explain how to use Visio, SharePoint, and Visual Studio to develop workflows.
8
Discussion: Choosing a Suitable Development Approach
11: Automating Business Processes Review the scenario in the student workbook Which approach to development would you use in each scenario and why? Sample solution to scenario: You need to use Visual Studio to create and deploy a custom workflow action that calls the external web service. You can then use SharePoint Designer to create the workflow that uses the custom workflow action.
9
Packaging and Deploying SharePoint Designer Workflows
20488B Lesson 2: Building Workflows by using Visio 2013 and SharePoint Designer 2013 11: Automating Business Processes Packaging and Deploying SharePoint Designer Workflows
10
Creating Workflows by Using Visio
11: Automating Business Processes Shapes: Components Actions Conditions Structure of a workflow Connecting shapes Validating workflows When you start this topic, open Visio and create a new workflow so that students can see how it looks. As you discuss each section, point out the relevant commands or buttons to the students.
11
Creating and Editing Workflows in SharePoint Designer
20488B Creating and Editing Workflows in SharePoint Designer 11: Automating Business Processes Creating workflows Using the Visual Designer Using the text-based designer Importing workflows When you start this topic, open SharePoint Designer and create a new workflow so that students can see how it looks. As you discuss each section, point out the relevant commands or buttons to the students.
12
Publishing Workflows to a Live Site
11: Automating Business Processes Workflow settings: Settings Start options Publishing workflows: Publishing list workflows Publishing reusable workflows Publishing site workflows Point out the relevant options in the UI to the students as you discuss them.
13
Starting workflows automatically:
20488B Using Workflows 11: Automating Business Processes Starting workflows automatically: Create or change an item in the list or library Browse to the workflows for any item in the list or library to review all in-scope workflows Review the tasks or history for an individual workflow Starting workflows manually: Browse to the workflows for a list or library - OR - Browse to the SITE WORKFLOWS page Start a new workflow or review running and completed workflows Open Internet Explorer and show students how to locate the different types of workflows.
14
Demonstration: Creating Workflows in SharePoint Designer
20488B Demonstration: Creating Workflows in SharePoint Designer 11: Automating Business Processes In this demonstration, you will see how to: Create workflows in SharePoint Designer Publish workflows Use workflows in SharePoint Make sure students understand that all shapes can be added and customized in both the Visual Designer and the text-based designer. The only reason for swapping between the two here is to show how to use both methods. Preparation Steps You may want to start the virtual machine in advance to save time during the demonstration. Demonstration Steps Start the 20488B-LON-SP-11 virtual machine. Log on to the LONDON machine as CONTOSO\Administrator with the password Pa$$w0rd. On the Start screen, type SharePoint Designer 2013, and then click SharePoint Designer 2013. In SharePoint Designer, click Open Site. In the Open Site dialog box, in the Site name box, type and then click Open. In the Windows Security dialog box, in the User name box, type Dominik, in the Password box, type Pa$$w0rd, and then click OK. In the Navigation pane, click Lists and Libraries. On the ribbon, on the LISTS AND LIBRARIES tab, in the New group, click Custom List. In the Create list or document library dialog box, in the Name box, type Demo List, and then click OK. In the Navigation pane, click Workflows. On the ribbon, on the WORKFLOWS tab, in the New group, click List Workflow, and then click Demo List. In the Create List Workflow - Demo List dialog box, in the Name box, type Demo Workflow, and then click OK. (More notes on the next slide)
15
Demonstration: Creating Workflows in SharePoint Designer
20488B Demonstration: Creating Workflows in SharePoint Designer 11: Automating Business Processes Click (Start typing or use the Insert group on the ribbon.), type Assign a task, and then press Enter. Click this user. In the Assign a Task dialog box, in the Participant box, type Dominik, in the Task Title box, type Demo task, and then click OK. On the ribbon, on the WORKFLOW tab, in the Manage group, click Views, and then click Visual Designer. In the Shapes pane, click Actions - SharePoint 2013 Workflow, and then drag Log to history list and drop it to the right of the Assign a task action. Click the Log to history action that you just added, click the SharePoint Designer Properties button that appears in the lower-left of the action, and then click Message. In the Log to History List Properties dialog box, type Task assigned, and then click OK. On the ribbon, on the WORKFLOW tab, in the Manage group, click Views, and then click Text- Based Designer. Review the log action that has been added. On the ribbon, on the WORKFLOW tab, in the Save group, click Check for Errors. In the Microsoft SharePoint Designer dialog box, click OK. On the ribbon, on the WORKFLOW tab, in the Manage group, click Workflow Settings. In the Start Options group, select the Start workflow automatically when an item is created check box. On the ribbon, on the WORKFLOW SETTINGS tab, in the Save group, click Save. On the ribbon, on the WORKFLOW SETTINGS tab, in the Save group, click Publish. On the Start screen, click Internet Explorer. (More notes on the next slide)
16
Demonstration: Creating Workflows in SharePoint Designer
20488B Demonstration: Creating Workflows in SharePoint Designer 11: Automating Business Processes In the Windows Security dialog box, in the User name box, type Dominik, in the Password box, type Pa$$w0rd, and then click OK. In SharePoint, in the Quick Launch menu, click Demo List. Click new item, in the Title box, type Demo Item, and then click Save. Next to Demo Item in the list, click the ellipsis, and then click Workflows. Note that the Demo workflow has started. Under Running Workflows, click Demo Workflow and note that a task has been assigned to Dominik Dubicki. Under Tasks, click Demo task. If there are no items under Tasks, refresh the page. On the ribbon, on the VIEW tab, in the Manage group, click Edit Item. Click Approved and when the Demo Workflow page loads, click Refresh. Note that the workflow is now complete and the “Task assigned” message has been logged to the Workflow History section. Close Internet Explorer. Close SharePoint Designer.
17
Packaging and Deploying SharePoint Designer Workflows
20488B Packaging and Deploying SharePoint Designer Workflows 11: Automating Business Processes Packaging a workflow: Use the Save a Template feature in SharePoint Designer Creates a WSP file in the Site Assets library Exporting workflows: Use the Export File feature on the ASSETS tab of the ribbon Creates a WSP file on the local computer Deploying and activating workflows: Use the Upload Solution feature in the SharePoint site Activate the solution, and then activate the site feature Make sure students understand that they only need to package workflows to move them to other sites.
18
Lab A: Building Workflows in Visio 2013 and SharePoint Designer 2013
11: Automating Business Processes Exercise 2: Editing Workflows by Using SharePoint Designer Exercise 1: Creating Workflows by Using Visio In this exercise, you will create the first draft of the workflow by using Visio. You will create a blank Visio workflow, add tasks and connectors to implement the logic, and then validate and save the workflow on the local computer. Exercise 2: Editing Workflows by Using SharePoint Designer In this exercise, you will import the workflow that you created into SharePoint Designer, edit the workflow to add detail, and then deploy the workflow. Finally, you will test the workflow to verify that it performs as expected. Instructor Note: Point out to students that to save time when testing, they can remain logged on as one user; however, in the real world environment, each of the different users would complete each of the tasks. If they do remain logged on as one user, they may find that they need to refresh some of the pages for the new task to be displayed.
19
20488B Lab Scenario 11: Automating Business Processes Contoso produces information leaflets for all of their pharmaceutical products. The publishing process for these information leaflets consists of several steps. The first draft is created by a pharmacologist (Paul West) and then submitted to a copy editor (Danny Levin). If changes are required, they must be incorporated by the original author (Paul West). If there are no copy edit changes, the leaflet can be published by Dominik Dubicki. After the information leaflet is published, it must be reviewed for accuracy at least once every 12 months. Your task is to develop a workflow to automate this process.
20
Lesson 3: Developing Workflows in Visual Studio 2012
20488B Lesson 3: Developing Workflows in Visual Studio 2012 11: Automating Business Processes Deploying and Publishing a Workflow Activity
21
Introduction to Visual Studio Workflows
20488B Introduction to Visual Studio Workflows 11: Automating Business Processes Declarative workflows No custom code Built on Windows Workflow Foundation 4 Packaged as Features Workflow templates: Workflow Workflow Custom Activity Use this topic to introduce the high-level concepts of Visual Studio workflows for SharePoint 2013.
22
Adding a Workflow Custom Activity to a Project
20488B Adding a Workflow Custom Activity to a Project 11: Automating Business Processes Workflow Custom Activity template comprises: Feature1.feature <Workflow Custom Activity name>.xaml <Workflow Custom Activity name>.action4 Elements.xml Do not cover the content of the files in this topic, because they will be described in the following topics. Here, you should just introduce the files and briefly describe what they do.
23
Creating the Workflow Logic
20488B Creating the Workflow Logic 11: Automating Business Processes Using variables, arguments, and imports: Variables – store date during the workflow Arguments – pass data in and out of the workflow Imports – import namespaces into the workflow Using workflow controls: Add to workflow by using the Toolbox Configure by using the Properties pane Consider opening Visual Studio and creating a SharePoint project containing a workflow custom activity so that you can identify the relevant parts of the screen and their functionality while discussing this topic.
24
Creating the actions File
20488B Creating the actions File 11: Automating Business Processes <Action Name="Sample" ClassName="MyProject.Sample"> <RuleDesigner Sentence="Get info for user %1 (output to %2)"> <FieldBind Field="UserName" Text="User name" Id="1" DesignerType="Person" /> <FieldBind Field="Info" Text="UserInfo" Id="2" DesignerType="TextArea" /> </RuleDesigner> <Parameters> <Parameter Name="UserName" Type="System.String, mscorlib" Direction="In" DesignerType="Person" /> <Parameter Name="Info" Type="System.String, mscorlib" Direction="Out" DesignerType="TextArea" /> </Parameters> </Action> Make sure that students understand the relationship between the FieldBind element, the Parameter element, and the argument defined in the workflow designer.
25
Deploying and Publishing a Workflow Activity
11: Automating Business Processes Deploying a workflow activity: Deploy to the site defined when you created the project Clear the SharePoint Designer cache Use the workflow activity from the Custom group in the Actions list Publishing a workflow activity: Publish to an alternative site: Use the workflow activity Publish to the file system: Copy the .wsp file to the target server Upload the solution Activate the solution Make sure that students understand that they deploy to the site defined when they created the project and that they publish to an alternative site or the file system. Also be sure to point out that when publishing to the file system, they must manually upload and activate the solution on the target site.
26
Lab B: Creating Workflow Actions in Visual Studio 2012
11: Automating Business Processes Exercise 2: Using a Custom Workflow in SharePoint Designer Remind students that if they need to update their Visual Studio workflow custom activity during the lab, they must clear the SharePoint Designer cache again as described in Exercise 2, Task 1, before trying to use the workflow. Exercise 1: Creating Custom Workflow Actions In this exercise, you will use Visual Studio to create and deploy the workflow custom activity. You will implement the workflow logic, create the .actions4 file, and then deploy the workflow to the team site. Exercise 2: Using a Custom Workflow in SharePoint Designer In this exercise, you will use the custom action in SharePoint Designer and then test to confirm that it functions as expected. Instructor Note: If students need to redeploy their Visual Studio workflow, they will need to close SharePoint Designer and clear the cache folders again before continuing to work in SharePoint Designer. Point out to students that to save time when testing, they can remain logged on as one user; however, in the real world environment, each of the different users would complete each of the tasks. If they do remain logged on as one user, they may find that they need to refresh some of the pages for the new task to be displayed.
27
20488B Lab Scenario 11: Automating Business Processes Your colleague, Dominik Dubicki, who is responsible for publishing the Contoso product information leaflets mentions to you that whenever he publishes a leaflet he has to use another application to discover the distribution area for the leaflet. He asks if you can use this application in your workflow to include the information in his task title. You decide to develop a workflow custom activity in Visual Studio to query the distribution web service and output the distribution area. You will then incorporate this action into the existing workflow and add the distribution area to the task assigned to Dominik.
28
Module Review and Takeaways
20488B Module Review and Takeaways 11: Automating Business Processes Review Question(s) Review Question(s) Question Which type of workflow cannot be triggered by an event? ( )Option 1: List workflow ( )Option 2: Site workflow ( )Option 3: Reusable workflow Answer (√) Option 2: Site workflow You are developing a workflow in Visio and have added an Assign a task shape to the workflow. However, you cannot locate the Properties button to customize the task. What do you need to do? You must import the workflow into SharePoint Designer to access the properties of workflow items. Which of the following controls can you use to call a method in a web service from a Visual Studio workflow custom activity? ( )Option 1: Interop ( )Option 2: WorkflowInterop ( )Option 3: HttpSend ( )Option 4: WaitForCustomEvent ( )Option 5: FlowSwitch<T> (√) Option 3: HttpSend (More notes on the next slide)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.