ContentType 元素 (WorkflowConfig)

适用于:SharePoint 2016 |SharePoint Foundation 2013 |SharePoint Online |SharePoint Server 2013

定义工作流程中使用的工作流程任务类型的内容类型。

定义

<ContentType>
</ContentType>

元素和属性

下面各部分介绍了属性、子元素和父元素。

Attributes

属性

说明

**ContentTypeId**

必需 **text**。 指定内容类型的内容类型 ID。

**形式**

必需 **text**。 指定内容类型编辑表单的路径。

指定的路径必须相对于工作流程配置文件的位置。

子元素

Fields 元素 (WorkflowConfig)

父元素

ContentTypes 元素 (WorkflowConfig)

备注

必须将工作流程配置文件中定义的每个内容类型添加到为工作流程指定的任务列表中。

使用 Association 元素的 TaskListId 属性 (WorkflowConfig) 元素指定工作流应使用的任务列表。

有关内容类型 ID 的详细信息,请参阅Content Type IDs

ContentType 元素允许任何附加属性。

示例

下面的示例演示 ContentTypes 元素,该元素包含一个用于工作流程中创建的任务的内容类型。

      <ContentTypes>
        <ContentType
          Name="Review New Document"
          ContentTypeID=
            "0x0108010086C115D5C5C27B439C22EB22F050B49B00DD9F97273595EA4BA32838A26054BF08"
          Form="/Workflows/Notify Me/Review New Document.aspx"
          Description="Workflow used to review new documents">
          <Fields/>
        </ContentType>
      </ContentTypes>

另请参阅