locked
Custom Workflow Actions not working after upgrade to SharePoint 2013 RRS feed

  • Question

  • Hi,

    After upgrading to SharePoint 2013, custom workflow actions are not working. If I open the workflow in SharePoint Designer 2013 I see the below:

    then Error message: Could not deserialize object. The typ...

    The error reads: Could not deserialize object. The type 'DT.SP2010.WorkflowActivities.Library.CancelWorkflow' could not be resolved.

    The action is still available in the Action menu and if I add the action again to the workflow it gives me the below errors when I try to Publish (save and check for errors was fine):

    (0, 10) The type or namespace name 'DT' could not be found (are you missing a using directive or an assembly reference?))
    (119, 16) The type or namespace name 'DT' could not be found (are you missing a using directive or an assembly reference?))

    Custom actions were deployed using Solution (no manual file placement). To deploy it on 2013 server I downloaded it from 2010 and installed using "Install-SPSolution -Identity dt.sp2010.workflowactivities.wsp -WebApplication "SharePoint - 80" -GACDeployment -CompatibilityLevel {14, 15}'

    Any help will be much appreciated.

    Tuesday, March 26, 2013 7:38 AM

Answers

  • I just tested this on one of my custom 2010 solutions in 2013 and it worked.  You will need to ensure you are adding the authorized type node to the correct place since its changed in 2013 to the targetFx node.

      <System.Workflow.ComponentModel.WorkflowCompiler>
        <authorizedTypes>
          <targetFx version="v4.0">
           <authorizedType Assembly="CustomActivity, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5e1889a0551259a1" Namespace="CustomActivity" TypeName="*" Authorized="True" />

    Wednesday, May 15, 2013 6:39 PM

All replies

  • Hi,

    Any solution ? I have the same problem. All my custom workflow actions for 2010 are not working in 2013

    The action is available in the Action menu and I can put into workflow. Save and check for errors is OK

    But Publish into website produces error

    (0, X) The type or namespace name 'mynamespace' could not be found (are you missing a using directive or an assembly reference?))
    (Y,Z) The type or namespace name 'mynamespace' could not be found (are you missing a using directive or an assembly reference?)) 

    I'm desperate

    Thank you very much


    Wednesday, April 3, 2013 5:59 PM
  • Did you redeploy before or after you got the error you mentioned here?  

    Kris Wagner, MVP, MCITP, MCTS Twitter @sharepointkris Blog: http://www.sharepointkris.com/blog

    Thursday, April 4, 2013 12:35 AM
  • I deployed all custom solutions as part of SharePoint migration. while testing the workflows I was getting "Failed on Start" error, so I went and checked the workflows in SharePoint Designer (2013).

    I've also tried to convert the visual studio project to SharePoint 2013 project, which was successfull but gave the same error when deployed on the SP2013 server.

    Logged a service ticket with microsoft and got the below response:

    From the screenshot you sent me, we consider the custom action has been successfully deployed in SPD. To continue troubleshooting why it shows the error when adding the action into the workflow, we need to check the code or may locally deploy the package to replicate the issue. Sorry for the delay during our internal communication. But we found that this professional case cannot support code review, refer to xyz link

    So if you’d like to continue investigation, please help narrow down this issue at your end first, make a smallest sample for us to check and local test, which means you reduce the code to a few lines(e.g. 11 lines) but this small sample can still reproduce the issue.

    Thursday, April 4, 2013 12:54 AM
  •  

    Hi

    thank you for your answers.

    to Kris:

    please what do you mean exactly "redeploy" ? 
    Im using powershell and Install-SPSolution,UnInstall-SPSolution, add-spsolution, remove-spsolution  ; over and over again

    I tested many own source code, or source code from internet EFSPWFActivities,CustomWFActivities
    and I compiled it in VS2010 and VS2012 also .
    I Used example with (0, X) and (Y,Z) because all my solution(attempts) ended with this error.
    Only namespaces and X,Y,Z numbers are different. 



    Does anyone of you have any functional custom workflow activity example solution (for workflow engine 2010) for SPD 2013 ?

    to Sharjeel:

    I'm not sure if I understand well. Will you send a short example your code to microsoft ?

    Just to clarify : I need functional custom workflow action 2010 on 2013 SP Foundation !!!

    I'm starting to doubt whether it is possible. Whether compatibility Workflow 2010 engine with SP 2013  is not just a theory








    Thursday, April 4, 2013 6:02 PM
  • I just tested this on one of my custom 2010 solutions in 2013 and it worked.  You will need to ensure you are adding the authorized type node to the correct place since its changed in 2013 to the targetFx node.

      <System.Workflow.ComponentModel.WorkflowCompiler>
        <authorizedTypes>
          <targetFx version="v4.0">
           <authorizedType Assembly="CustomActivity, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5e1889a0551259a1" Namespace="CustomActivity" TypeName="*" Authorized="True" />

    Wednesday, May 15, 2013 6:39 PM