Skip to main content

Hi there,


 


I have an Orders web service with a GetOrderItems method that returns a list of order items for an order. I have another web service with a  method called ProcessOrderItem that takes in an order item as a parameter. I need to call the ProcessOrderItem method for each order item in the list returned by the GetOrderItems method.


 


I have created the Smart Objects for both web services. I have managed to get a serialised list of order items by calling the Read To Serialised List method on the Order web service Smart Object and the serialised list looks as follows:


{"$type":"OrderItemt], MockServices, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","$values":s{"$type":"OrderItem, MockServices, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","barode":"2","nappi":"2"},{"$type":"OrderItem, MockServices, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","barode":"3","nappi":"3"},{"$type":"OrderItem, MockServices, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","barode":"4","nappi":"4"}]}


 


How can I iterate through the list of order items such that I can call the ProcessOrderItem method for each order item.


 


Thanks in Advance,


Thamsanqa

I hope this help you, I need to do the same and I will follow these links:


http://help.k2.com/en/kb000685.aspx


http://my.safaribooksonline.com/book/software-engineering-and-development/bpm/9780470293058/k2-blackpearl-tips-and-tricks/looping_through_an_activity_for_each_sma


 


Thanks Krinavtm,


Is there any way to do this with a Smartforms rule action instead of within the workflow?


Reply