Skip to main content

Hi,

What’s the recommended route to migrate a form from a Dev environment which uses a SMartobject to a Live environment with a SQL table?

Will moving from SMO to SQL break anything in the form?

What’s the best way of achieving this? I can package it up on Dev, but when deploying, can we use a SQL table on Live rather the Smartobject? If so, again will connections in the form remain intact?

Thanks

Ideally, you would change DEV to also use a SQL table instead of SmartBox. Am I understanding you correctly that DEV is using a “basic” SmartObject that stores the data for you? If you have a SQL database available, create a Service Instance that references this database and then change your SmartObject to “Advanced” and map its properties to your SQL table via the Service Instance created above. I can provide more detail if this doesn’t make any sense.

Bottom line is that you want your DEV/TEST/PROD environments to be configured as closely as possible so that you can simply build a package in DEV and promote it to TEST and PROD without having to make any changes. Using Service Instances is the best way to accomplish this - as long as the service instance has the same name across environments, it can point to different databases and - as long as the database schemas it points to are the same - you won’t have to make any changes during deployments.


Thanks tbyrne,

In the end once the form structure had been finalised, the developer ended up replicating the Smartobject in a SQL table and reconnecting it while on Dev (very time consuming). On the flip side, when I migrated it to Live, it was just a case of changing credentials to use a Live source and it all worked.

You may wonder we used a Smartobject to start with, rather than a SQL Table, well this is down to K2 permissions. If the developer used a SQL object, then I would create the SMO from it initially in K2, but if amendments are needed (i.e. new field added, data types changed etc), they would have to contact me to keep updating them. We can’t really give the developers admin permissions to K2 to update SQL connections.

Are you aware of any other method of allowing Developers to use a SQL object on a Dev environment, with changes auto updated in K2 to reflect changes in the SQL table, without giving additional k2 permissions or use the tester tool to refresh and re-publish the object?

Hence this was why the developer created it all using a standard Smartobject to allow for painless changes, however the end goal was it use SQL tables, so it was a replication of work to use SQL tables and re-do all rules/connections.

Hope that makes sense.

Thanks 


Hmm - all that the developer would need is the ability to refresh the SQL Service Instance via K2 Management. You are right, though, in that there is no way to grant that permission without granting the ability for the developer to actually edit the SQL service instance. There is some level of trust/training to make sure that they don’t do so.


I don’t know if this is relevant:

https://help.nintex.com/en-us/k2five/userguide/current/Content/K2-Management-Site/Integration/ServiceInstancesSecurity.htm

But now you can grant user access to specific service instances, without needing to grant them overall K2 Server Administrator rights.


Hi @Sharpharp1 

Did these responses help solve your question?


it is possible to manipulate the sodx file of the smartobject to allow you to change the service instance to which it is connected. It does involve manually changing the xml code in the background and then re importing it. There is a flag in the xml describing if this is a smartbox smart object or not. As long as your input and output properties are the same you should be ok.


Thanks all for the responses.

TinTex - From the link, it only looks like you can assign the rights to users to add/delete/modify security rights. But by doing so, wouldn’t this grant users access to all Objects?

If this was possible to assign rights to one specific object then it would be fine, otherwise this would be a security risk if allows users these rights.

In an ideal world, I am imagining that I could create a Smartobject from an SQL table/Stored Proc for a user, then grant the user rights, but whenever they add new columns/change data types, it automatically updates the associated Smartobject without me having to go into the tester tool to refresh and update the Smartobject. Anyone know if this is on the roadmap? It would make the product such easier to scale out to a wider audience and less of a burden on Administrators.

Thanks

 


I see, so it sounds like what you are looking for is a mix between how SmartBox works and SQL Server service instance?

 

Such that the tables will be hosted in a non-K2 database (similar to what a SQL server service instance connection does) but when a developer makes changes to the SmartObject layer, then these changes get automatically pushed to the SQL table (similar to how SmartBox works).

 

If so, currently this is not possible, but an idea can be logged at:

https://ideas.nintex.com/

 


I see, so it sounds like what you are looking for is a mix between how SmartBox works and SQL Server service instance?

 

Such that the tables will be hosted in a non-K2 database (similar to what a SQL server service instance connection does) but when a developer makes changes to the SmartObject layer, then these changes get automatically pushed to the SQL table (similar to how SmartBox works).

 

If so, currently this is not possible, but an idea can be logged at:

https://ideas.nintex.com/

 

 

Thanks for the link, i’ll post up the idea


Reply