none
Custom Workflow Activity -- Unable to create new WorkflowInstance for WorkflowDefinition [guid] revisited. RRS feed

  • Question

  • We have migrated from FIM 2010 RC (upgraded to RTM) to a FIM 2010 RTM install.

    We followed the instructions and copied our (working) custom activity .dlls onto the target migration and into the GAC.

    When using these activities I get the Workflow cannot be instantiated error which I believe is caused by a .dll problem.

    When I check the assembly version of Microsoft.ResourceManagement.dll on the new FIM 2010 RTM install it shows 4.1.2273.0 but I have compiled my code with version 4.1.1906.0

    We have learned that FIM is now quite picky about version numbers.

    Is this enough reason for the Workflow to be "invalid" ?

    There are about 60 different places where the file Microsoft.ResourceManagement.dll exists on the FIM server.

    Which is the right one to pick?!

    We also have to get the correct  Microsoft.IdentityManagement.WFExtensionInterfaces.dll Microsoft.IdentityManagement.Activities.dll and Microsoft.IdentityManagement.WebUI.Controls.dll files, where might these be found on the FIM 2010 RTM server?

    Wednesday, August 8, 2012 1:36 PM

Answers

  • Well, it's not that FIM is picky- it's generically a .Net thing with assembly references. The issue is that your assembly is referencing the old 1906 version, which isn't there any more. You can either rebuild the assembly with updated references to the 2273 version or add an assembly binding redirect to the FIM Service .config file so that calls to old version are redirected to the new one (which is how MS did it in 2010 when they upgraded their assemblies)

    Frank C. Drewes III - Architect - Oxford Computer Group


    • Edited by Frank Drewes Wednesday, August 8, 2012 2:18 PM
    • Marked as answer by HaroldHare Thursday, August 9, 2012 1:02 PM
    Wednesday, August 8, 2012 2:15 PM

All replies

  • Well, it's not that FIM is picky- it's generically a .Net thing with assembly references. The issue is that your assembly is referencing the old 1906 version, which isn't there any more. You can either rebuild the assembly with updated references to the 2273 version or add an assembly binding redirect to the FIM Service .config file so that calls to old version are redirected to the new one (which is how MS did it in 2010 when they upgraded their assemblies)

    Frank C. Drewes III - Architect - Oxford Computer Group


    • Edited by Frank Drewes Wednesday, August 8, 2012 2:18 PM
    • Marked as answer by HaroldHare Thursday, August 9, 2012 1:02 PM
    Wednesday, August 8, 2012 2:15 PM
  • Is it enough for me to edit my Visual Studio solution so that I replace the 1906 versions with 2273 versions of the .dlls obtained from the latest FIM server and then rebuild my custom activity .dll and then reintroduce to FIM via the GAC?

    I am totally confused by the second option. I think the first option was what I wrote above... i.e.

    1. Get the 2273 versions of Microsoft.ResourceManagement.dll 

    Microsoft.IdentityManagement.WFExtensionInterfaces.dll

    Microsoft.IdentityManagement.Activities.dll 

    Microsoft.IdentityManagement.WebUI.Controls.dll files from the FIM server.

    2. Remove in my VS solution the existing references and replace with the 2273 versions.

    3. Rebuild all

    Thursday, August 9, 2012 6:57 AM
  • Here's an example from my Microsoft.ResourceManagement.Service.exe.config file. There is an entry for each of the assemblies with the range of versions which will be redirected to the 4.1.2273.0 version. Note that the name, token and culture have to be the same between the old and new version.

    I would be a bit more conservative with the ranges if I added my own assemblies.

      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="FunctionLibrary" publicKeyToken="31bf3856ad364e35" culture="neutral" />
            <bindingRedirect oldVersion="4.0.0.0-4.65535.65535.65535" newVersion="4.1.2273.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="Microsoft.IdentityManagement.Activities" publicKeyToken="31bf3856ad364e35" culture="neutral" />
            <bindingRedirect oldVersion="4.0.0.0-4.65535.65535.65535" newVersion="4.1.2273.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="Microsoft.ResourceManagement.Automation" publicKeyToken="31bf3856ad364e35" culture="neutral" />
            <bindingRedirect oldVersion="4.0.0.0-4.65535.65535.65535" newVersion="4.1.2273.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="Microsoft.ResourceManagement" publicKeyToken="31bf3856ad364e35" culture="neutral" />
            <bindingRedirect oldVersion="4.0.0.0-4.65535.65535.65535" newVersion="4.1.2273.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="Microsoft.IdentityManagement.WFExtensionInterfaces" publicKeyToken="31bf3856ad364e35" culture="neutral" />
            <bindingRedirect oldVersion="4.0.0.0-4.65535.65535.65535" newVersion="4.1.2273.0" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>


    Frank C. Drewes III - Architect - Oxford Computer Group


    Sunday, August 12, 2012 8:20 AM