0
Answered

Powershell transform showing an error IdB 5.2

Carol Wapshere 6 years ago updated by Beau Harrison (Senior Product Software Engineer) 6 years ago 4

Since updating to 5.2 I've noticed that the one Powershell transform I'm using in an adapter is now displaying an error message in the UI, though the transform itself still looks to be functioning. Here's the error displayed in the UI:


System.NullReferenceException: Object reference not set to an instance of an object.
at Unify.Connect.Web.TransformationControllerExtensions.<navigatetodisplay>d__16`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Unify.Connect.Web.DefaultTransformationController.<display>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at lambda_method(Closure , Task )
at System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass34.<begininvokeasynchronousactionmethod>b__33(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<invokeactionmethodfilterasynchronouslyrecursive>b__3c()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass45.<invokeactionmethodfilterasynchronouslyrecursive>b__3e()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass30.<begininvokeactionmethodwithfilters>b__2f(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass1e.<>c__DisplayClass28.<begininvokeaction>b__19()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass1e.<begininvokeaction>b__1b(IAsyncResult asyncResult)
</begininvokeaction></begininvokeaction></begininvokeactionmethodwithfilters></invokeactionmethodfilterasynchronouslyrecursive></invokeactionmethodfilterasynchronouslyrecursive></begininvokeasynchronousactionmethod></display></navigatetodisplay>

This is the adapter config:

        
          
            
          
        
I have installed a UI patch to IdB 5.2 based on a previous issue I raised.

Answer

Answer
Answered

Matt just reminded me, v5.1 had a spelling error in the name of the PowerShell transformation which was corrected in v5.2. Change the incorrect PoweShell to the correct PowerShell.

The adapter config is not appearing - here it is again:

        <adapter name="PoweShell" key="5b01eb6c-99a4-4306-9e9c-94a4cc3f2a57">

          <Extended xmlns="">

            <Scripts transformationScript="# Clear attributes for the position $posID = "xxxxx" $found = $false foreach ($entity in $entities) {    if ($entity["ActualPositionNumber"] -and $entity["ActualPositionNumber"].Value -eq $posID)    {        $entity["ReportsToPersonNumber"] = $null        $entity["ReportsToPosition"] = $null        $entity["Manager"] = $null        $found = $true        $logger.LogInformation("Aurion Personnel: X and Y attribute values stripped from the person in the position of {0}." -f $posID)        break    } } if (-not $found) {     $logger.LogWarning("Aurion Personnel: Did not find a person with ActualPositionNumber matching the position of {0}. This is used by the PowerShell transformation that removes their X and Y attribute values." -f $posID) } " schemaScript="" />

          </Extended>

        </adapter>


Under review

Hi Carol

Can you link to the previous issue you installed the patch for? From that stack trace, it looks like the PowerShell transformation specific UI elements are not being loaded. Does this persist after restarting the service if you're using the embedded web host or restarting the site/app pool if your using IIS?


Answer
Answered

Matt just reminded me, v5.1 had a spelling error in the name of the PowerShell transformation which was corrected in v5.2. Change the incorrect PoweShell to the correct PowerShell.

That has fixed it, thanks.