Smartobject Method changed from List to Execute after deploying workflow to production

  • 18 June 2019
  • 6 replies
  • 57 views

Hi everyone,

 

Affter deploying a workflow to production. The method in service object has changed from 'List' to 'Execute' . I compared the stored procedure in both envirements "dev" and "production", it's the same. 

 

Any idea how to fix it please.

 

Thanks 

 


6 replies

Hello Mounir,

 

Can you check and compare both the DEV & PROD Database to see if the tables referenced perhaps dont' have a Primary key set or maybe a column is missing somewere.


Or perhaps it could be related to this : https://help.k2.com/kb003137

 

Regards,

Sello

Userlevel 5
Badge +13

Please try to refresh your SQL Service Instance on PROD and see if that correctly refreshes the type of stored procedure

Badge +3

We're also having this exact issue. Our scenario:

 

1. We created stored procedures on our Cert environment, both in SQL Server and the K2 service instance.

2. Our mistake: Before refreshing our Production environment with the stored procs, we deployed a solution package from Cert to Prod. This created smartobjects with no SPs behind them in the service instance.

3. We then refreshed our Prod database from Cert by doing a full database drop and add, which got the SPs into Prod.

4. After this, we tried redeploying the package from Cert to Prod. The smartobjects bindings were showing as broken, and the only method available to us was the Execute method, whereas in Cert the only one available had been the List method. (Note also: All the rules citing these SOs are using the List method.)

5. We also tried selectively refreshing the affected SOs from the service instance, but the method bindings remained broken and the only method available remained Execute. This remained the case even after multiple attempts to redeploy, and during redeployment to create new versions of all the views and SOs.

 

Any ideas?

Badge +3

Also note that our final deployment came back all green.

Userlevel 6
Badge +16

Hi,


 


Does the Execute method show up if you create a test SQL service instance in Prod? Sometimes, the issue can be related to SQL permissions, are you using K2 Service Account as the authentication type? Does the account have the same permissions similar to Cert? 


 


Perhaps, you can start by giving a higher permission and see if that will go through. If you change Use Native SQL Execution parameter of the service instance, then does it work?


http://help.k2.com/onlinehelp/k2five/userguide/5.2/default.htm#ServiceBrokers/SQLServer/SQLService-Troubleshooting.htm#splinkedserver


 

Badge +3
This turned out to be a problem with our stored procedures themselves. When we built them in our Cert environment, they still had direct references to the Cert database in the query. These came over into Prod, which couldn't find the database. There were no syntax errors in the stored procedures, so the SmartObjects got created fine and the deployment process was green, but since the SP was messed up, K2 must have defaulted to creating the Execute method for the SO. Fixing the SPs and redeploying the affected forms and views fixed the issue: The SOs got the proper List method, but note that we had to delete the forms, views, and SmartObjects from Prod before we could successfully redeploy.

Reply