pnp / PnP-Sites-Core

Microsoft 365 Dev PnP Core component (.NET) targeted for increasing developer productivity with CSOM based solutions.
Other
415 stars 642 forks source link

Nintex workflow with Custom action causes the Apply-PnPProvisioningTemplate to fail #862

Open Pieter-Veenstra opened 7 years ago

Pieter-Veenstra commented 7 years ago

Category

[X] Bug [ ] Enhancement

Environment

[ ] Office 365 / SharePoint Online [ ] SharePoint 2016 [X] SharePoint 2013

If SharePoint on-premises, what's exact CU version: 15.0.4787.1000

Expected or Desired Behavior

Nintex workflows not being exportable/importable is fine. They can be manually exported if needed. However the apply template should not fail.

Observed Behavior

The template xml contains the following Custom Action.

< pnp:UserCustomActions> < pnp:CustomAction Name="{19856c9b-a317-4f0c-830b-fce53976159f}" Location="EditControlBlock"

Title="Legally Binding Agreements" Sequence="0" Rights=""

Url="~site/_layouts/15/NintexWorkflow/StartWorkflow.aspx?List={ListId}&ID={ItemId}&TemplateID=44197f89-

e700-4037-b99c-465e69c5ddd3&Source={Source}"

ImageUrl="~site/_layouts/15/NintexWorkflow/Images/StartWorkflowECB.png" RegistrationType="None"> < pnp:CommandUIExtension /> < /pnp:CustomAction> < /pnp:UserCustomActions>

I'm getting the following error:

powershell_ise.exe Information: 0 : 2016-11-28 14:01:42.6076 [List instances] [13] [Debug] Updating list Documents 1405ms 8e813182-42ab-49a0-9 44f-cffce3abb107 powershell_ise.exe Information: 0 : 2016-11-28 14:01:43.0893 [List instances] [13] [Debug] Updating list Documents failed: Unknown Error :
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream) at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse() at Microsoft.SharePoint.Client.ClientContextExtensions.ExecuteQueryImplementation(ClientRuntimeContext clientContext, Int32 retryCount, Int 32 delay) at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ObjectListInstance.UpdateList(Web web, List existingList, ListInstance templateL ist, TokenParser parser, PnPMonitoredScope scope, Boolean isNoScriptSite) at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ObjectListInstance.ProvisionObjects(Web web, ProvisioningTemplate template, Toke nParser parser, ProvisioningTemplateApplyingInformation applyingInformation) 1886ms 8e813182-42ab-49a0-944f-cffce3abb107 powershell_ise.exe Information: 0 : 2016-11-28 14:01:43.0922 [List instances] [13] [Debug] Code execution scope ended 1889ms 8e813182-42ab-49a 0-944f-cffce3abb107 powershell_ise.exe Information: 0 : 2016-11-28 14:01:43.0942 [Provisioning] [13] [Debug] Code execution scope ended 4208ms 8e813182-42ab-49a0- 944f-cffce3abb107 Apply-PnPProvisioningTemplate : Unknown Error At C:\Source\Deploy.ps1:9 char:1

  • Apply-PnPProvisioningTemplate -Web $deployToUrl -Path c:\Source\Devel ...
  • 
    + CategoryInfo          : WriteError: (:) [Apply-PnPProvisioningTemplate], ServerException
    + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Provisioning.ApplyProvisioningTemplate

Steps to Reproduce

Create a workflow which can be started from the item menu. Then get and apply the template using PnP PowerShell.

jansenbe commented 7 years ago

Are you by any chance updating existing custom actions?...in 2013 this is not working

cheindel commented 7 years ago

I can reproduce the error.

This is a custom action that is created when you publish the Nintex Workflow and the workflow is configured to show up in the context menu.

If you remove the node the template will be applied and the context menu entry can be created by publishing the workflow.

This also happens on new sites where the workflow has never been uploaded or published and the custom action does not exist yet.

jansenbe commented 7 years ago

Thanks for the feedback @cheindel , we'll need to further investigate this one.

jansenbe commented 7 years ago

Internal testing repro-ed this, marking as bug.