PnP-PowerShell
PnP-PowerShell copied to clipboard
Add-PnpWorkflowSubscription seemingly not complete
###Notice: many issues / bugs reported are actually related to the PnP Core Library which is used behind the scenes. Consider carefully where to report an issue:###
- Are you using
Apply-SPOProvisioningTemplateorGet-SPOProvisioningTemplate? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/officedev/PnP-Sites-Core/issues. - Is the issue related to the cmdlet itself, its parameters, the syntax, or do you suspect it is the code of the cmdlet that is causing the issue? Then please continue reporting the issue in this repo.
- If you think that the functionality might be related to the underlying libraries that the cmdlet is calling (We realize that that might be difficult to determine), please first double check the code of the cmdlet, which can be found here: https://github.com/OfficeDev/PnP-PowerShell/tree/master/Commands. If related to the cmdlet, continue reporting the issue here, otherwise report the issue at https://github.com/officedev/PnP-Sites-Core/issues
Reporting an Issue or Missing Feature
When adding a workflow subscription to a list, it appears under the list and runs but I am experiencing some problems and in SharePoint Designer there are certain options greyed out or unavailable. Most importantly, the "Associated List" is blank and any interaction between the workflow and the list errors out.
Expected behavior
Using Get-PnpWorkflowDefinition, Add-PnpWorkflowDefinition and Add-PnpWorkflowSubscription...I expect to be able to duplicate a workflow from one site to another.
Actual behavior
Missing aspects of the workflow.
Steps to reproduce behavior
### Campaign Workflow Script **EDITED FOR CLEANLINESS**
Connect-PNPOnline -Url $templateSite -Credential $creds
$oldWorkflow = Get-PnPWorkflowDefinition -Name $workflowName
Connect-PNPOnline -Url $newSite -Credential $creds
Add-PnpWorkflowDefinition -Definition $oldWorkflow
Add-PnpWorkflowSubscription -Name "Workflow Name" -Definition $workflowName -StartOnCreated -List $list -HistoryListName "History" -TaskListName "Tasks"
Which version of the PnP-PowerShell Cmdlets are you using?
- [ ] PnP PowerShell for SharePoint 2013
- [ ] PnP PowerShell for SharePoint 2016
- [x] PnP PowerShell for SharePoint Online
What is the version of the Cmdlet module you are running?
2.19.17.
How did you install the PnP-PowerShell Cmdlets?
- [ ] MSI Installed downloaded from GitHub
- [x] Installed through the PowerShell Gallery with Install-Module
- [ ] Other means