Last active
December 12, 2017 19:28
-
-
Save pmatthews05/c72c0277e08a4b55f2b67e06ce533a5f to your computer and use it in GitHub Desktop.
Provisioning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Security; | |
using OfficeDevPnP.Core.Framework.Provisioning.Providers.Xml; | |
using OfficeDevPnP.Core.Framework.Provisioning.Model; | |
using OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers; | |
using Microsoft.SharePoint.Client; | |
using System.Threading; | |
namespace PNPWorkflow | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string sitecollectionUrl = "https://todo.sharepoint.com"; | |
string targetWebUrl = sitecollectionUrl + "/sites/OTBTeam"; | |
string userName = "todo"; | |
string password = "todo"; | |
string templatePath = @".\workflow.xml"; | |
//Provision Site Columns, Content Types, Display Templates | |
ApplyProvisioningTemplate(targetWebUrl, userName, password, templatePath); | |
} | |
private static void ApplyProvisioningTemplate(string targetWebUrl, string userName, string password, string templatePath) | |
{ | |
try | |
{ | |
SecureString pwd = new SecureString(); | |
foreach (char c in password.ToCharArray()) pwd.AppendChar(c); | |
//Get Current execute Directory | |
string path = System.Reflection.Assembly.GetExecutingAssembly().Location; | |
var directory = System.IO.Path.GetDirectoryName(path); | |
Console.WriteLine("Apply Provisioning Template Started..."); | |
Console.WriteLine("Current Directory: " + directory); | |
Console.WriteLine(); | |
XMLTemplateProvider provider = new XMLFileSystemTemplateProvider(directory, ""); | |
ProvisioningTemplate template = provider.GetTemplate(templatePath); | |
using (var ctx = new ClientContext(targetWebUrl)) | |
{ | |
ctx.Credentials = new SharePointOnlineCredentials(userName, pwd); | |
ctx.RequestTimeout = Timeout.Infinite; | |
Web web = ctx.Web; | |
ctx.Load(web); | |
ctx.ExecuteQueryRetry(); | |
Console.WriteLine("Site URL where Apply Template: " + ctx.Web.Url); | |
Console.WriteLine(); | |
//Create this object to track the provisioning Stages | |
ProvisioningTemplateApplyingInformation ptai = new ProvisioningTemplateApplyingInformation | |
{ | |
ProgressDelegate = (message, progress, total) => | |
{ | |
Console.WriteLine("{0:00}/{1:00} - {2}", progress, total, message); | |
}, | |
MessagesDelegate = (message, messageType) => | |
{ | |
Console.WriteLine("{0} - {1}", messageType, message); | |
} | |
}; | |
//Apply Provisioning Template to Web Object (Not to Site Object) | |
web.ApplyProvisioningTemplate(template, ptai); | |
} | |
Console.WriteLine("Done! Template Applied."); | |
Console.WriteLine(); | |
} | |
catch (Exception ex) | |
{ | |
Console.WriteLine(ex.Message); | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Activity mc:Ignorable="sap sap2010 sads" x:Class="Add to History.MTW" | |
xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger" | |
xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" | |
xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation" | |
xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
<Sequence> | |
<Sequence sap2010:WorkflowViewState.IdRef="Sequence_1" /> | |
<Flowchart> | |
<Flowchart.StartNode> | |
<FlowStep x:Name="__ReferenceID0"> | |
<Sequence> | |
<local:SetWorkflowStatus Disabled="False" Status="Stage 1" xmlns:local="clr-namespace:Microsoft.SharePoint.WorkflowServices.Activities" xmlns:mwaw="clr-namespace:Microsoft.Web.Authoring.Workflow;assembly=Microsoft.Web.Authoring" /> | |
<Sequence DisplayName="Stage 1"> | |
<local:WriteToHistory Message="This is a message to add to the history list" xmlns:local="clr-namespace:Microsoft.SharePoint.WorkflowServices.Activities" xmlns:mwaw="clr-namespace:Microsoft.Web.Authoring.Workflow;assembly=Microsoft.Web.Authoring" /> | |
<local:WriteToHistory Message="Thank you for doing this." xmlns:local="clr-namespace:Microsoft.SharePoint.WorkflowServices.Activities" xmlns:mwaw="clr-namespace:Microsoft.Web.Authoring.Workflow;assembly=Microsoft.Web.Authoring" /> | |
</Sequence> | |
<Sequence /> | |
</Sequence> | |
</FlowStep> | |
</Flowchart.StartNode> | |
<x:Reference>__ReferenceID0</x:Reference> | |
<sap2010:WorkflowViewState.IdRef>Flowchart_1</sap2010:WorkflowViewState.IdRef> | |
</Flowchart> | |
<sap2010:WorkflowViewState.IdRef>Sequence_2</sap2010:WorkflowViewState.IdRef> | |
<sads:DebugSymbol.Symbol>d1pjOlx1c2Vyc1xtcnBhdVxkb2N1bWVudHNcdmlzdWFsIHN0dWRpbyAyMDE3XFByb2plY3RzXFBOUFdvcmtmbG93XFBOUFdvcmtmbG93XHdvcmtmbG93LnhhbWwGCQMdDgIBAQoFCj4CAQkLBRoRAgECDgsVFgIBAxANExgCAQUUDRQZAgEE</sads:DebugSymbol.Symbol> | |
</Sequence> | |
<sap2010:WorkflowViewState.IdRef>Add to History.MTW_1</sap2010:WorkflowViewState.IdRef> | |
<sap2010:WorkflowViewState.ViewStateManager> | |
<sap2010:ViewStateManager> | |
<sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="200,100.888888888889"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
</sap2010:ViewStateData> | |
<sap2010:ViewStateData Id="Flowchart_1" sap:VirtualizedContainerService.HintSize="200,52.8888888888889"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">False</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
</sap2010:ViewStateData> | |
<sap2010:ViewStateData Id="Sequence_2" sap:VirtualizedContainerService.HintSize="222.222222222222,318.222222222222"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
</sap2010:ViewStateData> | |
<sap2010:ViewStateData Id="Add to History.MTW_1" sap:VirtualizedContainerService.HintSize="262.222222222222,398.222222222222" /> | |
</sap2010:ViewStateManager> | |
</sap2010:WorkflowViewState.ViewStateManager> | |
</Activity> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2016/05/ProvisioningSchema"> | |
<pnp:Preferences Generator="OfficeDevPnP.Core, Version=2.21.1712.2, Culture=neutral, PublicKeyToken=3751622786b357c2" /> | |
<pnp:Templates ID="CONTAINER-TEMPLATE-CAA26C9436E340C49D9C84D3813338FF"> | |
<pnp:ProvisioningTemplate ID="TEMPLATE-CAA26C9436E340C49D9C84D3813338FF" Version="1" BaseSiteTemplate="STS#0"> | |
<pnp:Lists> | |
<pnp:ListInstance Title="Workflow History" Description="" DocumentTemplate="" TemplateType="140" Url="Lists/Workflow History" MinorVersionLimit="0" MaxVersionLimit="0" DraftVersionVisibility="0" TemplateFeatureID="00bfea71-4ea5-48d4-a4ad-305cf7030140" EnableAttachments="false" EnableFolderCreation="false"> | |
<pnp:ContentTypeBindings> | |
<pnp:ContentTypeBinding ContentTypeID="0x0109" Default="true" /> | |
</pnp:ContentTypeBindings> | |
<pnp:Views> | |
<View Name="{7647BB91-5C60-4A71-859E-6551D9A99972}" DefaultView="TRUE" Type="HTML" DisplayName="All History" Url="{site}/Lists/Workflow History/AllItems.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/15/images/generic.png?rev=44"> | |
<Query> | |
<OrderBy> | |
<FieldRef Name="Occurred" /> | |
</OrderBy> | |
</Query> | |
<ViewFields> | |
<FieldRef Name="WorkflowInstance" /> | |
<FieldRef Name="WorkflowAssociation" /> | |
<FieldRef Name="WorkflowTemplate" /> | |
<FieldRef Name="List" /> | |
<FieldRef Name="Item" /> | |
<FieldRef Name="User" /> | |
<FieldRef Name="Occurred" /> | |
<FieldRef Name="Event" /> | |
<FieldRef Name="Group" /> | |
<FieldRef Name="Outcome" /> | |
<FieldRef Name="Duration" /> | |
<FieldRef Name="Description" /> | |
<FieldRef Name="Data" /> | |
</ViewFields> | |
<RowLimit Paged="TRUE">30</RowLimit> | |
<JSLink>clienttemplates.js</JSLink> | |
</View> | |
</pnp:Views> | |
<pnp:FieldRefs> | |
<pnp:FieldRef ID="ccc1037f-f65e-434a-868e-8c98af31fe29" Name="_ComplianceFlags" DisplayName="Label setting" /> | |
<pnp:FieldRef ID="d4b6480a-4bed-4094-9a52-30181ea38f1d" Name="_ComplianceTag" DisplayName="Labels" /> | |
<pnp:FieldRef ID="92be610e-ddbb-49f4-b3b1-5c2bc768df8f" Name="_ComplianceTagWrittenTime" DisplayName="Label Applied" /> | |
<pnp:FieldRef ID="418d7676-2d6f-42cf-a16a-e43d2971252a" Name="_ComplianceTagUserId" DisplayName="Label applied by" /> | |
<pnp:FieldRef ID="8382d247-72a9-44b1-9794-7b177edc89f3" Name="_IsRecord" DisplayName="Item is a Record" /> | |
<pnp:FieldRef ID="20a1a5b1-fddf-4420-ac68-9701490e09af" Name="Event" Required="true" DisplayName="Event Type" /> | |
<pnp:FieldRef ID="de21c770-a12b-4f88-af4b-aeebd897c8c2" Name="WorkflowInstance" Required="true" DisplayName="Workflow History Parent Instance" /> | |
<pnp:FieldRef ID="8d426880-8d96-459b-ae48-e8b3836d8b9d" Name="WorkflowAssociation" Required="true" DisplayName="Workflow Association ID" /> | |
<pnp:FieldRef ID="bfb1589e-2016-4b98-ae62-e91979c3224f" Name="WorkflowTemplate" Required="true" DisplayName="Workflow Template ID" /> | |
<pnp:FieldRef ID="f44e428b-61c8-4100-a911-a3a635f43bb5" Name="List" Required="true" DisplayName="List ID" /> | |
<pnp:FieldRef ID="92b8e9d0-a11b-418f-bf1c-c44aaa73075d" Name="Item" DisplayName="Primary Item ID" /> | |
<pnp:FieldRef ID="5928ff1f-daa1-406c-b4a9-190485a448cb" Name="User" Required="true" DisplayName="User ID" /> | |
<pnp:FieldRef ID="5602dc33-a60a-4dec-bd23-d18dfcef861d" Name="Occurred" Required="true" DisplayName="Date Occurred" /> | |
<pnp:FieldRef ID="c86a2f7f-7680-4a0b-8907-39c4f4855a35" Name="Group" DisplayName="Group Type" /> | |
<pnp:FieldRef ID="dcde7b1f-918b-4ed5-819f-9798f8abac37" Name="Outcome" DisplayName="Outcome" /> | |
<pnp:FieldRef ID="4d54445d-1c84-4a6d-b8db-a51ded4e1acc" Name="Duration" DisplayName="Duration" /> | |
<pnp:FieldRef ID="2fd53156-ff9d-4cc3-b0ac-fe8a7bc82283" Name="Description" DisplayName="Description" /> | |
<pnp:FieldRef ID="38269294-165e-448a-a6b9-f0e09688f3f9" Name="Data" DisplayName="Data" /> | |
</pnp:FieldRefs> | |
</pnp:ListInstance> | |
<pnp:ListInstance Title="Workflow Tasks" Description="" DocumentTemplate="" TemplateType="171" Url="Lists/Workflow Tasks" MinorVersionLimit="0" MaxVersionLimit="0" DraftVersionVisibility="0" TemplateFeatureID="f9ce21f8-f437-4f7e-8bc6-946378c850f0" ContentTypesEnabled="true" EnableFolderCreation="false"> | |
<pnp:ContentTypeBindings> | |
<pnp:ContentTypeBinding ContentTypeID="0x0108" Default="true" /> | |
<pnp:ContentTypeBinding ContentTypeID="0x0108003365C4474CAE8C42BCE396314E88E51F" /> | |
</pnp:ContentTypeBindings> | |
<pnp:Views> | |
<View Name="{2C9116EA-59B2-4C70-95E4-286146977D9E}" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" Type="HTML" DisplayName="All Tasks" Url="{site}/Lists/Workflow Tasks/AllItems.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/15/images/issuelst.png?rev=44"> | |
<ViewFields> | |
<FieldRef Name="Checkmark" /> | |
<FieldRef Name="LinkTitle" /> | |
<FieldRef Name="DueDate" /> | |
<FieldRef Name="AssignedTo" /> | |
</ViewFields> | |
<RowLimit Paged="TRUE">100</RowLimit> | |
<JSLink>hierarchytaskslist.js</JSLink> | |
</View> | |
<View Name="{108CCF10-5567-4A99-BE57-4C20F989DD45}" MobileView="TRUE" Type="HTML" DisplayName="Late Tasks" Url="/Lists/Workflow Tasks/late.aspx" Level="1" BaseViewID="2" ContentTypeID="0x" ImageUrl="/_layouts/15/images/issuelst.png?rev=44"> | |
<Query> | |
<Where> | |
<And> | |
<Or> | |
<IsNull> | |
<FieldRef Name="PercentComplete" /> | |
</IsNull> | |
<Neq> | |
<FieldRef Name="PercentComplete" /> | |
<Value Type="Number">1</Value> | |
</Neq> | |
</Or> | |
<Lt> | |
<FieldRef Name="DueDate" /> | |
<Value Type="DateTime"> | |
<Today /> | |
</Value> | |
</Lt> | |
</And> | |
</Where> | |
<OrderBy> | |
<FieldRef Name="DueDate" /> | |
<FieldRef Name="Priority" /> | |
</OrderBy> | |
</Query> | |
<ViewFields> | |
<FieldRef Name="Checkmark" /> | |
<FieldRef Name="LinkTitle" /> | |
<FieldRef Name="DueDate" /> | |
<FieldRef Name="AssignedTo" /> | |
</ViewFields> | |
<RowLimit Paged="TRUE">100</RowLimit> | |
<JSLink>hierarchytaskslist.js</JSLink> | |
</View> | |
<View Name="{07E854BE-C716-4CA3-B8D0-A32424B41325}" MobileView="TRUE" Type="HTML" DisplayName="Upcoming" Url="{site}/Lists/Workflow Tasks/Upcoming.aspx" Level="1" BaseViewID="3" ContentTypeID="0x" ImageUrl="/_layouts/15/images/issuelst.png?rev=44"> | |
<Query> | |
<Where> | |
<And> | |
<Or> | |
<IsNull> | |
<FieldRef Name="PercentComplete" /> | |
</IsNull> | |
<Neq> | |
<FieldRef Name="PercentComplete" /> | |
<Value Type="Number">1</Value> | |
</Neq> | |
</Or> | |
<Geq> | |
<FieldRef Name="DueDate" /> | |
<Value Type="DateTime"> | |
<Today /> | |
</Value> | |
</Geq> | |
</And> | |
</Where> | |
</Query> | |
<ViewFields> | |
<FieldRef Name="Checkmark" /> | |
<FieldRef Name="LinkTitle" /> | |
<FieldRef Name="DueDate" /> | |
<FieldRef Name="AssignedTo" /> | |
</ViewFields> | |
<RowLimit Paged="TRUE">100</RowLimit> | |
<JSLink>hierarchytaskslist.js</JSLink> | |
</View> | |
<View Name="{BB355E59-C822-4D5C-ACCC-003D25D0058F}" MobileView="TRUE" Type="HTML" DisplayName="Completed" Url="{site}/Lists/Workflow Tasks/completed.aspx" Level="1" BaseViewID="4" ContentTypeID="0x" ImageUrl="/_layouts/15/images/issuelst.png?rev=44"> | |
<Query> | |
<Where> | |
<Geq> | |
<FieldRef Name="PercentComplete" /> | |
<Value Type="Number">1.0</Value> | |
</Geq> | |
</Where> | |
</Query> | |
<ViewFields> | |
<FieldRef Name="Checkmark" /> | |
<FieldRef Name="LinkTitle" /> | |
<FieldRef Name="DueDate" /> | |
<FieldRef Name="AssignedTo" /> | |
</ViewFields> | |
<RowLimit Paged="TRUE">100</RowLimit> | |
<JSLink>hierarchytaskslist.js</JSLink> | |
</View> | |
<View Name="{7AC793F7-643C-4F5D-B06D-75003BAF68DB}" MobileView="TRUE" Type="HTML" DisplayName="My Tasks" Url="{site}/Lists/Workflow Tasks/MyItems.aspx" Level="1" BaseViewID="5" ContentTypeID="0x" ImageUrl="/_layouts/15/images/issues.png?rev=44"> | |
<Query> | |
<Where> | |
<In> | |
<FieldRef Name="AssignedTo" LookupId="TRUE" /> | |
<Values> | |
<Value Type="Integer"> | |
<UserID /> | |
</Value> | |
</Values> | |
</In> | |
</Where> | |
</Query> | |
<ViewFields> | |
<FieldRef Name="Checkmark" /> | |
<FieldRef Name="LinkTitle" /> | |
<FieldRef Name="DueDate" /> | |
<FieldRef Name="AssignedTo" /> | |
</ViewFields> | |
<RowLimit Paged="TRUE">100</RowLimit> | |
<JSLink>hierarchytaskslist.js</JSLink> | |
</View> | |
<View Name="{A5F90703-6766-44E4-A027-35D0029357F1}" Type="GANTT" DisplayName="Gantt Chart" Url="{site}/Lists/Workflow Tasks/gantt.aspx" Level="1" BaseViewID="8" ContentTypeID="0x" ImageUrl="/_layouts/15/images/issuelst.png?rev=44"> | |
<ViewFields> | |
<FieldRef Name="LinkTitle" /> | |
<FieldRef Name="StartDate" /> | |
<FieldRef Name="DueDate" /> | |
<FieldRef Name="PercentComplete" /> | |
<FieldRef Name="Predecessors" /> | |
<FieldRef Name="AssignedTo" /> | |
<FieldRef Name="GUID" /> | |
</ViewFields> | |
<RowLimit Paged="TRUE">100</RowLimit> | |
<JSLink>clienttemplates.js</JSLink> | |
</View> | |
<View Name="{8BEAA839-83D5-4BFF-93E9-DF248177E30A}" Type="CALENDAR" TabularView="FALSE" DisplayName="Calendar" Url="{site}/Lists/Workflow Tasks/calendar.aspx" Level="1" BaseViewID="9" ContentTypeID="0x" MobileUrl="_layouts/15/mobile/viewdaily.aspx" ImageUrl="/_layouts/15/images/events.png?rev=44"> | |
<Query> | |
<Where> | |
<DateRangesOverlap> | |
<FieldRef Name="StartDate" /> | |
<FieldRef Name="DueDate" /> | |
<Value Type="DateTime"> | |
<Month /> | |
</Value> | |
</DateRangesOverlap> | |
</Where> | |
</Query> | |
<ViewFields> | |
<FieldRef Name="StartDate" /> | |
<FieldRef Name="DueDate" /> | |
<FieldRef Name="Title" /> | |
<FieldRef Name="Description" /> | |
</ViewFields> | |
</View> | |
</pnp:Views> | |
<pnp:FieldRefs> | |
<pnp:FieldRef ID="c3a92d97-2b77-4a25-9698-3ab54874bc6f" Name="Predecessors" DisplayName="Predecessors" /> | |
<pnp:FieldRef ID="a8eb573e-9e11-481a-a8c9-1104a54b2fbd" Name="Priority" DisplayName="Priority" /> | |
<pnp:FieldRef ID="c15b34c3-ce7d-490a-b133-3f4de8801b76" Name="Status" DisplayName="Task Status" /> | |
<pnp:FieldRef ID="d2311440-1ed6-46ea-b46d-daa643dc3886" Name="PercentComplete" DisplayName="% Complete" /> | |
<pnp:FieldRef ID="53101f38-dd2e-458c-b245-0c236cc13d1a" Name="AssignedTo" DisplayName="Assigned To" /> | |
<pnp:FieldRef ID="7662cd2c-f069-4dba-9e35-082cf976e170" Name="Body" DisplayName="Description" /> | |
<pnp:FieldRef ID="64cd368d-2f95-4bfc-a1f9-8d4324ecb007" Name="StartDate" DisplayName="Start Date" /> | |
<pnp:FieldRef ID="cd21b4c2-6841-4f9e-a23a-738a65f99889" Name="DueDate" DisplayName="Due Date" /> | |
<pnp:FieldRef ID="d2a04afc-9a05-48c8-a7fa-fa98f9496141" Name="RelatedItems" DisplayName="Related Items" /> | |
<pnp:FieldRef ID="55b29417-1042-47f0-9dff-ce8156667f96" Name="TaskOutcome" DisplayName="Task Outcome" /> | |
</pnp:FieldRefs> | |
<pnp:FieldDefaults> | |
<pnp:FieldDefault FieldName="PercentComplete">0</pnp:FieldDefault> | |
<pnp:FieldDefault FieldName="StartDate" /> | |
</pnp:FieldDefaults> | |
</pnp:ListInstance> | |
<pnp:ListInstance Title="Workflow Demo List" Description="" DocumentTemplate="" TemplateType="100" Url="Lists/Workflow Demo List" MinorVersionLimit="0" MaxVersionLimit="0" DraftVersionVisibility="0" TemplateFeatureID="00bfea71-de22-43b2-a848-c05709900100" EnableFolderCreation="false"> | |
<pnp:ContentTypeBindings> | |
<pnp:ContentTypeBinding ContentTypeID="0x01" Default="true" /> | |
<pnp:ContentTypeBinding ContentTypeID="0x0120" /> | |
</pnp:ContentTypeBindings> | |
<pnp:Views> | |
<View Name="{0DCFD168-F918-4008-B88C-DFA268257FB2}" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" Type="HTML" DisplayName="All Items" Url="/sites/PNPExamples/Lists/Workflow Demo List/AllItems.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/15/images/generic.png?rev=44"> | |
<Query> | |
<OrderBy> | |
<FieldRef Name="ID" /> | |
</OrderBy> | |
</Query> | |
<ViewFields> | |
<FieldRef Name="LinkTitle" /> | |
<FieldRef Name="Add_x0020_to_x0020_History" /> | |
</ViewFields> | |
<RowLimit Paged="TRUE">30</RowLimit> | |
<JSLink>clienttemplates.js</JSLink> | |
</View> | |
</pnp:Views> | |
<pnp:Fields> | |
<Field DisplayName="Add to History" Type="URL" Required="FALSE" ID="{b55a516f-e212-4397-9038-7593b0f0202d}" SourceID="{{listid:Workflow Demo List}}" StaticName="Add_x0020_to_x0020_History" Name="Add_x0020_to_x0020_History" ColName="nvarchar4" RowOrdinal="0" ColName2="nvarchar5" RowOrdinal2="0" ShowInDisplayForm="FALSE" ShowInEditForm="FALSE" ShowInNewForm="FALSE" Version="1" /> | |
</pnp:Fields> | |
<pnp:FieldRefs> | |
<pnp:FieldRef ID="3a6b296c-3f50-445c-a13f-9c679ea9dda3" Name="ComplianceAssetId" DisplayName="Compliance Asset Id" /> | |
<pnp:FieldRef ID="ccc1037f-f65e-434a-868e-8c98af31fe29" Name="_ComplianceFlags" DisplayName="Label setting" /> | |
<pnp:FieldRef ID="d4b6480a-4bed-4094-9a52-30181ea38f1d" Name="_ComplianceTag" DisplayName="Labels" /> | |
<pnp:FieldRef ID="92be610e-ddbb-49f4-b3b1-5c2bc768df8f" Name="_ComplianceTagWrittenTime" DisplayName="Label Applied" /> | |
<pnp:FieldRef ID="418d7676-2d6f-42cf-a16a-e43d2971252a" Name="_ComplianceTagUserId" DisplayName="Label applied by" /> | |
<pnp:FieldRef ID="8382d247-72a9-44b1-9794-7b177edc89f3" Name="_IsRecord" DisplayName="Item is a Record" /> | |
</pnp:FieldRefs> | |
</pnp:ListInstance> | |
</pnp:Lists> | |
<pnp:Workflows> | |
<pnp:WorkflowDefinitions> | |
<pnp:WorkflowDefinition Id="596f76e1-9c8f-4d9b-b9b4-fd2d03653450" | |
Description="" | |
DisplayName="Add to History" | |
InitiationUrl="" | |
Published="true" | |
RequiresAssociationForm="false" | |
RequiresInitiationForm="false" | |
RestrictToScope="{listid:Workflow Demo List}" | |
RestrictToType="List" | |
XamlPath="workflow.xaml"> | |
<pnp:FormField> | |
<Fields /> | |
</pnp:FormField> | |
</pnp:WorkflowDefinition> | |
</pnp:WorkflowDefinitions> | |
<pnp:WorkflowSubscriptions> | |
<pnp:WorkflowSubscription DefinitionId="596f76e1-9c8f-4d9b-b9b4-fd2d03653450" | |
ListId="{listid:Workflow Demo List}" | |
Enabled="true" | |
EventSourceId="{listid:Workflow Demo List}" | |
WorkflowStartEvent="true" | |
ItemAddedEvent="true" | |
ItemUpdatedEvent="false" | |
ManualStartBypassesActivationLimit="false" | |
Name="Add to History" | |
ParentContentTypeId="" | |
StatusFieldName="Add_x0020_to_x0020_History"> | |
<pnp:PropertyDefinitions> | |
<pnp:PropertyDefinition Key="StatusColumnCreated" Value="1" /> | |
<pnp:PropertyDefinition Key="WSPublishState" Value="3" /> | |
<pnp:PropertyDefinition Key="StatusFieldName" Value="Add_x0020_to_x0020_History" /> | |
<pnp:PropertyDefinition Key="HistoryListId" Value="{listid:Workflow History}" /> | |
<pnp:PropertyDefinition Key="TaskListId" Value="{listid:Workflow Tasks}" /> | |
<pnp:PropertyDefinition Key="SharePointWorkflowContext.Subscription.Name" Value="WorkflowAssociation_WorkflowPNP" /> | |
</pnp:PropertyDefinitions> | |
</pnp:WorkflowSubscription> | |
</pnp:WorkflowSubscriptions> | |
</pnp:Workflows> | |
</pnp:ProvisioningTemplate> | |
</pnp:Templates> | |
</pnp:Provisioning> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment