Workflow Manager Issues


A few days back, caught something on Workflow manager configuration issue. Workflow Manager has no interlocking with SharePoint and it is entirely independent entity. The script is pretty straight forward. However, after execution the script, following error was generated and seems like Workflow Manager was not able to get installed on VM.
New-SBFarm : The term 'New-SBFarm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try
again.
At line:38 char:9
+ New-SBFarm -SBFarmDBConnectionString $managementCS -InternalPortRangeSta ...
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-SBFarm:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
New-WFFarm : An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change
the alias to a valid name.
An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a
valid name.
An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a
valid name.
At line:53 char:9
+ New-WFFarm -WFFarmDBConnectionString $wfManagementCS -RunAsAccount $spSe ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Data Source=php...e;Encrypt=False:String) [New-WFFarm], SqlException
+ FullyQualifiedErrorId : FailedToDeploySchemaToDatabase,Microsoft.Workflow.Deployment.Commands.NewWFFarm
- Adding Service Bus host...Already Exists
- Creating Workflow Default Namespace...New-SBNamespace : The term 'New-SBNamespace' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was i
ncluded, verify that the path is
correct and try again.
At line:78 char:13
+ New-SBNamespace -Name $sbNamespace -AddressingScheme 'Path' -ManageU ...
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-SBNamespace:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Get-SBClientConfiguration : The term 'Get-SBClientConfiguration' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At line:87 char:30
+ $SBClientConfiguration = Get-SBClientConfiguration -Namespaces $sbNamespace;
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-SBClientConfiguration:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
- Adding Workflow Host...Done

