Issue with custom service broker


Badge +7

Hello, Apologies for the rookie post......

 

I have created a custom static service broker from a .net class based on:

 

http://help.k2.com/onlinehelp/k2blackpearl/devref/current/default.htm#Creating_Custom_Static_Service_Broker.html%3FTocPath%3DExtending%2520the%2520K2%2520Platform%7CSmartObjects%7CCustom%2520Service%2520Brokers%7CStatic%2520(Described)%2520Brokers%7C_____1

 

I can register the service type

I can add a service insatnce

I can create a smartObject

 

When I go to to execute te one method that service has in SOTT I get a Object Not Set to an instacne of an object error 10702

 

owever, when I check the database I can see that the the method did indeed execute and the expected data is present in the DB with the coreect timestamp.

 

I have tried recreating/refreshing  the smartobjects and service instances and redploying the .dll but I still get the same error.

 

Anyone had this before?

 

I have addded the required constructor to avoid the documented reason for this error.

 

Thanksin advance

 

 

 

 

 


2 replies

Userlevel 1
Badge +8

I would suggest if you have VIsual Studio on the K2 server you can open your project and attach the Visual Studio debugger to the K2HostServer process. Set a break point for your method and execute the SmO in the tester again. You should hit the break point and able to step through the code to find out where it is falling over.

 

If you cannot install Visual Studio on the K2 Server. You can setup Remote Debugger for Visual Studio which presents its own challenges but works great for debugging as well when Visual Studio isn't on the server so you can attach the debugger from your workstation.

 

Alternatively, you would need to post the code (properly redacted for security purposes) here so a community member could take a look.

 

Hope this helps.

 

S.

Badge +7

Hi Scott,

 

Thanks for the advice,

 

That was indeed what I did and the issue was related to properties. I wasn't handling the properties correctly in my code in so much as you have to return the class in its entirety in order for k2 to process each string array.

 

 

 

 

 

Reply