ActionBody 元素

(Parameter 元素) (coercionParametersType complexType) (Action4)

适用于:SharePoint Server 2013

复杂类型 coercionParametersType 中的元素,用于用作强制操作的活动的复杂绑定的 ActivityBody 。 元素提供一个 xaml 片段,该片段提供活动的参数绑定。

用法

    <complexType name="coercionParametersType">
        <Parameter>
            <ActivityBody />
        </Parameter>
    </complexType>

元素信息

信息 位置
元素类型
命名空间
架构文件 Actions4.xsd

定义

    <xs:element name="ActivityBody"   minOccurs="1"   maxOccurs="1" >
               <xs:complexType>
               <xs:sequence>
         <xs:element name="ActivityBody" >

      </xs:element>
           </xs:sequence>
           </xs:complexType>
      </xs:element>

元素和属性

如果架构定义了特定要求(如 sequenceminOccursmaxOccurschoice),请参阅定义部分。

父元素

元素

类型

说明

参数

子元素

无。

Attributes

无。

示例定义

下面提供了使用 ActivityBody 元素的强制设置的示例定义。

    <Coercion Name="DateTimeToStringShortDate"
     DisplayName="Short Date"
     CatchAll="false"
     RankDefault="160"
     SourceType="System.DateTime"
     DestinationType="System.String"
     Id="F806859B-1D48-443C-ADF8-E014D9ECCE7B"
     ClassName="Microsoft.Activities.Expressions.ToString"
     Assembly="Microsoft.Activities, Version=2.0.0.0, Culture=neutral,
       PublicKeyToken=31bf3856ad364e35"
     SourceProperty="Object">
       <Parameters>
          <Parameter Name="CultureName" Type="System.String">
             <ActivityBody>
                <p:GetConfigurationValue
                xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
                xmlns:p="http://schemas.microsoft.com/workflow
                     /2012/xaml/activities"
                Name="Microsoft.SharePoint.ActivationProperties.CultureName">
                </p:GetConfigurationValue>
             </ActivityBody>
          </Parameter>
          <Parameter Name="Format" Type="System.String" Value="d" />
       </Parameters>
    </Coercion>

上述强制定义将以下 XAML 片段注入工作流:

    <p:ToString Format="d">
       <p:ToString.CultureName>
          <InArgument x:TypeArguments="x:String">
             <p:GetConfigurationValue
                 Name="Microsoft.SharePoint.ActivationProperties.CultureName">
             </p:GetConfigurationValue>
          </InArgument>
       </p:ToString.CultureName>
    </p:ToString>