How can I pass variables through a webservice using API REST conector?

1
0
-1

Hi, I've been trying to send data from Bonitasoft to a external webservice with no success. I'm starting with an human task, with a set of variables in a contract to pass to a form that will be filled by someone. After the form is filled, all the values are passed to a set of process variables, then, in the next task, I defined a service task with an API REST in-conector, and I'm passing the variables through the payload, but when I test it, it raises an error:

2017-12-13.png

The API call only works when I send constants in the payload, but if I try to send any kind of variable it just raises that error, this is how I'm passing the variables:

2017-12-13.png

I'm using Community 7.5.4 edition. I wish you could help me, thanks in advance.

2 answers

1
0
-1
This one is the BEST answer!

Well, the problem was that I was testing the API call in the setup windows. Variables are not set yet when setting up the conector, so that error is supposed to be raised.

I just normally ran the process and it worked like a charm :)

1
0
-1

Hi,

You should change Editor, and select a Script expression. Here the default editor allows you to send raw String data without the variables to be calculated :)

Notifications