Custom Client Event code

  • 3 February 2010
  • 3 replies
  • 1 view

Badge +5

All of our client applications use custom code to access K2 (via the K2ROM API).


In K2.net 2003, we regularly created custom Client Events. Our standard procedure was to write client side code for each client event. These would read:


public void Main(ClientEventContext K2)
{
    K2.AddWorklist("OurCustomPlatform", "OurCustomDataString");
}


How can we accomplish this in blackpearl?


Thank you!


3 replies

Badge +5

Thank you!


We are going to have to repeat these steps hundreds of times. Are there any articles on creating custom event wizards?

Badge +10

From what you’ve described instead of creating a new event template it might be much simpler to modify the default client event template that K2 Studio uses.   This way you modify it once and it will always use it for any new instances.  You do have to be careful that if you apply an update that K2 might overwrite your customization but it wouldn’t affect processes you’ve already created and you could simply copy the changes back after the update.


 


Note this wasn’t possible with K2.net 2003 since the event template wizard generated code at the end of the wizard steps.  However, with blackpearl and blackpoint, K2 is now interpretive and will use the same code no matter what options you select when going through the wizard steps.


 


The location of the default client event template is located in a similar path to the one below on you K2 Studio workstation.


 


C:Program FilesK2 blackpearlBinDesignTemplatesCSharpWindowsWorkflowExtender1033Design.ClientEventItem


 


If you decide you want to create a new event wizard here is the tech article:


                http://k2underground.com/media/p/21896.aspx


 

Badge +5

Thank you - that's good to know.


Unfortunately we want to vary the platform by map, so making static changes to the default template won't solve our issue.


The tech article is what I was looking for. Thank you!

Reply