Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WorkflowManager could not deserialize XOML definition #118

Open
JayVDZ opened this issue Mar 21, 2024 · 9 comments
Open

WorkflowManager could not deserialize XOML definition #118

JayVDZ opened this issue Mar 21, 2024 · 9 comments

Comments

@JayVDZ
Copy link
Contributor

JayVDZ commented Mar 21, 2024

In an environment that has used MIMWAL before, but had it's custom workflows removed: when creating a new dead basic Update Resources workflow, upon execution, it fails with the following Event Log entries:

Unable to create new WorkflowInstance for WorkflowDefinition...

WorkflowValidationFailedException: The workflow failed validation

WorkflowManager could not deserialize XOML definition: ...

347 : : Invalid data found while deserializing an object of type 'Microsoft.ResourceManagement.Workflow.Activities.SequentialWorkflow'.

The workflow is:

DisplayName: Step One
Value Expression: "DummyValue"
Target: [//Target/Description]
Allow Null: True

Have also tried using a standard Function Evaluator activity instead, and that works, so it appears just be related to MIMWAL activities.

Environment:

  • MIM Version 4.6.540.0
  • MIMWAL 2.20.723.0
  • Windows Server 2012 R2
  • SharePoint 2016
  • Single node active. Others turned off

Diagnostics Performed:

  • Tried creating a MIMWAL Add Delay workflow as well, this also fails as above
  • MIMWAL upgraded to version 2.20.723.0 on all nodes
  • Old MIMWAL dlls uninstalled from the GAC
  • Service config file checked for correct binding redirects and public key tokens
  • Tried editing XOML and replacing 4.0.0.0 version references with 3.5.0.0 as one article suggested
  • Rebooted server
  • Threw hands up in the air and swore a few times

Any ideas? :)

@sylvainclb
Copy link

Hello Jay,

Any custom activities are registered in MIM by creating an object of type ActivityInformationConfiguration. You can review them under "Administration > All resources > Activity Information Configuration"

As you use an upgrade version of MIMWAL, you should update version on all related MIM WAL activities.

You can use the Register.ps1 script provided under the Scripts folder solution to do that. And then use the UpdateWorkflowXoml.ps1 script to update any old workflow that use a MIMWAL activities.

Kind Regards,
Sylvain

@JayVDZ
Copy link
Contributor Author

JayVDZ commented Mar 22, 2024

I know :) Thank you though.
It doesn't matter if the workflows are old or new from after the upgrade, they still fails to deserialize.

@sylvainclb
Copy link

Maybe, you can past the XOML of your failed WF definition?
I can try to compare it with one dummy in my env :)

@NileshGhodekar
Copy link
Contributor

Enable the .NET fusion logs. It may tell you what ref assembly or binding redirect for it is missing

@JayVDZ
Copy link
Contributor Author

JayVDZ commented Apr 11, 2024

I've got some Fusion logs (using Fusion++) and the only logs during the execution window are for powershell.exe, which doesn't seem right. I'm not using a MIMWAL PowerShell activity. There's no binary references to MIMWAL namespaces. I think this is a red herring. It also only occurs once, not the second time I repeat the test in MIM, so I think it's coincidental.

There are a few Error items (getting logs off the server is difficult):
powershell.exe | System.Management.Automation.resources, Version=3.0.0.0, Culture=en-US, PublicKeyToken=...
Using machine configuration file from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config
Attempting to download files from file:///C:/WINDOWS/system32/WIndowsPowerShell/v1.0/en-US/ to do with System.Management.Automation.resources << Have checked, there's no such files in this location. The folder exists and has a few .mui and a .txt files.

Same for Microsoft.PowerShell.ConsoleHost.resources
Same for Microsoft.PowerShell.Security
Same for Microsoft.InternationalSettings.Commands

I also wrote a test HelloWorld app that has dependencies on something else and that showed up fine in Fusion, so it doesn't seem to be a logging issue. It's like MIM is not getting as far as trying to invoke the MIMWAL binaries.

@JayVDZ
Copy link
Contributor Author

JayVDZ commented Apr 11, 2024

Tried a different scenario: log whilst restarting FIMService. This has produced a lot of errors. All to do with MIM binaries, not MIMWAL (the WorkflowActivityLibrary dll is loading fine). Analysing this...

@NileshGhodekar
Copy link
Contributor

Believe MIMWAL is compiled with reference to System.Management.Automation\1.0.0.0. You may not have correct version of PowerShell. Not sure if you can build with 3.0.0.0 version of System.Management.Automation and that can run in .NET 3.5

@JayVDZ
Copy link
Contributor Author

JayVDZ commented Apr 11, 2024

Mmmm, there was a PowerShell upgrade on the server recently, so you might be on to something there. Thanks Nilesh.

@JayVDZ
Copy link
Contributor Author

JayVDZ commented Apr 15, 2024

Happens in another environment with the same customer. This has had no PowerShell upgrades. Hrm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants