Tuesday, January 14, 2014

Code Activity Assembly Cache Updating

How to develop code activities for the Workflow Manager you can for example read here.
When you have developed the second version of your activity you need to update activity DLL cache. Otherwise, the old version will execute in your workflow. Let's see how to do it.


  1. First of all, stop Workflow service:
     
     net stop "Workflow Manager Backend" 
    

  2. Then, copy updated library file to Artifacts:
     
     copy <path\to\MyActivities.dll> "C:\Program Files\Workflow Manager\1.0\Workflow\Artifacts\" 
    

  3. And copy library to WFWebRoot:
     
     copy <path\to\MyActivities.dll> "C:\Program Files\Workflow Manager\1.0\Workflow\WFWebRoot\bin"
    

  4. Open "Developer Command Prompt for VS2012" and force reinstall activity DLL in GAC:
     
    gacutil /i <path\to\MyActivities.dll> /f
    

  5. Start Workflow service:
     
    net start "Workflow Manager Backend"
    

  6. Restart Visual Studio to refresh activity in toolbox.
IIS reset is not required.

Full batch (run in "Developer Command Prompt for VS2012"):

 set MyDLL=<path\to\MyActivities.dll>
 net stop "Workflow Manager Backend"
 copy %MyDLL% "C:\Program Files\Workflow Manager\1.0\Workflow\Artifacts\"
 copy %MyDLL% "C:\Program Files\Workflow Manager\1.0\Workflow\WFWebRoot\bin"
 gacutil /i %MyDLL% /f
 net start "Workflow Manager Backend"

1 comment:

  1. Great the extra step to put the dll to GAC worked for me. Thanks.

    ReplyDelete