cancel
Showing results for 
Search instead for 
Did you mean: 
rcuscaden
Nintex Newbie

Republish site workflow through Powershell

Jump to solution

So I have been testing the great script written by Vadim Tabakman (below) to republish workflows; but I am having issues with the Site Workflows.  I am using this on a SharePoint 2013 farm.

http://vadimtabakman.com/nintex-workflow-powershell-find-all-workflows-and-export-or-republish-part-...

All of the list workflows republish just fine but any site workflows do not get republished at all.  It seems that the web service is being called with the $list value of "Site Workflow" for these site workflows.  Has anyone run across this before or have any ideas?

The code that should be doing the work is:

$publishresult = $page.PublishFromNWFXml($exportedworkflow,$list,$workflowname,$True);

But I think that the $list value of "Site Workflow" is not found, so nothing happens.  Other than this, the script works great and is very helpful.  Thanks Vadim!

Any thoughts are appreciated.

Thank you for your time

Rob C

0 Kudos
Reply
3 Replies
rcuscaden
Nintex Newbie

Re: Republish site workflow through Powershell

Jump to solution

So I might have found the solution for my issue.  I basically set the $list value to and empty string.

            switch($operation)

            {

              "RepublishAll"

              {

                # republish this workflow

                try

                {

                  if($list -eq "Site Workflow")

                  {

                    $list = "";

                  }

                  $publishresult = $page.PublishFromNWFXml($exportedworkflow,$list,$workflowname,$True);

                }

.......

In testing, the site workflows are now republishing.  Hopefully this helps others if they find themselves in the same boat.

View solution in original post

Reply
Not applicable

Re: Republish site workflow through Powershell

Jump to solution

Feel free to mark your own answer correct, Robert Cuscaden​, thanks!

0 Kudos
Reply
akrasheninnikov
Nintex Newbie

Re: Republish site workflow through Powershell

Jump to solution

Correct. [Guid]::Empty should work as well.

0 Kudos
Reply