Product Information
Git integration for SAP CPI and API Mgt
SAP CPI is a great platform for creating integrations. It is a lot more flexible than SAP PI/PO so you can create the integrations required in the cloud world. You will in most cases need to edit files like groovy scripts, XSLT and other in one go. The build-in Editor is not optimal for editing most complex files.
You will therefore often have to edit them in their separate folders and you will have to maintain the scripts manually. It also means it is difficult to get other developers to help in a project.
Goal
We wanted to make a solution that enables developers to be able to edit and create scripts in their favorite IDE like Eclipse or IntelliJ and then directly from here upload scripts to CPI and deploy the iflow. Without having to go to the Web tool. It should be so easy to set up that there is no excuse for not using a better IDE.
How it works
We found a solution where Git and Gradle plugins could help and make the process even faster. It can be a little tricky to get it to work, so our effort has been in making it possible to run all cases with as little effort as possible. We, therefore, deliver a repository with all the template configurations that you need to fill in.
In the Figaf IRT we already have a way that enables you to download all CPI iFlows. Then we could take the data and connect with a Git repository.
The process flow is in the following diagram.
- Figaf IRT is connected to your CPI system. It will download all iFlows.
- Once Figaf IRT is connected to your Git repository, it will create a folder structure with all packages, iflows, and templates for running the plugins
- User will pull the data from the Git repository. They will copy the content of the template files and create their own build files.
- Once it is done user can edit scripts in the IDE, upload and deploy changes to one iflow.
- Users can commit changes or Figaf IRT will update the changes made to iflow
- Once development is done for an iFlow. Figaf IRT can be used to transport the iflow in the landscape
It takes 10 minutes to get started. Just check this video.
Why Git
Git is the standard development tools that most developers are using to create code and maintain it. It can be hosted at Github, Bitbucket or SAP Cloud Platform, or you can run your own Git server.
It gives a good overview of all the changes made a piece of code.
Testing
Is a big part of the development process. We have also created a plugin that allows you to connect with Figaf IRT and run some test cases that you want to make. You can just create a Figaf IRT test cases that will run for any of the changes that you make.
You will then get the results of your test running in a few minutes.
API management
The same process is true for API management. Here you can also take all your API Packages to get access to them all in a repository. You can then upload directly from your IDE to the API mgt system.
This enables you to edit the policies, javascript and message flow easier.
Next steps
We are currently working on a way to make unit testing easier to create and maintain. So you can run your Groovy Scripts directly from the IDE with some of your real test cases. Stay tuned.
We also want to improve the development workflow. So once you try it out do let us know how you see it and what it can do.
Try Figaf IRT
There is a free version of the Figaf tool that will allow you to try out the functionality with our Git repository. You can run Figaf on your own laptop to try it out.
I hope that at some point we can find a good balance between license, and the free version. In the paid version we have more users, test cases and transports.
It will take you 10 minutes to create your first repository.