K2 [blackpearl] Dynamic SmartObject Services

A full example of how to implement services for SmartObjects including transactions, exception handling, discovery and execution.



Hi guys,

 Due primarily to a lack of understanding on my part of how we use AppDomains with SmartObject Services, I made an error in the architecture whereby I used a static class for DataAccess which leads to unreliable behaviour.

If you have based any SmartObject Service on this code, please update asap to avoid problems.

Cheers,

Seb

 
 


Hi guys,

This is a full SmartObject Service example which enumerates a Microsoft SQL Server 2000 / 2005 database dynamically. There are a few restrictions as it only displays tables with Primary Keys. I have tried to keep this as standards driven as possible and have created a framework, which simplifies creating these services.

Items included:

  • Exception Handling: All Exceptioons are handled such that the K2 Server is made aware of these
  • Transactions: Transactions are fully implemented and are enlisted in SmartObject transactions
  • Dynamic Schema Generation: One ServiceObject is created per table and exposes each column as a property. The standard CRUD methods are surfaced along with a List method
  • Exact Match FIlterring: The List method supports exact match filterring. I am waiting on the final decision from LABS before implementing wildcard filterring
  • Data Connection Interface: I have provided an interface which should simplify the creation of other SmartObject Services within the framework
  • Authentication Support: Both static and impersonated authentication is supported

Cheers,

Seb