Skip to main content
Nintex Community Menu Bar

Smartobject method

  • April 24, 2009
  • 12 replies
  • 13 views

Forum|alt.badge.img+8
I created a smart object and added a method to execute a stored procedure in a database and return the data. but when i integrated the smartobject with my infopath form, the input and output paramters group are always empty. What should i do to see the input and output properties listed in thire respective groups??

12 replies

Forum|alt.badge.img+8
  • Author
  • April 29, 2009

does anyone have answer to this??


Forum|alt.badge.img+11
  • April 29, 2009

Your SmartObject should work just like any other SmartObject.  What service is it connecting to?


Forum|alt.badge.img+8
  • Author
  • April 30, 2009
It is connecting to dynamicsqlservice. i tried with dynamicsqlspservice also..both of them are not working..

Forum|alt.badge.img+6
  • April 30, 2009
I recommand to debug the Service objects, so that you can understand what is going on in and out, in some case's it is failing thus you are not getting input and output parameter in smartobject. please verify...

Forum|alt.badge.img+9
  • Nintex Partner
  • April 30, 2009
See the known issues in the notes for Dynamic SQL Stored Service broker.  There is a known issue that the broker stops enumerating if it hits a SP that has similar named input parameter and output column names.

Forum|alt.badge.img+8
  • Author
  • April 30, 2009
I tested the smart object with the tester tool.. but certain methods did not show these input properties. I have another method based on AD Service but that is working fine

Forum|alt.badge.img+8
  • Author
  • April 30, 2009
Could you please explain a bit more??

Forum|alt.badge.img+6
  • April 30, 2009

What Jonny has responding is absolutly right, if you have Stor proc that uses input parameter and column return param from Select statment are same, service broker will not work. I think, this case it's unable to fetch the information from DB and failing. 

Create the service instance through K2 workspace, you come to know where it was failing, do not use the Broker management.exe for createing the instance.

Hope you understand.

 

 

 


Forum|alt.badge.img+8
  • Author
  • April 30, 2009
what are the modifications required in the service broker?

Forum|alt.badge.img+9
  • Nintex Partner
  • April 30, 2009

The reason is that in the code that adds the parameters, we first loop through all the SP params and add them as input params for the service method.  The second portion then does a DescribeSchema call to get the column information.  There is a loop that adds each column as a output param for the service method.


Now the problem is that if the same param name is the same, you will get a key error as the code tries to add a param with the same key (i.e. the name).  The correct thing would be to add the param and indicate that the direction is in/out.


As the broker was done pretty quickly (it was coded, tested and debugged in about 4-5 days if I recall correctly), so I guess we didn't take this into consideration.  i.e. populate the params and column names into an array before adding them.


If you have time, you are welcome to modify the code and get this working properly or you could wait for the final supported versions in the upcoming 090x release.


Forum|alt.badge.img+8
  • Author
  • April 30, 2009
But i do not have parameters with same input and output names. In fact, one of the methods that i created does not even have a input parameter.

Forum|alt.badge.img+9
  • Nintex Partner
  • April 30, 2009
I guess you have to then attach a debugger with the source code and troubleshoot from there.  Normally I put a breakpoint at the exception handler and I can see the exception message thrown.