Even for the small correction, which was fixed and rerun the script not helped here. Following the script who are interested on using PowerShell.
function WFM-Configure {
#webpicmd /offline /Products:WorkflowManagerRefresh /Path:c:WorkflowManagerFiles
#WebpiCmd.exe /Install /Products:WorkflowManagerRefresh /XML:c:/WorkflowManagerFiles/feeds/latest/webproductlist.xml
cd "F:\DeveloperTools\bin\"
start-process wpilauncher.exe
cd "C:\Program Files\Microsoft\Web Platform Installer\"
WebpiCmd-x64.exe '/Install' '/Products:RequestFiltering,ServiceBus_1_1,ServiceBus_1_1_CU1,URLRewrite2,WDeploy,WorkflowManagerRefresh' '/SuppressPostFinish' '/SuppressReboot' '/AcceptEula'
cd "C:\Program Files\Microsoft\Web Platform Installer\"
start-process WebPlatformInstaller.exe '/passive' | Stop-Process
#cd "F:\DeveloperTools\bin\"
#WebpiCmd.exe /Install /Products:WorkflowManagerRefresh /XML:c:/WorkflowManagerFiles/feeds/latest/webproductlist.xml
WebpiCmd.exe /Install /Products:WorkflowManagerRefresh
#common variables Region starts
$dbServer = "phpdxspsql01"
$dbPrefix = "SP02Test3"
$spServiceAcctName = "AppWFM\svc_sp_sb_Install"
$spServiceAcctPWD = "w0k&R0ll"
$spAdminAcct = " AppWFM \svc_sp_sb_farm"
$passphrase = "Svc-sp-sb-Passphrase"
#common variables Region ends
#addingPS Snapin
if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null)
{
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}
set-executionpolicy -executionpolicy unrestricted
# Create new SB Farm
$SBCertificateAutoGenerationKey = ConvertTo-SecureString -AsPlainText -Force -String $passphrase;
$WFCertAutoGenerationKey = ConvertTo-SecureString -AsPlainText -Force -String $passphrase;
$managementCS = 'Data Source=' + $dbServer + ';Initial Catalog=' + $dbPrefix + '_WFMSB_Management;Integrated Security=True;Encrypt=False';
$gatewayCS = 'Data Source=' + $dbServer + ';Initial Catalog=' + $dbPrefix + '_WFMSB_Gateway;Integrated Security=True;Encrypt=False';
$messageContCS = 'Data Source=' + $dbServer + ';Initial Catalog=' + $dbPrefix + '_WFMSB_MessageContainer;Integrated Security=True;Encrypt=False';
Write-Host -ForegroundColor White ' - Creating new Service Bus farm...' -NoNewline;
try {
$sbFarm = Get-SBFarm -SBFarmDBConnectionString $managementCS;
Write-Host -ForegroundColor White 'Already Exists';
}
catch {
New-SBFarm -SBFarmDBConnectionString $managementCS -InternalPortRangeStart 9000 -TcpPort 9354 -MessageBrokerPort 9356 -RunAsAccount $spServiceAcctName `
-AdminGroup 'BUILTINAdministrators' -GatewayDBConnectionString $gatewayCS -CertificateAutoGenerationKey $SBCertificateAutoGenerationKey `
-MessageContainerDBConnectionString $messageContCS;
Write-Host -ForegroundColor White 'Done';
}
# Create new WF Farm
#Write-Host -ForegroundColor white " - Creating new Workflow Farm..." -NoNewline;
$wfManagementCS = 'Data Source=' + $dbServer + ';Initial Catalog=' + $dbPrefix + '_WFM_Management;Integrated Security=True;Encrypt=False';
$wfInstanceCS = 'Data Source=' + $dbServer + ';Initial Catalog=' + $dbPrefix + '_WFM_InstanceManagement;Integrated Security=True;Encrypt=False';
$wfResourceCS = 'Data Source=' + $dbServer + ';Initial Catalog=' + $dbPrefix + '_WFM_ResourceManagement;Integrated Security=True;Encrypt=False';
try {
$wfFarm = Get-WFFarm -WFFarmDBConnectionString $wfManagementCS;
Write-Host -ForegroundColor White 'Already Exists';
}
catch {
New-WFFarm -WFFarmDBConnectionString $wfManagementCS -RunAsAccount $spServiceAcctName -AdminGroup 'BUILTINAdministrators' -HttpsPort 12290 -HttpPort 12291 `
-InstanceDBConnectionString $wfInstanceCS -ResourceDBConnectionString $wfResourceCS -CertificateAutoGenerationKey $WFCertAutoGenerationKey;
Write-Host -ForegroundColor white 'Done';
}
# Add SB Host
Write-Host -ForegroundColor white ' - Adding Service Bus host...' -NoNewline;
try {
$SBRunAsPassword = ConvertTo-SecureString -AsPlainText -Force -String $spServiceAcctPwd;
Add-SBHost -SBFarmDBConnectionString $managementCS -RunAsPassword $SBRunAsPassword -EnableHttpPort `
-EnableFirewallRules $true -CertificateAutoGenerationKey $SBCertificateAutoGenerationKey;
Write-Host -ForegroundColor white 'Done';
}
catch {
Write-Host -ForegroundColor white 'Already Exists';
}
Write-Host -ForegroundColor white ' - Creating Workflow Default Namespace...' -NoNewline;
$sbNamespace = $dbPrefix + '-WorkflowNamespace';
try {
$defaultNS = Get-SBNamespace -Name $sbNamespace -ErrorAction SilentlyContinue;
Write-Host -ForegroundColor white 'Already Exists';
}
catch {
try {
# Create new SB Namespace
$currentUser = $env:userdomain + '' + $env:username;
New-SBNamespace -Name $sbNamespace -AddressingScheme 'Path' -ManageUsers $spServiceAcctName,$spAdminAcctName,$currentUser;
Start-Sleep -s 90
Write-Host -ForegroundColor white 'Done';
}
catch [system.InvalidOperationException] {
throw;
}
}
# Get SB Client Configuration
$SBClientConfiguration = Get-SBClientConfiguration -Namespaces $sbNamespace;
# Add WF Host
try {
$WFRunAsPassword = ConvertTo-SecureString -AsPlainText -Force -String $spServiceAcctPwd;
Write-Host -ForegroundColor White ' - Adding Workflow Host...' -NoNewline;
Add-WFHost -WFFarmDBConnectionString $wfManagementCS `
-RunAsPassword $WFRunAsPassword -EnableFirewallRules $true `
-SBClientConfiguration $SBClientConfiguration -CertificateAutoGenerationKey $WFCertAutoGenerationKey;
Write-Host -ForegroundColor White 'Done';
}
catch {
#Write-Host -ForegroundColor white "Already Exists";
Write-Host -ForegroundColor white 'Done';
}
#$siteUri = ""
#$credential = [System.Net.CredentialCache]::DefaultNetworkCredentials
#$site = Get-SPSite $siteUri
#$proxy = Get-SPWorkflowServiceApplicationProxy
#$svcAddress = $proxy.GetWorkflowServiceAddress($site)
#Copy-SPActivitiesToWorkflowService -WorkflowServiceAddress $svcAddress -Credential $credential -Force $true
}


The resolution was really greyed to me. I agreed as this was my first experience to play with Workflow Manager and I’m not sure the actual root cause. Anyway, after removing everything and trying on another VM by installing the Web Platform Installer  first. Next, download the files using it and simply install and configure Workflow Manager. Looks like it went successfully. Sharing this info, if anyone facing similar issues, could try on the above path.

Comments

Popular posts from this blog

How to fix Azure DevOps error MSB4126

How to create Custom Visuals in Power BI – Initial few Steps

How to fix Azure DevOps Error CS0579