K2 throwing Error "Item not found in this collection"

  • 17 April 2012
  • 3 replies
  • 43 views

Badge +4

Hi,


I am getting this error in the Smartobject Event - "Item not found in this collection" , Im not quite sure why this error is coming . I am passing the data to the required datafields from the smatobjects .


Pleas let me know if somone has came with this issue and its possible solution .


 


Regards,


Taher


3 replies

Badge +10

When do you get this error, at design time or run-time? 

Badge +4

Hi,


It was during the runtime.


 While accessing the method from Smartobject event in the Workflow ,it allowed about 10 return types( as it was mapped while creating a service method in the smartobject ) but still it was throwing error. But while executing the smartobject method using SOS tester I found that the method was not returning all the object . Not quite sure what happened...


Hope this Information helps you/


Thanks,


Taher

Badge +10

Hi Taher,


I would suggest that you enable SmartObject logging to narrow down exactly where this exception is happening. You can do this by following the instructions in the following K2 KB article: http://help.k2.com/en/kb000298.aspx


If you are using a Custom Service Object then I think it might be a property that is not being returned or that the method decoration does not include all the properties or a property is named incorrectly. Hopefully the SmartObject logging will point you to the actual method where the error is happening and you can then further investigate it from there.


If you cannot figure it out, paste some of the error information or (if it is a custom service) the service broker code of the method that is failing.


Hope this helps!


Regards,

Reply