Skip to Content
Technical Articles
Author's profile photo Fatih Pense

CPI Groovy Examples Repository

  • Do you always search for simple Groovy operations again and again? Because memorizing programming syntax doesn’t make sense in this age of information.
  • Do you find incomplete Groovy script examples out of the context of an integration?
  • Do you wonder best practices, and why a line is written in a specific way?
  • Do you want to see and understand what a script does in seconds with example input & output?

Then we have a very similar mindset 🙂

I have compiled some of the basic scripts and tried to satisfy myself as a reader. There is still work to do(as always), and there are more examples to come from me, from my colleagues, and from you!?

You can explore(and star) the GitHub repository. Every directory is an example, and when you enter a directory you will see the description of the script because it is written in Readme.md. You can open script.groovy file to see the script.

It is open to contributions. The code is MIT licensed, and you can also copy the explanations with attribution(CC BY 4.0) or just link to them.

Alternatively, you can visit this page I have built to make this exploration faster. I plan to add things like tags to be able to find scripts faster.

Here is an example screenshot:

Repository

https://github.com/pizug/cpi-groovy-examples

Thanks for reading & I’m open to suggestions!

Update: As Aaditya Nigam mentioned in the comments. There is also SAP Integration Recipes Community repository, so you can leverage both for sharing your Groovy scripts! https://github.com/SAP/apibusinesshub-integration-recipes

 

 

Assigned Tags

      12 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Saurabh Kabra
      Saurabh Kabra

      Thanks, Fatih for these incredible pieces of information. Searching on Google is one thing but finding it according to it our need is always a tough task. But I am damn sure the information shared here will help people a lot. #KeepSharing

      Author's profile photo Fatih Pense
      Fatih Pense
      Blog Post Author

      Thank you for your encouragement, Saurabh! It means a lot to me.

      I needed some catalog like this. And, it is better when it is public, both for creating value for fellow consultants and getting feedback & critique, so the scripts themselves get better. I agree, #KeepSharing

      Regards,
      Fatih

      Author's profile photo Aaditya Nigam
      Aaditya Nigam

      Hello Fatih,

      Great collection, we also have a repo at https://github.com/SAP/apibusinesshub-integration-recipes including Groovy Scripts.

      Can i request you to push pull request into this repo.

      Google search key words: " SAP integration recipes"

      Warm regards

      aadi

      Author's profile photo Fatih Pense
      Fatih Pense
      Blog Post Author

      Hello Aaditya,

      Thanks for your feedback! I have included the recipes repository in the post & I will inform my friends to consider sharing examples there too!

      Kind regards,
      Fatih

      Author's profile photo Sebastian Saieg
      Sebastian Saieg

      Thanks!!!

      Author's profile photo Fatih Pense
      Fatih Pense
      Blog Post Author

      Hi Sebastian, I’m glad you found it useful!

      Regards,
      Fatih

      Author's profile photo Ray Ding
      Ray Ding

      Thanks!

      Author's profile photo Fatih Pense
      Fatih Pense
      Blog Post Author

      Hi Ray, I'm glad you found it useful!

      Regards,
      Fatih

      Author's profile photo ANTONIO LOZADA
      ANTONIO LOZADA

      Thank you for this great contribution, first it helps us and secondly it educates us to copy these good initiatives for this self-taught community of developers in the future.

      Thank you!

      Author's profile photo Fatih Pense
      Fatih Pense
      Blog Post Author

      Hi Antonio,

      Thank you. I'm glad it is useful for you!

      We can make things better together. It is a privilege to be able to create value for this community and it is exciting for the future possibilities!

      You can give feedback to me here or personally anytime.

      Regards,
      Fatih

      Author's profile photo Antonio Maradiaga
      Antonio Maradiaga

      Great contribution to the SAP community Fatih Pense!

      Author's profile photo Fatih Pense
      Fatih Pense
      Blog Post Author

      Thank you for your kind words Antonio Maradiaga! I have come across your blog posts, keep up the good work 🙂

      Regards,
      Fatih