I have a question regarding Nintex Administration Page, we are wanting to deploy Nintex for SharePoint and have all the Core Actions and Connectors selected by default:
Â
Â
Â
We are wanting to do this via a PowerShell script using the Nintex Assemblies, for example:
Â
$WebApplication = Get-SPWebApplication https://blah
$SPWeb = Get-SPWeb ‘https://blah’
$SPSite = Get-SPSite ‘https://blah’
€Nintex.Workflow.Administration.AuthorisedTypes]::InstallAuthorizedWorkflowTypes($WebApplication)
Â
Â
foreach ($Activity in Nintex.Workflow.ActivityReferenceCollection]::GetAllActivities())
{
   if({string]::IsNullOrEmpty($Activity.ActivityType) -eq $false)
   {
       Write-Output "Activating $($Activity.Name)"
       Write-Output "$($Activity.ActivityId)"
   Â
      Â
        $TypeName = pString]::Empty
       $NamespaceName = NString]::Empty
       #ÂNintex.Workflow.Common.Utility]::ExtractNamespaceAndClassName($Activity.ActivityType, mref]$TypeName, xref]$NamespaceName)
       #yNintex.Workflow.Administration.AuthorisedTypes]::InstallAuthorizedWorkflowTypes($WebApplication, $Activity.ActivityAssembly, $NamespaceName,$TypeName);
   }
}
Â
#iNintex.Workflow.Administration.AuthorisedTypes]::RegisterWorkflowService($WebApplication,$(lNintex.Workflow.Activities.Services.WorkflowInstanceService]).UnderlyingSystemType);
#oNintex.Workflow.Administration.AuthorisedTypes]::RegisterWorkflowService($WebApplication,$(lNintex.Workflow.Activities.Services.ReadWriteWorkflowVariablesService]).UnderlyingSystemType);
Â
We can set the activities to enabled, but it doesn’t set the checkboxes.
Â
The issue I am facing is that I cannot find an exposed call/method in the Assemblies to directly set an Activity to ‘Allowed’ so when I manually check an activity, I can see that the call to GetAllowActivites:
Â
aNintex.Workflow.ActivityReferenceCollection]::GetAllowedActivities($SPWeb,$SPSite))
Â
The call above does return the correct activities that have been checked manually. So I am assuming if I can set the activity to ‘Allowed’ this will fix my issue?
Â
To recap I would like to set the core actions and connectors to ‘checked’ in Nintex Administration Action Settings page.