Symptoms
What is the purpose of Extend method in ServiceAssemblyBase
Diagnoses
Hi,
What is the actual purpose of the Extend method in ServiceAssemblyBase class. We have to override this method in our service broker, but I have never seen and done an implementation for this method.
All of my servicebrokers are working fine without this method implementation.
Can you please explain me the reason of this method? If it is possible, can you please give me sample code that shows how this method implementation should be?
Resolution
In short, the client doesn’t have to worry about the Extend method in their custom broker, because they are creating all their serviceObjects from the DescribeSchema method.
It’s only when you want to createupdate a SmartObject via our API which you call to deploy the SmartObject that you will need to use the extend method to create the serviceObjects for the new SmartObject to map to.
All the services that create the serviceObject when you registerupdate the service instance will be able to create SmartObjects that map to those existing ServiceObjects.
An example of when extend is used.
When you create a new SmartObject inside K2, the SmartBox service instance does not yet contain the serviceObject for that new SmartObject, so when deploying in K2Studio we call the API which will then use the extend method in SmartBox Service create a new ServiceObject for this SmartObejct being deployed, and it also refreshes the serviceInstance after it created the new ServiceObject