Integrating Workflow Task Review Infopath Page as Content Type

This article is about how to relate workflow Task review InfoPath form with document library item where InfoPath form is deployed as content type.

InfoPath page is deployed in Library using content type thru central administration.Once the task is created
Reviewer might want to see the entire content before Approve/Reject etc…

For this create seprate custom Task Review ASPX page keep it inside Layout folder.

Create Feature.xml , workflow.xml andĀ  workflowTaskContentType.xml
Feature.xml will look like ..

<?xml version=”1.0″ encoding=”utf-8″?>
<FeatureĀ  Id=”A558D1D0-BBA9-40ce-AC28-A61F80759A40″
Description=”MKS APPROVAL SYSTEM workflow works for various approval level.”
ReceiverAssembly=”Microsoft.Office.Workflow.Feature, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c”
<ElementManifest Location=”workflow.xml” />
<ElementManifest Location=”workflowTaskContentType.xml” />

Similarly define your content Type xml register all the fields you want like.

<FieldRef ID=”{3bcc76ec-77be-4781-83fa-5af750b773aa}” Name=”UserName” DisplayName=”UserName”/>
<FieldRef ID=”{d59e4bd2-bc55-424a-a617-589e1eee3fef}” Name=”Approved” DisplayName=”Approved”/>
<FieldRef ID=”{57559084-bf2c-4f98-a5d5-4e06ad8b34bf}” Name=”CommentFromApprover” DisplayName=”CommentFromApprover”/>

Workflow.xml will not contain


This is the ID which is added in side workflowTaskContentType.xml

Inside the custom ASPX page add XmlFormView Control and set XmlLocation at runtime
to the library where infopath is enabled and the task is associated.

<cc1:xmlformview id=”XmlFormView1″ runat=”server” height=”250px” oninitialize=”XmlFormView1_Initialize”
onsubmittohost=”XmlFormView1_SubmitToHost” width=”100%”></cc1:xmlformview>