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)
  1. GAC'd the assembly
  2. Create the FIM Service account in FIM portal (with the correct objectSID etc) and made it a member of administrators group
  3. 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! 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

file attachments


kmittal82 wrote Aug 6, 2014 at 6:28 PM

Oh, 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 :(

kmittal82 wrote Aug 7, 2014 at 9:19 AM

I re-installed the Activity and everything is working once more - I have no clue what happened!
Anyways, thanks for the awesome project :)

wrote Aug 7, 2014 at 9:22 AM

CraigMartin wrote Aug 11, 2014 at 3:36 PM

Thanks for following up with the solution, I don't understand what happened either. Odd that the script executed but still resulted in an error. Glad it doesn't repro ;-)

wrote Sep 25, 2014 at 12:44 PM

Davidburghgraeve wrote Sep 25, 2014 at 12:44 PM


I've also had this issue on 2 different FIM development environments (around the same time).
The same error, the same events in the eventlog, the same phenomenon, PowerShell scripts do run, but somehow a PostProcessingError occurred.

I think I know why: I was using an attribute with a function get_employeeID, and was using this in my PowerShell script accordingly (see attached image file) $employeeID=$fimwf.WorkflowDictionary.EmployeeID.
I've changed this to another attribute, in the function activity and the PowerShell script. So basically, I've 'decommissioned' the employeeID usage.

After that, postProcessingError. Changing the order of the powershell activities, adding/removing the activity, nothing helps.

I've tried an IISRESET (is workflow part of that?), did not work.

After a reboot of the system, all is working properly.
Looks like something is sticking in the activity?

Kind regards,
PS: I did not test this further because of some pressure in delivery of my work to production ;)
PS: A faster fix without reboot would be nice as temporary workaround :)