Question

Process WebService result in c# script

Hi community!

How are you?

I have a web service configured which returns an object collection among others parameters

Through a business process, I want to process the response of said web service.
For this, I have configured a parameter in the process..

To which, I assign the collection result of the WS as follows:

 


 

Then, in the script, I try to read the collection parameter in a variable..

The process compiles successfully, but when executing it, I get the following error

I tried several alternatives, like

var entities = Get<ICompositeObjectList<ICompositeObject>>("Tickets");

or another data type but I keep getting the same error

Any idea or example to process a collection of a web service?

 

(My BPM version is 7.13)

I attached the images to be seen more clearly

Thanks you!

King Regards

 

Ezequiel

File attachments
WS1.png31.12 KB
WS2.png11.39 KB
WS3.png34.65 KB
WS4.png20.96 KB
WS5.png23.34 KB

Like

2 comments

Dear Ezequiel,

Please see the step-by-step instruction on how to correctly retrieve and work with web service collection result in business process Script Task. 

1. To start with, here are my test web service integration settings:
Image.png

Image.png

2. In the business process we will be retrieving needed data directly from the Web Service element. 
The main idea here is to address the results collection via "_Out" suffix. Please pay attention, that we apply suffix to the method's parameter and each variable taken from the collection.

Image.png
 Regards,

Anastasia

AAlonso.29,

Hello.

Please find all of the images via the links below:

https://prnt.sc/m5x10n

https://prnt.sc/m5x0wj

https://prnt.sc/m5x2b5

https://prnt.sc/m5x2me

Best regards,

Matt

Log in or register to comment