.ACTIONS 文件示例 (WorkflowInfo)

上次修改时间: 2011年2月25日

适用范围: SharePoint Foundation 2010

本示例演示有效 .ACTIONS 文件的一般结构,此文件可用于将自定义条件和操作导入基于规则的声明性无代码工作流编辑器(如 Microsoft SharePoint Designer 2010)中。

示例

下面的 XML 示例演示如何构建 .ACTIONS 文件以将 Conditions 或 Actions 元素添加到默认列表。

<?xml version="1.0" encoding="utf-8"?>
<WorkflowInfo Language="en-us">
   <Conditions And="and"
               Else="Else If"
               Not="not"
               Or="or"
               When="If">
      <Condition AppliesTo="list"
                 Assembly="Assembly.Name, 
                           Version=0.0.0.0, 
                           Culture=neutral, 
                           PublicKeyToken=GUID"
                 ClassName="Fully qualified 
                            class name"
                 FunctionName="Boolean method name
                               implemented in 
                               class"
                 Name="Name to be displayed in 
                       workflow editor"
                 Type="Advanced"
                 UsesCurrentItem="true">
         <RuleDesigner Sentence="Sentence to be 
                                 displayed to the 
                                 workflow editor">
            <FieldBind DesignerType="Date"
                       Field="Parameter that 
                              FieldBind maps to"
                       Function="true"
                       Id="Unique positive Integer"
                       Text="Text to be displayed 
                             as a hyperlink"
                       TypeFrom="Parameter that a 
                                 non-Operator derives 
                                 its type from"
                       Value="Reserved for future use">
               <Option Name="Option1" Value="Value1" />
            </FieldBind>
         </RuleDesigner>
         <Parameters>
            <Parameter Direction="In"
                       InitialValue=""
                       Name="MyParameter"
                       Type="System.String, mscorlib" />
         </Parameters>
      </Condition>
   </Conditions>
   <Actions>
      <Action Name="Action name displayed in editor">
         <RuleDesigner Sentence="Sentence to be 
                                 displayed to the
                                 workflow editor">
            <FieldBind DesignerType="CreateListItem"
                       Field="Parameter that FieldBind 
                              maps to"
                       Function="true"
                       Id="Unique positive Integer"
                       OperatorTypeFrom="Parameter 
                                         Operator derives 
                                         its type from"
                       Text="Text to be displayed 
                             as a hyperlink"
                       TypeFrom="Parameter non-Operator 
                                 derives its type from"
                       Value="Reserved for future use">
            </FieldBind>
         </RuleDesigner>
      </Default>
   </Actions>
</WorkflowInfo>

请参阅

任务

.ACTIONS 文件示例

概念

创建声明性、无代码工作流编辑器

默认工作流操作

默认工作流条件

工作流操作架构概述