Skip to main content

I'm very new to K2 [Blackpearl] and could do with some help.  I would like to create a process that is started when a new file is added to a folder on a server.  I have created a windows services that can take care of the listening for a new file in a certain directory but I am now stuck as to how to create the workflow using the k2 designer for Visual Studio.  Hopfully this make sense.  Any help would be appriciated thanks.

Hi,


Did you have already created the workflow design and you now want to instanciate it ? or did you need help to create your workflow design?


If you need help to design the process, the better for you is to have a look to the K2 documentation. You can open the K2 User Guide (start menu >> Programs >> K2 blackpearl >> K2 blackpearl documentation)... after have a look to the "K2 tutorials" section and espacially into "Building a process in the K2 Designer for Visual Studio".


After to connect your Windows Service with the instanciation of the process you will design, you need to use the SourceCode.Workflow.Client assembly. In the help file, see the "K2 developer reference >> Class library reference >> SourceCode.Workflow.Client assembly". The methods you need to use will be :



  1. Open (a connection to the K2 server)
  2. CreateInstance (of your process)
  3. Data setting (I guess)
  4. StartInstance
  5. Close (connection)

This is really general but I hope this will give you a way to follow :-) 


Hey nj, if you do not have k2 documentation, go here http://www.k2underground.com/files/folders/technical_product_documents/entry23558.aspx.

 I would go through documentation first, you will find many handy functions and code snippets in it.

 

 


Here's a good article with an attached project showing how to instantiate an instance of a process using the SourceCode.Workflow.Client assembly.


http://www.k2underground.com/blogs/smoreclientcode/archive/2008/12/15/starting-k2-process-from-a-web-service-and-beyond.aspx


Reply