aaron.labiosa@nintex.com

Support Console Troubleshooting

Blog Post created by aaron.labiosa@nintex.com Champion on Mar 3, 2015

Products: Nintex Workflow 2013, Nintex Workflow 2010

 

Sometimes it can be helpful to replicate the page load behavior of the Nintex Workflow Support Console for troubleshooting purposes. This PowerShell script emulates the SQL Database queries that can potentially cause the page to timeout on loading.

 

Here is an example error message thrown when loading the Support Console page:

 

"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."

 

2015-03-03 13_29_16-Clipboard.png

 

Running this PowerShell script should produce meaningful exceptions if there is an issue with loading the Nintex Workflow Support Console (assuming it is a SQL Client timeout issue).

 

PowerShell Script
  1. Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
  2. [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
  3. [void][System.Reflection.Assembly]::LoadWithPartialName("Nintex.Workflow")
  4. [void][System.Reflection.Assembly]::LoadWithPartialName("Nintex.Workflow.Administration")
  5. function Get-AllNWDatabases(){
  6. $cmd = New-Object -TypeName System.Data.SqlClient.SqlCommand
  7. $cmd.CommandType = [System.Data.CommandType]::StoredProcedure
  8. $cmd.CommandText = 'GetAllDatabases'
  9. $reader = [Nintex.Workflow.Administration.ConfigurationDatabase]::GetConfigurationDatabase().ExecuteReader($cmd)
  10. $data = @()
  11. while($reader.Read())
  12. {
  13.     $row = New-Object System.Object
  14.     $row | Add-Member -MemberType NoteProperty -Name "DatabaseId" -Value $reader['DatabaseId']
  15.     $row | Add-Member -MemberType NoteProperty -Name "DatabaseName" -Value $reader['DatabaseName']
  16.     $row | Add-Member -MemberType NoteProperty -Name "ErrorsCount" -Value $reader['ErrorsCount']
  17. $data += $row
  18. }
  19. $data
  20. }
  21. function Get-WorkflowErrors($DatabaseName){
  22. $cmd = New-Object -TypeName System.Data.SqlClient.SqlCommand
  23. $cmd.CommandType = [System.Data.CommandType]::StoredProcedure
  24. $cmd.CommandText = 'GetWorkflowErrors'
  25. $cmd.Parameters.Add('@DatabaseName', [System.Data.SqlDbType]::NVarChar).Value = $DatabaseName
  26. $cmd.Parameters.Add('@PageNumber', [System.Data.SqlDbType]::Int).Value = 1
  27. $cmd.Parameters.Add('@PageSize', [System.Data.SqlDbType]::Int).Value = 10
  28. $cmd.Parameters.Add('@TotalErrors', [System.Data.SqlDbType]::Int).Value = 0
  29. $reader = [Nintex.Workflow.Administration.ConfigurationDatabase]::GetConfigurationDatabase().ExecuteReader($cmd)
  30. $count = @()
  31. while($reader.Read())
  32. {
  33.         $count += $reader[0]
  34. }
  35. $count.Count
  36. }
  37. function Run-SupportConsoleDiag(){
  38. $data = @()
  39. foreach ($dbref in Get-AllNWDatabases){
  40. $row = New-Object System.Object
  41. $row | Add-Member -MemberType NoteProperty -Name "DatabaseName" -Value $dbref.DatabaseName
  42. $row | Add-Member -MemberType NoteProperty -Name "WorkflowErrorCount" -Value $(Get-WorkflowErrors -DatabaseName $dbref.DatabaseName)
  43. $data += $row
  44. }
  45. $data
  46. }
  47. Run-SupportConsoleDiag

 

 

More Information on this topic can be found here: The specified item was not found.

Outcomes