如果发现代码段功能里没有workflow和feature的选项可以参考一下这篇文章:
http://www.cnblogs.com/xiaoshatian/archive/2006/12/31/608479.html
这篇文章也向您展示了这两个文件的作用。
http://weblog.vb-tech.com/nick/archive/2006/09/04/1760.aspx
我的Workflow.xml的内容:
Workflow的属性含义:
我的feature.xml的内容
转自http://www.cnblogs.com/burnett/archive/2007/02/27/646965.html
http://www.cnblogs.com/xiaoshatian/archive/2006/12/31/608479.html
这篇文章也向您展示了这两个文件的作用。
http://weblog.vb-tech.com/nick/archive/2006/09/04/1760.aspx
我的Workflow.xml的内容:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Workflow
Name="My Workflow"
Description="This workflow "
Id="9e22a7b0-4fef-411a-b8c2-4ff8cca31e85"
CodeBesideClass="HelloSPWF.ApplyWorkFlow"
CodeBesideAssembly="HelloSPWF, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4bfa53b046e311f6"
TaskListContentTypeId="0x01080100C9C9515DE4E24001905074F980F93160"
AssociationUrl="_layouts/CstWrkflIP.aspx"
InstantiationUrl="_layouts/IniWrkflIP.aspx"
ModificationUrl="_layouts/ModWrkflIP.aspx">
<Categories/>
<!-- Tags to specify InfoPath forms for the workflow; delete tags for forms that you do not have -->
<MetaData>
<Association_FormURN>urn:schemas-microsoft-com:office:infopath:bxd-apply1:-myXSD-2007-02-06T06-43-51</Association_FormURN>
<Instantiation_FormURN>urn:schemas-microsoft-com:office:infopath:bxd-apply1:-myXSD-2007-02-06T06-43-51</Instantiation_FormURN>
<Task0_FormURN>urn:schemas-microsoft-com:office:infopath:bxd-mark:-myXSD-2007-02-09T08-06-41</Task0_FormURN>
<Modification_GUID_FormURN>modificationURN</Modification_GUID_FormURN>
<Modification_GUID_Name>Name of Modification</Modification_GUID_Name>
<StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>
</MetaData>
</Workflow>
</Elements>
Element元素中包含的Workflow子节点就是对工作流属性的描述。<Workflow
Name="My Workflow"
Description="This workflow "
Id="9e22a7b0-4fef-411a-b8c2-4ff8cca31e85"
CodeBesideClass="HelloSPWF.ApplyWorkFlow"
CodeBesideAssembly="HelloSPWF, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4bfa53b046e311f6"
TaskListContentTypeId="0x01080100C9C9515DE4E24001905074F980F93160"
AssociationUrl="_layouts/CstWrkflIP.aspx"
InstantiationUrl="_layouts/IniWrkflIP.aspx"
ModificationUrl="_layouts/ModWrkflIP.aspx">
<Categories/>
<!-- Tags to specify InfoPath forms for the workflow; delete tags for forms that you do not have -->
<MetaData>
<Association_FormURN>urn:schemas-microsoft-com:office:infopath:bxd-apply1:-myXSD-2007-02-06T06-43-51</Association_FormURN>
<Instantiation_FormURN>urn:schemas-microsoft-com:office:infopath:bxd-apply1:-myXSD-2007-02-06T06-43-51</Instantiation_FormURN>
<Task0_FormURN>urn:schemas-microsoft-com:office:infopath:bxd-mark:-myXSD-2007-02-09T08-06-41</Task0_FormURN>
<Modification_GUID_FormURN>modificationURN</Modification_GUID_FormURN>
<Modification_GUID_Name>Name of Modification</Modification_GUID_Name>
<StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>
</MetaData>
</Workflow>
</Elements>
Workflow的属性含义:
MetaData节点中保存了表单的标识信息,也是我们关心的一个节点。比如我们的一个工作流的应用中,会使用到联合表单(用于SPS管理层在部署工作流到一个项目的时候设定数据信息),初始化表单(工作流启动者填写的表单),还有任务处理表单(用于审批者处理审批信息的表单)。这个工作流使用到的表单由这些表单的URN(Uniform Resource Name,是URI的一个子集)唯一标识,然后存储在MetaData中。 | ||||
| ||||
|
我的feature.xml的内容
<Feature Id="4d44d6cb-50ac-4e2b-a15d-2d9eb0db56d2"
Title="宸梾璐规姤閿€鍗曞鎵?
Description="宸梾璐规姤閿€鍗曞鎵瑰伐浣滄祦"
Version="12.0.0.0"
Scope="Site"
ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="workflow.xml" />
</ElementManifests>
<Properties>
<Property Key="GloballyAvailable" Value="true" />
<!-- Value for RegisterForms key indicates the path to the forms relative to feature file location -->
<!-- if you don't have forms, use *.xsn -->
<Property Key="RegisterForms" Value="*.xsn" />
</Properties>
</Feature>
Feature节点中的元素标识了工作流的功能描述:Title="宸梾璐规姤閿€鍗曞鎵?
Description="宸梾璐规姤閿€鍗曞鎵瑰伐浣滄祦"
Version="12.0.0.0"
Scope="Site"
ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="workflow.xml" />
</ElementManifests>
<Properties>
<Property Key="GloballyAvailable" Value="true" />
<!-- Value for RegisterForms key indicates the path to the forms relative to feature file location -->
<!-- if you don't have forms, use *.xsn -->
<Property Key="RegisterForms" Value="*.xsn" />
</Properties>
</Feature>
|
转自http://www.cnblogs.com/burnett/archive/2007/02/27/646965.html