Skip to main content

Hello Community,

 

Suppose I have a "BusinessPartner" SmartObject with data stored in multiple back-end systems but I want to be able to deliver the data to the SmartObject in a uniform fashion no matter where the data is stored and in what format.

Example ListBusinessPartnerAddresses(businessPartnerID, out addresses)

 

The reason for this is that I want the SmartObject to be loosely coupled to its data sources, so that when the data is migrated to another source I just have to create a new ListBusinessPartnerAddresses method in the ServiceObject for that data source and update the reference in the SmartObject.

 

When data is retrieved from SAP I am able to create a K2 Connect ServiceObject and transform the data retrieved from SAP into my desired format using a custom code function. However when the data is retrieved from a webservice I register a new ServiceInstance in the "SmartObjectTester" I seem to have no control over the methods and seem to be forced into adding the following steps in my SmartObject (and would much rather have these encapsulated in the ServiceObject method)

 

  1. Serialize request object
  2. Call webservice
  3. Deserialize respons object
  4. Transform data

So finally my question: Where have I gone wrong or is there no way to do this?

 

Connecting to directly to different backends is going to require separate Service Instances, which is going to require a separate SmartObjects.

 

I would suggest you abstract away the fact that you are connecting to different backends by using either a WCF service or an endpoint assembly loaded into K2.  That way K2 sees it as a single backend, but you can write code to pull data from anywhere you want and consolidate it however you would like before returning it to K2.


Ok, too bad, but thanks for the reply!


Reply