Parameter 元素 (WorkflowActions)

上次修改时间: 2015年3月9日

适用范围: SharePoint Foundation 2010

本文内容
属性
子元素
父元素

用于描述自定义 Actions 或 Conditions 方法调用的输入和输出参数。

<Conditions>
  <Condition>
        <Parameters>
      <Parameter />
        </Parameter>
  </Condition>
</Conditions>
<Actions>
  <Action>
    <Parameters>
      <Parameter />
    </Parameters
  </Action>
</Actions>

属性

属性

说明

Type

必需属性,类型为 String。部分限定 .NET 数据类型。值不区分大小写。

示例:

System.Object, mscorlib

Direction

可选属性,类型为 text。指定输入或输出参数。有效值为 In 和 Out。值不区分大小写。

Name

必需属性,类型为 text。用于将 FieldBind 元素与参数相关联。值不区分大小写。

InitialValue

可选属性,类型为 text。用于指定传递给参数的默认初始值。值不区分大小写。

子元素

父元素

Parameters

示例

下面的示例演示如何构造 Parameter 元素,以便工作流引擎可以与程序集代码交互。

<WorkflowInfo>
   <Conditions>
      <Default>…</Default>
      <Condition>…
        <Parameters>
          <Parameter />
        </Parameters>
      </Condition>
   </Conditions>
   <Actions Sequential="then" Parallel="and">
      <Action Name="Update my custom SharePoint list"
              ClassName="CustomActivities.OrderListFunctions"
              Assembly="CustomActivities"
              Category="My Custom Actions"
              CreatesTask="true"
              CreatesInList="UpdateList"
              AppliesTo="all"
              ListModeration="false"
              UsesCurrentItem="true">
         <RuleDesigner Sentence="Update %1">
            <FieldBind Field="UpdateList"
                       Function="UpdateOrderList"
                       DesignerType="ChooseListItem"
                       ID="1"
                       Text="My Custom List">
            </FieldBind>
         </RuleDesigner>
      <Parameters>
         <Parameter Type="System.String, mscorlib"
                    Direction="In"
                    Name="UpdateList" />
      </Parameters>
      </Action>
   </Actions>
</WorkflowInfo>

请参阅

任务

.ACTIONS 文件示例

概念

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

默认工作流操作

默认工作流条件