Where do you put reusable code in a workflow - K2 blackpearl

  • 26 March 2008
  • 4 replies
  • 0 views

Badge +3

I am making a call to an external database for logging/updating statuses during activities of a workflow, I want to write the class/method once and be able to call it from several different events in any activity of the workflow.


 Scott


4 replies

Badge +9
Make a class library project and reference that assembly from your processes.
Badge +3

Any gotcha on deployment or version issues when doing this?


 Thanks in advance,


 Scott

Badge +9

Scott,


The DLL should be deployed and versioned with the process (this is handled automatically by K2 deployment).


I go into more details about Assembly versioning here:


http://k2underground.com/blogs/bobblog/archive/2008/01/14/custom-assembly-versioning-within-a-k2-process.aspx


 


HTH.

Badge +9
I would recommend that you GAC your assembly, I have run into issues where the K2 environment 'forgets' how to find your dll if it is referenced directly.  Kind of a pain sometimes, never did get to the bottom of the problem (may have been somethng I was doing wrong)

Reply