2026 Jan 29 10:47 AM - edited 2026 Jan 29 10:49 AM
Hi everyone,
I wanted to check with you about an issue I’m not able to overcome. I watched your video on the topic “Future-proof your scripts in SAP Cloud Integration” by @MortenWittrock on DevOctoberFest, interesting one
In the past, I have been using the Exchange object for several things, and I’d like to future-proof those scripts, but I haven’t been able to get it working.
In my tenant, I’m testing this very simple Groovy script:
// This Groovy Flowstep Version 2, running with Groovy 4, Downgrade the script if older behaviour needed.
import com.sap.it.script.v2.api.Message
import com.sap.it.script.v2.api.proxy.Exchange
def Message processData (Message message)
{
Exchange e = message.exchange
message.setProperty("ExchangeName",e.getContext().getName())
message.setProperty("GroovyVersion",GroovySystem.version)
return message
}
This is exactly the same script used in the demo (Min 27 Second 17), but in my tenant, even after upgrading the Groovy version for this script, it’s throwing the following exception (during simulation and also in runtime):
unable to resolve class com.sap.it.script.v2.api.proxy.Exchange
@ line 4, column 1.
import com.sap.it.script.v2.api.proxy.Exchange
Am I missing something? I’m finding it difficult to leverage this Groovy 4 feature, and I couldn’t find much information on the provided classes either.
Thanks in advance for your help!
Best regards,
Mikel
2026 Feb 18 2:04 PM
Hi,
You probably mean this class:
import com.sap.it.script.v2.api.Exchange
2026 Feb 18 2:04 PM
Hi,
You probably mean this class:
import com.sap.it.script.v2.api.Exchange
2026 Mar 02 9:52 AM