This project is read-only.


Don't get Workflowdata back


I'm sure I'm doing something wrong but after hours try & error I hope you can spot my error.
I can't get information out a PS script via the $workflowdata. Inputting works fine.
Below is the XOML of my test workflow.
As I'm logging the $WorkflowData['GettingBack'] to a file so I know that it contains the test data.
But the middlename of the user of witch I'm changing a attribute to trigger the workflow doesn't change.
The workflow ends "Completed" so no major error happens.
<ns0:SequentialWorkflow x:Name="SequentialWorkflow" ActorId="00000000-0000-0000-0000-000000000000" WorkflowDefinitionId="00000000-0000-0000-0000-000000000000" RequestId="00000000-0000-0000-0000-000000000000" TargetId="00000000-0000-0000-0000-000000000000" xmlns:ns1="clr-namespace:FIM.PowerShell.Workflow.Activities;Assembly=FIM.PowerShell.Workflow.Activities, Version=, Culture=neutral, PublicKeyToken=f681f8b177020005" xmlns:x="" xmlns:ns0="clr-namespace:Microsoft.ResourceManagement.Workflow.Activities;Assembly=Microsoft.ResourceManagement, Version=4.0.3573.2, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<ns0:FunctionActivity x:Name="authenticationGateActivity2" 
FunctionExpression="&lt;fn id="SingleValueAssignment"  
isCustomExpression=false  &gt;&lt;arg&gt;
[//Target/AccountName] &lt;/arg&gt;&lt;/fn&gt;" 
Description="Get accountname" 
Destination="[//WorkflowData/Accountname]" />

<ns1:PowerShellActivity RunAs="None" x:Name="authenticationGateActivity3" 
Script="param($WorkflowDefinitionId, $RequestId, $ActorId, $TargetId, $WorkflowData, $Accountname)
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
$Accountname > c:\logfiles\testPS.txt
$WorkflowData['GettingBack'] = "Backinfo123"
$WorkflowData['GettingBack'] >> c:\logfiles\testPS.txt" />

<ns0:FunctionActivity x:Name="authenticationGateActivity4" 
FunctionExpression="&lt;fn id=SingleValueAssignment;  
isCustomExpression=false  &gt;&lt;arg&gt;
[//WorkflowData/GettingBack]  &lt;/arg&gt;&lt;/fn&gt;" 
Description="Set Middlename" 
Destination="[//Target/MiddleName]" />

file attachments

Closed May 2, 2014 at 1:31 AM by adweigert
This is fixed in the 2.0 release.


RenaatMeeuws wrote Feb 25, 2012 at 3:14 PM

added screenshot of last FunctionExpression

wrote Feb 28, 2012 at 11:18 AM

sefanja_severin wrote Feb 28, 2012 at 11:23 AM

Exactly the same here.

param($WorkflowDefinitionId, $RequestId, $ActorId, $TargetId, $WorkflowData, $Accountname)
$WorkflowData["test"] = "testing"
$WorkflowData["test"] | out-file -filepath "c:\test.txt"

This gives me the output string 'testing' in the file test.txt. But the variable [//WorkflowData/test] remains empty.

I really appreciate and need your ps activity. I hope you'll come with a solution.

sefanja_severin wrote May 9, 2012 at 11:04 PM

Is this a confirmed bug? I've spend another three hours on this issue today. No positive results :(. Setting $WorkflowData['test'] just doesn't do anything. You'd make me very happy with a bug fix!

ribo wrote May 29, 2012 at 1:02 PM

We have the same problem. I have recompiled the for FIM R2 RC1, the problem is however still the same.

Would appreciate feedback.

BR /RiBo

wrote Jun 11, 2012 at 12:19 PM

richardgil wrote Jun 11, 2012 at 12:22 PM


We're getting exactly the same issue (FIM 2010 -PS2.0)
Otherwise great module!

Thanks again

nprakaz wrote Jul 10, 2012 at 1:40 AM

Hi, same issue. if this is fixed, this WF will be very useful to write quick custom activities.

wrote Feb 14, 2013 at 8:23 PM

wrote May 2, 2014 at 1:31 AM