This walkthrough demonstrates how to import a reusable workflow created in SharePoint Designer 2013 into a Visual Studio SharePoint workflow project.
Workflows created in SharePoint Designer, or declarative workflows, consist of XML statements instead of code. SharePoint Designer 2013 introducesreusable workflows, which are portable, declarative workflows that can be used by different lists in SharePoint sites.
Workflows created in Visual Studio 2013, such as sequential and state machine workflows, are calledcode workflows. Code workflows consist of XML files and code modules in which users can customize the workflow's behavior.
Visual Studio allows you to import reusable workflows created in SharePoint Designer 2013 and convert them to code workflows for use in your SharePoint sites.
This walkthrough demonstrates the following tasks:
-
Creating a simple, reusable workflow in SharePoint Designer.
-
Exporting the SharePoint Designer reusable workflow to a .wsp file and into SharePoint.
-
Importing the .wsp file into Visual Studio by using the Import Reusable Workflow project.
-
Altering the workflow by adding code.
-
Using the imported workflow in a SharePoint site.
Because SharePoint does not include any reusable workflows that you can use for this example, you will create one.In this simple workflow, when a user enters a new task in the Task list that has a specific title, the task is assigned to that user.
First you create two new SharePoint subsites: one to host the reusable workflows from SharePoint Designer, another to host the converted workflows.
To create SharePoint subsitesIn SharePoint Designer 2010, on the menu bar, chooseFile, New Blank Web Site
In theNew Blank Web Site dialog box, browse to a SharePoint site where you want to create the workflow, or use the value of http://SystemName/ and then choose theOK button.The Home page appears.
In the Subsites section, choose the New button.
In the New dialog box, choose SharePoint Templates from the list in the left pane, and chooseTeam Site from the list in the right pane.
In the Specify the location of the Web site box, replace the word subsite in the URL with SPD1, and then choose the OK button.
This opens the new subsite into SharePoint Designer.Close this instance of SharePoint Designer and go back to the first instance (the top-level site).
Repeat steps 3 - 5 to create the second subsite, this time replacing the wordsubsite in the URL with SPD2.
To create a SharePoint Designer reusable workflow
In the Subsites section, choose theSPD1 site to modify it.
On the ribbon, choose the Reusable Workflow button.
The Create Reusable Workflow wizard appears.
In the Name box, enter SPD Task Workflow.
In the Content Type list, chooseTask, and then choose the OK button.
The workflow opens in the SharePoint Designer workflow designer.
In the workflow designer, choose Step 1, and then, on the ribbon, choose theCondition button.
In the list of conditions, choose If current item field equals value.
This step adds a condition that’s named If field equals value.
In the If field equals value condition, choose thefield link.
In the list of values, choose Title.
In the If field equals value condition, choose thevalue link.
In the box, enter New task.
The condition statement now reads If Current Item:Title equals New task.
Choose the line under the condition statement, and then, on the ribbon, choose theAction button.
In the list of actions, choose Set field in current item.
In the Set field to value action, choose thefield link, and then, in the list, choose Assigned to.
In the Set field to value action, choose thevalue link, and then, in the list of existing users and groups, chooseUser who created the item.
Choose the Add button, and then choose theOK button.
The action statement now reads Set Assigned To to Current Item:CreatedBy.
Because Visual Studio can import only .wsp files, you must save the reusable workflow as a .wsp file and deploy it to SharePoint before importing it into Visual Studio.
If you receive a runt
a.w3cbbs:link{color:#f90;}
a.w3cbbs:hover{color:#fff;background-color:#FF5900;}
a.w3cbbs:active{color:#FF5900;}
<a href=/blog_article/"/tz/url/www.software8.co/quot;.html class="w3cbbs">第一种写法 - 站长中心</a>
a:link .nav2 {color: #777;}
a:hover .nav2 {color: #f60;}
a:active .nav2 {color: #f60;}
<a href=/blog_article/"/tz/url/www.software8.co/quot;.html>
<span class="nav2">第二种写法 - 站长中心</span>
</a>
.wwwMb5u a:visited {color: #ccc;}
.wwwMb5u a:hover {color: #f60;}
<span class="wwwMb5u">
<a href=/blog_article/"/tz/url/www.software8.co/quot;.html>第三种写法 - 站长中心</a>
</span>
css 说明
background-image:url(/blog_article/"图片的网址"/index.html); 背景图
background: url(/blog_article/" 图片的网址 "/index.html); 背景
background-color:#色码; 背景色彩
Exp:
background-image:url(/blog_article/%E8%83%8C%E6%99%AF%E5%9B%BE%E6%A1%88.jpg);
background-color:#FFFFFF;
background-color : transparent; <--设定背景为透明色
--------------------------------------------------------------------------------
background-repeat 改变背景图片的重复并排的设定
css
说明
repeat 背景图片并排
repeat-x 背景图片以X方向 并排
repeat-y 背景图片以Y方向 并排
no-repeat 背景图片不 以并排的方式处理
Exp:
background-image:url(/blog_article/"http_/www_software8_co/xx.gif);