Powershell - WorkflowManager could not deserialize XOML definition
I am in a test environment trying to run Powershell in a workflow activity. I get the below error when triggering the activity through a Transition In. I have referenced the new DLL (4.0.3531.2) but still get the error. I have two other
Activities in the same project that work just fine, which makes me think the reference to ResourceManagment is correct. As you can see from the XOML, this is a project that I am trying to get work that I got off CodePlex (http://fimpowershellwf.codeplex.com/)
Error ----------------------------------------------------------------------
WorkflowManager could not deserialize XOML definition: '<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:Dell.FIMWorkflow.Activities;Assembly=DellFIMWorkflowActivity, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e8fb15f2d5ef3649" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ns0="clr-namespace:Microsoft.ResourceManagement.Workflow.Activities;Assembly=Microsoft.ResourceManagement, Version=4.0.3531.2, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
-------------------------------------------------------------------
Workflow
<ns1:PowerShellActivity PowerShellVariables="[Optional] Enter a comma separated list of WorkflowData items to use as PowerShell variables." x:Name="authenticationGateActivity1" PowerShellModule="[Optional] Enter the path of a module to load for the PowerShell
session." Script="Get-Process | Select -First 5" WorkflowDataNameForOutput="[Optional] Enter the name of a WorkflowData item to store the PowerShell script output." />
</ns0:SequentialWorkflow>'.
I referenced this thread but still unabled to solve.
http://social.technet.microsoft.com/Forums/en-US/ilm2/thread/f319fbdf-def6-4b4a-8220-57d416c9b26a/?prof=required
-
Changed type
Markus VilcinskasMicrosoft employee, Owner
Thursday, March 14, 2013 7:26 AM
September 22nd, 2011 6:47pm
I've seen that error when I messed up the version in my XOML, and found that clicking on any activity in the WF (using the FIM portal) then clicking 'Save' will get FIM to correct the version for me.
September 22nd, 2011 10:24pm
Unfortunately that did not work. I am still searching hoping something will click.
September 23rd, 2011 7:14pm
If you can send me the script output from the script below, I can try to repro.
$myWorkFlowDisplayName = "<INSERT YOUR WF DISPLAY NAME HERE>"
$wf = Export-FimConfig -Custom "/WorkflowDefinition[DisplayName=$myWorkFlowDisplayName]" | Convert-FimExportToPSObject
NOTE: you need to copy the Convert-FimExportToPSObject from
here.
September 23rd, 2011 11:16pm
@{ObjectID=urn:uuid:a8ba695c-26fd-471e-be83-48bb7cf92241; CreatedTime=9/22/2011 1:38:01 PM; Creator=urn:uuid:7fb2b853-24f0-4498-9534-4e10589723c4; DisplayName=_Powershell test; ObjectType=WorkflowDefinition; RequestPhase=Action; RunOnPolicyUpdate=False;
XOML=<
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:Dell.FIMWorkflow.Activities;Assembly=DellFIMWorkflowActivity, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e8fb15f2d5ef3649" xmlns:x="
http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ns0="clr-namespace:Microsoft.ResourceManagement.Wo
rkflow.Activities;Assembly=Microsoft.ResourceManagement, Version=4.0.3531.2, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<ns1:PowerShellActivity PowerShellVariables="" x:Name="authenticationGateActivity1" PowerShellModule="" Script="Get-Process | Select -First 5" WorkflowDataNameForOutput="" />
</ns0:SequentialWorkflow>}
September 26th, 2011 4:15pm
Did you forget to install the dlls into the GAC on that machine?
September 27th, 2011 3:04am
Good question Ikrima, I assumed that was the case since the XOML was generated and stored in FIM already. Usually for that to happen the following are already working:
- DLL is GAC'd
- ActivityInformationConfiguration (AIC) object is created in the FIM Service
- FIMService is restarted, and IIS is reset
- WorkflowDefinition object is created using the FIM Portal
I can get myself into this situation because I don't use the FIM Portal to create workflows, I typically use the Import-FimConfig cmdlet which will allow you to create a WorkflowDefinition with an invalid XOML, but I assume everybody else uses the FIM Portal
which imposes more sanity on the situation ;-)
September 27th, 2011 3:08am
I also get this message along with the could not serialize:
Microsoft.ResourceManagement.Workflow.Hosting.WorkflowManagerException: Unable to create new WorkflowInstance for WorkflowDefinition 'a8ba695c-26fd-471e-be83-48bb7cf92241'. --->
and one similar to this one. Those three are the same everytime the transition in occurs.
I also rechecked everything stated above with reinstalling the DLL in the GAC. Thanks for the help, I just can't seem to this one to work.
September 27th, 2011 4:26am
You sure? Looks like your dlls are a bit outdated:
xmlns:ns0="clr-namespace:Microsoft.ResourceManagement.Wo
rkflow.Activities;Assembly=Microsoft.ResourceManagement, Version=4.0.3531.2
It most definitely is a serialization issue; did you recompile the workspace & link it with the newest FIM dlls? The latest bits are version 4.0.3576.2.
September 27th, 2011 12:38pm
I recompiled the project with the DLL's and I have another workflow that is working just fine.
I do have the hotfix with the latest bits, but have not installed them as of yet. I have only installed what comes through Windows Update so far. I will try to go up to the latest and see if that helps.
September 27th, 2011 5:16pm
The serialization issue means that FIM can't find (or use) the DLL specified in the XOML in the WorkflowDefinition.
Your XOML points to an assembly DellFIMWorkflowActivity with a namespace Dell.FIMWorkflow.Activities.
At this point I think we're troubleshooting the WF's ability to find the activity, so we should probably look at the ActivityInformationConfiguration object as well. Getting the details might be helpful in troubleshooting.
$myAIC = "DellFIMWorkflowActivity, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e8fb15f2d5ef3649"
$AIC = Export-FimConfig -Custom "/ActivityInformationConfiguration[AssemblyName=$myAIC]" | Convert-FimExportToPSObject
NOTE: you need to copy the Convert-FimExportToPSObject from
here.
September 27th, 2011 6:52pm
Here are the results from the AIC export.
@{ObjectID=urn:uuid:a00e1ed7-60dc-45a2-9a69-019f236a9bd8; ActivityName=Dell.FIMWorkflow.Activities.DateTimeActivity; AssemblyName=DellFIMWorkflowActivity, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=e8fb15f2d5ef3649; CreatedTime=6/9/2011 5:24:34 PM;
Creat
or=urn:uuid:7fb2b853-24f0-4498-9534-4e10589723c4; DisplayName=_DateTimeNow; IsActionActivity=True; IsAuthenticationActivity=False; IsAuthorizationActivity=False; IsConfigurationType=False; ObjectType=ActivityInformationConfiguration; TypeName=Dell.FIMWorkflow.
Activities.DateTimeActivitySettingsPart}
@{ObjectID=urn:uuid:bf381a49-2f34-4746-a8fa-47018485b7b3; ActivityName=Dell.FIMWorkflow.Activities.MFDSPwdGeneratorActivity; AssemblyName=DellFIMWorkflowActivity, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=e8fb15f2d5ef3649; CreatedTime=6/6/2011 1:09:51
P
M; Creator=urn:uuid:7fb2b853-24f0-4498-9534-4e10589723c4; Description=Creates an encrypted password for the initial creation of a user account in OMIMF-DEV; DisplayName=MFDS Password Activity; IsActionActivity=True; IsAuthenticationActivity=False; IsAuthorizat
ionActivity=False; IsConfigurationType=False; ObjectType=ActivityInformationConfiguration; TypeName=Dell.FIMWorkflow.Activities.MFDSPwdGeneratorActivitySettingsPart}
@{ObjectID=urn:uuid:49695cf0-2a75-4fdf-9bc7-1f34922cb41d; ActivityName=Dell.FIMWorkflow.Activities.PowerShellActivity; AssemblyName=DellFIMWorkflowActivity, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=e8fb15f2d5ef3649; CreatedTime=9/22/2011 12:46:39 PM;
C
reator=urn:uuid:7fb2b853-24f0-4498-9534-4e10589723c4; Description=_Run Powershell script; DisplayName=Powershell Activity; IsActionActivity=True; IsAuthenticationActivity=False; IsAuthorizationActivity=False; IsConfigurationType=False; ObjectType=ActivityInfor
mationConfiguration; TypeName=Dell.FIMWorkflow.Activities.PowerShellActivitySettingsPart}
September 27th, 2011 8:27pm
Hello, Is this treat closed?
Currently trying to configure the "FIM PowerShell Workflow Activity" developed by Craig (http://fimpowershellwf.codeplex.com/), I have exactly the same issue as vaadadmin2010.
Did someone manage to find a solution?
Kind regards, Jean-Yves
November 24th, 2011 7:12pm
No, I have not resolved the specified issue as of yet. Hopefully soon I can get FIM updated to the latest hotfixes and start testing again.
December 6th, 2011 4:23pm
I know this is old but ill answer anyway.
To resolve this, you need to re-compile your library with the same dll version (or lower) as you current FIM installation have. So, yes, an update to latest release will work for you. That solved it for me, in different cases.
January 28th, 2015 11:48pm