Workflow exception - totally stumped!

Aug 6, 2014 at 6:30 PM
Hi All,

First of all, thanks soooo much for developing this PowerShell based WF activity (so much nicer than using workflow foundation!)

I've downloaded and installed the activity using the associated scripts. So, I have done the following (through the scripts)
GAC'd the assembly
Create the FIM Service account in FIM portal (with the correct objectSID etc) and made it a member of administrators group
Changed the FIM service configuration file to add the relevant entries to support this
The activity shows up as an Action activity just fine. The trouble is, when the activity runs it gives a PostProcessingError, with these details:
System.InvalidOperationException: Exception of type 'Microsoft.ResourceManagement.Workflow.WorkflowExtensionException' was thrown.
   at FimExtensions.FimActivityLibrary.PowerShellActivity.Execute(ActivityExecutionContext context)
   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()
Initially I thought it might be an error in the powershell code that I wrote, so I replaced with with a simple write-host command, but I get the exact same error everytime!

just to add, the workflow actually does execute, it looks like the workflow fails when exiting.
The WF I have is simple:
"test" | Out-File "C:\FIM_WF\accountname\test.txt" -Append
It does generate the test.txt file with the text in it, but the portal keeps reporting a PostProcessingError :(


And to make matters worse, this worked ONCE and the activity did run once.

I have restarted FIM service, the SQL server, the FIM box and prayed to the vodoo gods, but nothings has helped. I have used this activity in the past without any issues, and I'm completely stumped as to why I have this error. I've done a lot of googling, but I have already performed all the pre-req steps which supposesdly could cause the problem.

The only thing I haven't tried yet is re-installing the activity itself, but I would like to know if there are any theories on why this is failing randomly?

Thanks in advance
Aug 7, 2014 at 9:21 AM
Fixed by re-installing the activity (removing the DLL, ungacing then re-gacing etc)
Marked as answer by kmittal82 on 8/7/2014 at 2:22 AM