Web API in K2 Processes

  • 3 July 2013
  • 3 replies
  • 10 views

Badge +1

I need to call a web api using httpclient in server events to get/set data;


These packages are available on nuget, how do I reference libraries from nuget in my process?


 


3 replies

Badge +5

Hi eckardm,


Not familiar with Nuget, but if you can find the DLL to be referenced, just follow the steps in this blog (http://www.k2underground.com/blogs/blackpointtipsandtricks/archive/2009/04/01/using-the-reference-event-wizard.aspx). In VS, the References button is on the top right of your design canvas.


If you want to write codes in VS, you can use the "Default Server Event (Code)" wizard. Right click on the event > "view code" > "event item" to start editing.


 


JK


 

Badge +2

Follow up question on this - so any time the web service gets  updated and deployed, the .dll would also have to be updated in K2 and workflows deployed?

 

Badge +7

Kim,

 

For minor updats to a webservice, you don't have to update K2.  For example, I just updated a web api with a new public key and when I ran the K2 form it saw the new update.  It is possible you may need an IIS reset or to refresh the dynamic web service if you make major modifications...like say adding a new parameter.

Reply