none
activity workflow - powershell activity throwing Index was out of range RRS feed

  • Question

  • FIM WAL is calling a powershell activity. After the activity is called, search requests throws " this workflow instance encountered an internal error during processing". In event viewer, I could see this error. I even tried with empty try catch statement. Iit's giving the same error.

    param($oid,$fname,$AcctName,$lname)
    try
    {
    $line = "test"
    }
    catch [System.Exception]
    {
     return "bad value"
    }

    System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
       at System.ThrowHelper.ThrowArgumentOutOfRangeException()
       at System.Collections.Generic.List`1.get_Item(Int32 index)
       at System.Collections.ObjectModel.Collection`1.get_Item(Int32 index)
       at FIM.Workflow.Common.Activities.RunPowerShellScript.RunScript(String script, ArrayList arguments, Dictionary`2 parameters)
       at FIM.Workflow.Common.Activities.RunPowerShellScript.Run_ExecuteCode(Object sender, EventArgs e)
       at System.Workflow.ComponentModel.Activity.RaiseEvent(DependencyProperty dependencyEvent, Object sender, EventArgs e)
       at System.Workflow.Activities.CodeActivity.Execute(ActivityExecutionContext executionContext)
       at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)
       at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext)
       at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
       at System.Workflow.Runtime.Scheduler.Run()

    Tuesday, March 24, 2015 5:09 PM

All replies