Figaf runs Figaf (SAP CPI Git Groovy scripting)

This week I wanted to try to use our Git for SAP CPI tooling to make some new development and see how it would work out. I wanted to create an SAP CPI microservice to convert XML to PDF, you can see all about it here.

The idea with our Git integration is to take all content from your SAP CPI and API repositories. So it will synchronize all the content in the CPI repository to the Git. The user will then be able to see each iflow with the individual resources. In the Git repository, we had templates to some Gradle plugins. They allow you to upload the content directly to your SAP CPI agent and deploy it all from your IDE like IntelliJ or Eclipse. This speeds up the development because you don’t need to edit files in the WebIDE or upload them manually.

A real editor gives you the option to get syntax highlighting, autocompletion and debugging options. To achieve the running and debugging option we are able to leverage a real test performed with SAP CPI.

Our ide was to make it as simple for normal integration users to be able to edit and run their Groovy scripts without having to know a lot. In my free course about Create SAP CPI Integration faster, I’m covering how you can use the Figaf IRT tool to create a Git repository and configure all parameters, so you can use this development approach. It probably takes you 15 minutes to the repository working. So it is pretty simple.

You can see what the project was about and how the tool worked in this video.

Lessons learned

This was the first time I really used this function to create a useful Groovy script.

  1. It was possible to run the Groovy script pretty simple with the test data generator. That way I could run the message and get the correct output back. Once I was developing the groovy script I could then run it locally in my IntelliJ and even run debug.
  2. Out standard git template does not allow .jar files in the .gitignore file. It is best practice not to have jar files in your git repository because they take up a lot of space. In most cases, you will find the files in a maven repository and use them at runtime. A workaround we used was to add the path to the jar files with the following line in the .gitignore file !demo/XMLtoPDF/src/main/resources/lib/*.jar . ({package}/{iflowname} /src/main/resources/lib/*.jar .You can then add lines for all the iflows you are working on with the tool.
  3. The more you understand Git and Gradle the better. It will make it easier for you to use this workflow.
  4. Our comparison did not understand that the payload was binary for comparison. So it probably does not make a lot of sense to have test cases for it. In the PDF you have a time that is increasing and most of the content is binary. It was possible to create manual test cases and use it to check if the payload was successful.


It does take some time to get use to develop with the Figaf tool to create your SAP CPI iflows. Once you do understand how to create a test case and run it. It is much easier to work in the confines of IntelliJ when you are experimenting and do not know what you need to fix for the code to work.

Try it out your self.

I hope you want to try it out your self. It takes 15 minutes to get started and then you can have all your SAP CPI content in a git repository.

Just go to download it at Figaf IRT

Seneste nyheder fra Figaf