I have a running K2 solution that uses a SmartObject of a sharepoint list.
According to business needs, i had to export the sharepoint list data to SQl Server.
Is there a way to change the smartobject connection to read from SQL table without making any changes in the workflow or smartforms side ?
Solved! Go to Solution.
I haven't tested this but I believe this is possible by changing the service object method bindings.
Edit you smartobject in the designer or K2 studio, select a method and edit it
then change the service object method
Thank you for the response,i've tried to change the service object method but actually the service object method is not editable and can not be changed, only you can edit the the method properties but not the method itself.
I believe the Service object method itself is not editable from K2 Designer; this is how K2 "sees" this object from which ever back-ends it is; the edit will need to be made on the back-end.
So if the data source is now SQL instead of Sharepoint, was a SQL server service instance created?
If this list was recreated as a SQL table, usuallly the Table Service Object will have a list method that you can map to this get list item method. Then the Smartobject Properties and Service Object properties will need to be mapped accordingly.
I already have recreated the lists as a SQL table and also created the SQL server service instance.
But i'm asking if there is a way to map the properties and methods of the sharepoint list smartobject and the SQL table smartobject ? so that i can reduce the amount of change that need to be applied to the workflow and the smartforms due to the change of the data source.
Yes, you can do it one of two ways. Either edit the smart object in the Web Designer or in a thick client designer. I actually prefer the 2nd method using the thick client designer due to the stability of the tool and you actually get to work with a physical file that you can make a backup of before making changes to give you an opportunity to roll back if necessary. The key here is to not change the method or properties names on the smart object itself.
Launch K2 Studio or Visual Studio and start a new blank project. I would name the project the same name as the category where your smart object lives today if you want it to show up in the same place. It isn't critical as the category structure is purely to organize for human understanding and isn't referenced when the product is looking for a smart object. That is done by System Name and/or GUID of the SmO.
In the new blank project, you will open the K2 Object Browser, find the smart object you want to change, right click and choose Save to Local.
A couple of key points about this approach that makes it desirable is that you can:
I used to acutally mention and teach this capability in my training classes as it is good approach to map out a data structure if the actual data sources aren't readily available.
Hope this helps.
Hello Scott ,
Thank you so much for your support and guidance.
As you said, there is another way to edit the smart object in the Web Designer, actually i'm trying to figure out how to do it but it seems not possible to edit it from the designer side. Could you please guide me through this ?
Thank you for the consideration.