SmartObject Design Questions and Considerations

  • 10 December 2010
  • 1 reply
  • 0 views

Badge +1

I'm working on creating a ServiceBroker that uses reflection to examine our main Business Object Library and creates SmartObjects from the objects contained in that library.


So far, creating the SmartObjects is done, and was quite easy.  However, I still have to associate or join (or whatever the K2 nomenclature is) the objects together to form a single, rich, object.


 


In other words, we have an Account object, that object has multiple other objects hanging off of it (Consumers, Referrals, etc).  Some of the fields of the Account object even reference the same object (CreatedUser and UpdatedUser both reference the User object).  To put this in perspective, reflecting the 'Account' object and the objects referenced by that object creates 40+ SmartObjects, all those objects are associated and need to be presented to the User as a single, structured object.


 


From what I am able to gather, when you associate two SmartObjects in K2 they become "flattened", properties from both objects appear as a single object, so I see no way to have multiple references to the same object without trying to come up with a naming convention to use for the property names.


Is it possible to create SmartObjects that mimic simple, structured C# objects?  Am I correct in my observation that joined/associated SmartObjects are "flattened"?  Are there any examples out there that show rich, structured SOs?


 


Thanks...


1 reply

Badge +2

Complex properties, i.e. a structure with multiple properties, are
not supported by SmartObjects. Only simple properties, i.e. text, number and DateTime,
can be used.


SmartObject associations are mainly used for reporting purposes to
display SmartObjects that are related to each other and then to create
automatic join criteria between the SmartObjects.


K2 Documentation:  K2 Workspace > K2 Reporting > Custom
Reports > Create Report > Create Report Wizard - Data source


There is a blackmarket Service to create ServiceObjects from
SmartObjects.  These ServiceObjects can be used for inheritance.


http://www.k2underground.com/groups/dynamic_smart_object_service/default.aspx


There is another blackmarket Service to expose the static methods
in a .NET assembly as service methods


http://www.k2underground.com/groups/dynamic_assembly_service/default.aspx


You can also have a look at the following forum discussion with
regards to Advanced SmartObjects.


http://www.k2underground.com/forums/p/6863/21210.aspx#21210


 


 

Reply