Pages

Showing posts with label Nintex Workflow 2013. Show all posts
Showing posts with label Nintex Workflow 2013. Show all posts

Tuesday, April 13, 2021

Unlock SharePoint NIntex Workflow Tasks With PowerShell

 

We had struggled with this task locking problem for a few months, once approver's completed task.  It seemed that the problem started after making updates from Microsoft and Nintex.  

It will display in the following message to edit workflow tasks

"This task is currently locked by a running workflow and cannot be edited."

After few hours research, I found out ways to unlock SharePoint Nintex workflow tasks using PowerShell script.


Solution:





[system.reflection.assembly]::LoadWithPartialName("Microsoft.SharePoint")

$siteUrl="http://TestSIte/"

$site=new-object Microsoft.SharePoint.SPSite($siteUrl)

$web=$site.OpenWeb()

$web.url

$i=0

write-host $web.lists

foreach($list in $web.lists){

    foreach($item in $list.items | where {$_[[Microsoft.SharePoint.SPBuiltInFieldId]::WorkFlowVersion] -ne 1}){

 

            if($item["Status"] -eq "Not Started")

            {

                  Try

                  {

                        Write-Host Unlocking workflow on $item.name

                        $item[[Microsoft.SharePoint.SPBuiltInFieldId]::WorkFlowVersion]=1;

                        $item.SystemUpdate()

                        $i++

                  }

                  Catch [System.Exception]

                  {

                        Write-Host Caught error trying to unlock workflow -ForegroundColor Red

                  }

            }

      }

}

Write-Host Unlocked $i workflows within $web.url

$web.dispose()

$site.dispose()

Wednesday, March 7, 2018

Scheduled workflows and the Nintex Site Workflow Scheduler timer job

If Nintex Site workflow is not running or trigger by automatically, you need to follow in the below steps:

The Nintex Workflow Scheduler job should only have one instance listed in the Timer Job Definitions page.  To check, please go to Central AdministrationMonitoring Timer Jobs Review job definitions.  Scroll through until you locate Nintex Workflow Scheduler.  There should be only one instance there.  If there are more, all but one will need to be deleted, ensuring the one that is left is on a web application on a server running the “Microsoft SharePoint Foundation Web Application” service.


To change this, the NWAdmin.exe 
InstallTimerJob and UninstallTimerJob operations can be used to bind the timer job to a Web application running the Microsoft SharePoint Foundation Web Application service.  Doing this will ensure SharePoint executes scheduled workflows on a web front end servers, so any content web application running the web application service will do (only one per farm).

The nwadmin.exe command line tool is used.  Full information here NWAdmin Operations - Nintex Workflow 2010

Please type (do not copy and paste) these commands:
1.      NWAdmin.exe -o UninstallTimerJob -job ScheduledWorkflows
    (Use above line if it is currently installed on Central Admin Web App, if not specify what Web App to remove it from using -url switch)

Then:

2.      NWAdmin.exe -o InstallTimerJob -job ScheduledWorkflows -url http://yourwebappurl/

Naturally, you will need to replace http://yourwebappurl/ with the real URL of the relevant web application you choose to install it on.

NOTE: Only scheduled workflows use the Nintex Workflow Scheduler service.  Any regular workflow is run at first by the "w3wp.exe" service and once having been "put to sleep", then after by "owstimer.exe", the SharePoint Timer service.  Moving the Nintex Workflow Scheduler will not interfere with regular workflows at all.  

Install, Uninstall and reinstall can be done during business hours, there is no resets, down-time or any impact to workflows.  The timer job will pickup where it left off after reinstall and run any schedules that were missed during reinstall. 

Screens:




How do I delete columns that workflows create in a sharepoint list

Here is what you should do:
1. Get SharePoint Manager from Codeplex, if you've not already. It's a freeware with very useful feature for people like us. you can download it.
2. Run SharePoint Manager as Administrator 
3. Under the site -> List -> Fields, change the property of Workflow field Allow Deletion True
4. Open the site in SPD, Edit List coulmns, Show Read Only columns & finally delete.
Sharepoint Manager Screen:


Sharepoint Designer

Friday, March 10, 2017

Nintex - the-form-has-controls-that-have-incomplete-property-settings

Delete all existing layout in that task form and publish and export and import workflow to other sites

Wednesday, February 15, 2017

The worklfow name is used elsewhere on this site. Please choose another name in Nintex Workflow



Scenario 1:
I have created a workflow with name “Copy Workflow”.Even after deleted the workflow and started creating new workflow with same name “Copy Workflow” below error is displaying.
Scenario 2:
I have list with workflow name is "test1" then i deleted list and recreated list then trying to import nintex workflow with same name "test1" then the below error is displaying

The worklfow name is used elsewhere on this site. Please choose another name in Nintex Workflow
Solution:
There is a hidden list that contains the workflow definition files. You may need to remove the specificfolder (with the workflow name) to remove the workflow completely. If your site ishttp://test01/sites/test/ the url would be http://test01/sites/test/NintexWorkflows/.

Sunday, December 18, 2016

Nintex Approve Button Hide via Jquery

The following code will Hide Nintex Approve Button  via Jquery


Wednesday, November 9, 2016

Incoming Email Sharepoint List workflow is not starting in the new item is created

1- First of all, we have check in SharePoint server setting if workflow trigger on email is enabled or not, and enable it.
Using STSADM 
Open the SharePoint 2010 Management Shell as administrator and run following command:

stsadm -o getproperty -pn declarativeworkflowautostartonemailenabled

Output should be:

PS 

If Value of property is “No” you have to enable it by typing following command:

stsadm -o setproperty -pn declarativeworkflowautostartonemailenabled -pv true.

Using PowerShell
st


This property was somewhat easier to set using STSADM, however keep in mind that STSADM is being retired. PowerShell is the command line administration tool to use moving forward.

Open the SharePoint 2010 Management Shell as administrator and run the following to determine the value of the DeclarativeWorkflowAutoStartOnEmailEnabled property:

$spWebService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$spWebService.DeclarativeWorkflowAutoStartOnEmailEnabled

If the Value of the property is "False" you have to enable it by typing the following commands:


Execute in the powershell script to set true in the DeclarativeWorkflowAutoStartOnEmailEnabled.
By default DeclarativeWorkflowAutoStartOnEmailEnabled property is false.


$spWebService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$spWebService.DeclarativeWorkflowAutoStartOnEmailEnabled = $true
$spWebService.Update()