Recently I was playing around with Citrix WorkFlow Studio 2.0. Specifically I was writing some custom activities to help with data connections, etc. Before I get into the tech contents, lets provide a little background on WorkFlow studio and how we can extend it with our own code. If you want to see an brief unabridged of WorkFlow studio click the link below. You can also check out the Citrix site here
Click here to download the Workflow Cache Cleanup Utility

WorkFlow Studio Overview (Click me to expand the overview)

The interesting thing about WorkFlow Studio (because its built on Windows Workflow Foundation) is that you can write your own activities and make them available for use in other activities and allow other users of WorkFlow Studio to use them as well.

So, developing your own custom activities is certainly an iterative process, write some prototype code, deploy it to the GAC (Global Assembly Cache), test the results. Rinse and repeat :).

While doing this, I noticed a interesting thing happening. I would deploy my test activity to the GAC, then I would add it to workflow studio. All is peachy :). Then i would remove it from the GAC, but it would still show up in workflow studio. This was puzzling me. WorkFlow Studio must be caching the information somewhere!

I dug around a little, but couldnt really pin point where this was happening, so I figured, go right to the source :), so I shot an email over to Pete Shulz, Product Manager for WorkFlow Studio (you can follow him on twitter at http://twitter.com/schulzpm)to see if caching was indeed happening. Well, Pete did inform me that WorkFlow Studio does indeed cache previously added components. He also pointed me to this articles up on the Citrix Developer Network, which explains it in more detail.

(http://community.citrix.com/display/wf/Tips,+Tricks,+and+Best+Practices)

I thought this was good, but I didn’t really want to dig around in files every time I wanted to clean up my orphaned activities, so, like Tim Allen, I wanted more power!! What I wanted was a quick little utility that i could run that would list the cached activities and then allow me to selectively delete the ones I wanted to. So, I had some extra time last night so figured I would through something small together. that’s what I build. You can download the app here. Its not a pretty app, but it does get the job done. NOTE: Before we modify anything in the config file we always make a backup of it. Those backups are located in the “C:UsersJohnAppDataLocalCitrixWorkflow StudioWorkflowStudio2.0.0.0’ directory and will have a “Backup” prefix to the file. Like the following screen shot.

image

Initial loaded screen. It lists your currently cached activities. Here we show you the name, assembly name, weather or not it is shown in the toolbox, and what the toolbox path is (this is where you can find the activity in the activity folder structure)

image

Once the activities are loaded, you can them multi-select activities and right click, from the popup menu, you can then choose to delete the selected from the cache.

image

So that’s it for this article. You can download the app from here, but remember, I provide this only as a utility, because I use it during my development process. Please use this tool at your own discretion.

As always, you can contact me via this blog, or ping me on my twitter account (http://www.twitter.com/johnmcbride)