Convert process variable from string (retrieved from a REST call with a connector) to integer

Hello there,

I have a simple BPMN model, as shown below:

I have a REST call, where I create the “debt” variable based on the retrieved response:
image

However, I need this variable to be an integer, while it is a string. Is there any way to write somewhere a script (or another way) within my model to turn the string variable into an integer?

Thank you in advance,
Smith.

Hello @smith_Johnson ,

to convert a string to a number, FEEL has a function:

I hope this helps

Jonathan

3 Likes

great … this worked :slight_smile:
Thank you so much Jonathan.

I leave here what worked for me in case someone needs it in the future:
= number(variableName) <= 500

3 Likes