[X] Bug
[ ] Enhancement
[X] Office 365 / SharePoint Online
[ ] SharePoint 2016
[ ] SharePoint 2013
Using the latest PNP version - 3.2.1810.0
A previous PNP template that contained a complex workflow fails when applying the workflow. We used to use version 2.23.1802.0 and had no problem with the Workflow being applied to the list.
Trying to keep everything up to date, I have recently upgraded to version 3.2.1810.0, Trouble is using this version it appears that it falls over trying to apply our workflow. Nothing has changed, same templates, same workflow file. We get the error message: -
Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following errors:
Character '0' was unexpected in string '0'. Invalid XAML type name.
HTTP headers received from the server - ActivityId: f4e4909a-689e-432f-bb7b-5a89a38d3e2f. NodeId: . Scope: . Client ActivityId : cd659d9e-60c3-7000-fe7d-5aa13e9bec60. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult
If I revert back to version 2.23.1802.0 and try again, the template works.
Those GUID's didn't help me, I've searched to see what they are and nothing came up.
I stripped my workflow down and it seems that if my workflow contains sending an email (Inside a task, or just sending an email) it errors. Remove that step the template applies the workflow. I have included my provisioning template and workflow file. The provisioning template just creates a custom list called custom, and applies the workflow to activate when a new item is added. The workflow just sends an email to the user who created the item.
I created the list manually, I used SPD to create the workflow and tested the workflow. I then exported the template.
On a different site I applied the template. It falls over when applying the workflow. If I revert to version 2.23.1802.0 it creates no problem.
I have tried to just use PowerShell, and tried using C# project, both give me the same result.
Hopefully this is a PNP issue and can be fixed quickly, as there are features in 3.2.1810.0 that we want to use.
hi @PaoloPia as you were able to help solve a workflow problem before for me with PNP Provisioning, is this something you could look at please?
Same issue here
@pmatthews05 any solution for this?
Thanks
Apply-PnPProvisioningTemplate -Path .\GDPR-Activity-Hub-Workflows.xml -Handlers Workflows
Apply-PnPProvisioningTemplate : Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation
due to the following errors:
Character '0' was unexpected in string '0'. Invalid XAML type name.
HTTP headers received from the server - ActivityId: 61d4e121-490f-48bd-b763-ab3cf8bf0884. NodeId: . Scope: . Client
ActivityId : 51bc9f9e-80ae-7000-3362-e2975d49c41f. ---> System.Net.WebException: The remote server returned an error:
(400) Bad Request.
at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult
At line:1 char:1
@JoelFerreira1984 I don't know what the fix is, however it does seem to be related to any emails being sent. So if you have an email or a task that sends an email, if you removed that out of your workflow, and then get another template, it works for me.
This isn't a solution, this is just how I established the cause.
The only solution I have at the moment is to continue using version 2.23.1802.0 until this has been fixed by a pnp person.
@pmatthews05 thanks for the quick answer!
Unfortunately i dont have any option, i am trying to implement the GDPR Activity Hub and nobody is replying on that forum 馃憥
https://github.com/SharePoint/sp-dev-gdpr-activity-hub/issues/69
As i am new in the comunity, maybe you can mention someone involved on this project?
Many thanks
Hi @erwinvanhunen is this something you could look into?
Ok guys, it took me some time to find an issue, but I got it and created PR. Hopefully it will be processed for next release.
Awesome work @phawrylak. Thank you. Look forward to getting the next release.
This will apply to GDPR Hub activtiy also?
Thanks
@JoelFerreira1984, yes, it will.
Although this thread states it was fixed before now, I can confirm this is working with the latest version 3.6.1902. I finally got round to upgrading.