Unable to publish workflow due to file being checked out

  • 26 March 2021
  • 0 replies
  • 29 views

Badge +6


Issue







When attempting to publish a Nintex Workflow, the publish fails due to files being checked out.



 





 







Error Code







soap:ServerServer was unable to process request. ---> The file "http://nsp-ns-sp19-1.nintexsupport.com/Workflows/Account 8570 Expiration Notification/Account 8570 Expiration Notification.xoml" is checked out for editing by i:0#.w|ntxsupportspfarm.







Resolution







1. Add the relevant SharePoint site URL to line 2 of the script below



asnp *sh*

$web = Get-SPWeb http://[SPSiteURL]

$wflib = $web.Lists | ? {$_.Title -eq "Workflows"}

$wf = $wflib.Items | Where-Object { $_.File.CheckOutStatus -ne "None"}



if ($wf.Length -gt 0) {

Write-Host "Checking in the following files:"

foreach ($doc in $wf){

$doc.Name

$doc.File.CheckIn("")

}

}

else {

Write-Host "No files are checked out."}


 



2. Execute the script on a SharePoint server.



 



Note: The script above specifically applies to /Workflows. If the issue is occurring in /NintexWorkflows, change line 3 in the script to:



 



$wflib = $web.Lists | ? {$_.Title -eq "NintexWorkflows"}



 







Additional Information







The file that is checked out is located in http://[SharePointSiteURL]/Workflows. This library is not accessible via a browser and can only be viewed  in SharePoint Designer. The script above checks the CheckOutStatus of all files in the Workflows library; if any of the files are checked out, the script checks in each file again to allow the Nintex Workflow to be published again.



 



Please note that /Workflows is a default SharePoint library, not to be confused with /NintexWorkflows. If this issue is occurring with




0 replies

Be the first to reply!

Reply