SmartObject and Custom DB

  • 20 August 2009
  • 3 replies
  • 1 view

Badge +6

There are 8 Business processes, which follow same path (Approve/Reject). So I decided to go ahead with a single process.


The work stopper is; passing the multiple destination users to the approval activity. I thought of following approaches.


·         Passing the destination users through XML files


·         Passing the destination user as data field (comma separated)


Were as, both the approaches are not accepted by my Manager. He has suggested to make use of SmartObject and SmartObject should not be stored in SmartBox, they should be available in application database.


So I have following question,


How do I create SmartObject to be stored in custom DB?


Are there any limitations if I make use of Custom DB for storing SmartObject?


Can I access the data in the same way as Smartobject stored in SmartBox?


Is it required to create a Service to store and retrieve data?


Depending on the business rule I need to fetch different approvers list. Can we write this logic in Service? If yes How?


Thanks in advance


3 replies

Badge +8

Answers to your questions:

You can use the Dynamic SQL Service available on BlackMarket:
http://www.k2underground.com/k2/ProjectHome.aspx?ProjectID=53
After installing the Service and creating an Instance to point to your database, you can use the SmartObject Tester to easily create new SmartObjects based on your DB definitions.

You will need to have Primary Keys defined for the tables you want to use. If a table does not have a PK defined, you will not be able to create a SmO from it.
Yes, you will solely work with the SmO API's and events/wizards. There's no change compared to SmartBox SmOs.

If you use the Dynamic SQL Service, no. If you don’t want to use it, you can also consider using SharePoint Lists to store the lookup data. You can easily create SmOs based on your SPS lists and Libraries, and use them again as per normal.

Your last question is again dependant on which approach you take, but generally, passing in parameters to filter the result on are all that’s needed to get a filtered list back. If you require complex calculations however, you are probably better off writing your own. Again, sample code for a custom service broker is available from BlackMarket.

Badge +6

 


I had a look at the project, but was not able able to understand the library and classes. Can I get some reference document or white paper which can give more details about Custom smartobject?


 Thanks,


Aman

Badge +6

 


 Hi,


Usefull links to develop a customstatic smart service


http://www.k2distillery.com/2007/11/create-custom-blackpearl-smartobject.html


 


Smart Service Project template for VS 2005


http://www.k2underground.com/k2/ProjectHome.aspx?ProjectID=69

Reply