Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
DG
Active Contributor
Which scripting capability in SAP Cloud Platform Integration become the dominant one?

I had a conversation with a client about which scripting language was better to use in a CPI world. So I wanted to understand a little bit of work what's actually been used in this regards. In some of the scenarios that I'm currently developing, I have a number of Groovy Scripts to make it work. Is it the right choice. I’ll leave the client at some point in time then it should be possible to maintain the code itself.

I think one of the key concepts that you don't want limit the number of scripts so they are easy to maintain and keep a shared repository of what's going on. In an organization have a limited number of developers that can develop your integration.

You may have the best javascript programmer, but if they are not involved in the interface development it does not matter. So the scripting should only be for the developers in the integration. You only have skills then it will probably be wise to stick to one language. So you should probably focus on just making one language the default one. And it would be wise to choose something that other also is working on.

I wanted to check what was actually being used in the SAP standard flows as this must be where is he is actually adding most scenarios and scripts.  So I have added 18 different packages to my tenant. I was looking at the ones updated most recent.

Then I used the Figaf IRT tool that allows you to download all the content from your CPI tenant you can use this to understand what the changes to your scenarios.

Groovy


Out of the 228 iFlows I have on my CPI tenant, there are only 28 groovy scripts from the SAP.  And probably the same that I have created as testing and experiments. The scripts that I have written contains 3 lines of codes, so they are not complex just many.



 

Javascript


The Javascript is supported but I have not been able to find any iflows where there was js in. I could only see the scripts that I have added.



There may be some projects that can be made a lot easier in Javascript because of some of the libraries that exist or you are an excellent Javascript programmer. 

 

My take


My take is a bit strange that SAP is able to predefined content without GroovyScripts when I have to build some many scripts to make my part work. I could become better at creating the scripts and I can see that a lot of cases can be replaced with XSL.

If there is not a lot of other developers using the javascript option, I would try to prefer the groovy scripting.

I think they also have a better option to control the flow to not have wait steps and they have been streamlining the APIs to make it easier to run without scripting.

If I remember correctly, then it was best if you could avoid the scripting and use the other functionalities. I think this is a good advice, though it will be impossible in some scenarios. I have started doing a script, then found an XSLT would be easier.  

If you are doing scripts we added a functionality to the Figaf IRT application that will generate groovy scripting stub so you can run the test in Eclipse without deploying in CPI. It will speed the development of the scripts.

 

Are you using JavaScript in CPI and how is it performing?

If you are using javascript please share and educate me that it is more used.
Labels in this area