locked
Custom Workflows/plugins RRS feed

  • Question

  • In CRM 3.0, I created workflow assemblies to do a specific task which can be run in CRM. This is fine.
    But I am now trying to upgrade code and test it for CRM 4.0 but it doesnt seem to work the way I expect it. Infact I just get an error saying that there was an error running the workflow.

    I created the workflow assembly in .NET (new C# class project), I copied over the workflow assembly to the server\bin folder. I also modified the workflow.config file to register/add the workflow assembly correctly, just like in CRM 3.0 - restarted IIS and no go!

    what am I doing wrong?
    Also how can we find further information on what error the workflow occured?
    Need 2 be back @ MS - MS All the way! Follower since 1995 MS Super Evangelist| MSDN Forums Moderator
    Thursday, February 12, 2009 11:10 PM

Answers

All replies

  • According to CRM4 SDK you shouldn't need to upgrade the code: "Any previously registered .NET assemblies that you have developed for Microsoft Dynamics CRM 3.0 will continue to work after you upgrade the system to Microsoft Dynamics CRM 4.0. Upon upgrade, the configuration information for the Microsoft Dynamics CRM 3.0 workflow is added to the database but the supporting files remain on the server."

    What exactly did you do? Did you change the Workflow Assembly to Workflow Activity?
    Ronald
    Friday, February 13, 2009 12:22 AM
  • Thats what I thought too, but because of the authentication code change when calling services to get entities etc...  I changed the code along with bug fixes to make it a new version of the workflow

    I didnt change anything at all, so I dont think its an activity.It still is a Workflow Assembly and will (hopefully) always be.

    if I were to design from scratch a new workflow assembly, how would I do this? Would it be in the same way as CRM 3.0? What about when trying to register the assembly so the workflow can see it and let the user run the workflow assembly in CRM 4.0?
    Need 2 be back @ MS - MS All the way! Follower since 1995 MS Super Evangelist| MSDN Forums Moderator
    Friday, February 13, 2009 12:35 AM
  • I would first try debugging the workflow assembly in VS. If you are able to do that, things will be much easier. You can also turn on CRM trace to find out more about the error.

    If you were to convert the code to workflow activity, refer to CRM SDK help file. It is too much to be covered here. I would download the SDK because it has a lot of sample code.
    Ronald
    Friday, February 13, 2009 5:44 AM
  • Thanks, im just confused a little which is why I need help here.

    I cant debug into VS as the symbols arent being loaded... so seems like it wont even load the workflow .NET assembly and looking at the trace, nothing is being produced for some reason.

    the SDK talks about IPlugin and what not.... so not sure if I need to implement this interface, and perhaps others, to make a .NET workflow assembly ?
    Need 2 be back @ MS - MS All the way! Follower since 1995 MS Super Evangelist| MSDN Forums Moderator
    Friday, February 13, 2009 8:29 AM
  • Not plugin, but workflow activity. Here are the samples: http://msdn.microsoft.com/en-us/library/cc151229.aspx
    Ronald
    Friday, February 13, 2009 7:27 PM