Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Groovy Your Way to CPI Bliss

193 visualizaciones

Publicado el

Community Talk CT140 at SAP TechEd Barcelona 2019

Publicado en: Tecnología
  • Sé el primero en comentar

Groovy Your Way to CPI Bliss

  1. 1. Groovy Your Way to CPI Bliss
  2. 2. ABOUT ME Eng Swee Yeoh • SAP Integration Expert – CPI, PI, ABAP • SAP Mentor • Blog - http://people.sap.com/engswee .yeoh • Author of open-source PI & CPI solutions - https://github.com/engswee
  3. 3. • JVM-based language • Syntax is super set of Java • Optional typing • Easy to learn http://groovy-lang.org/ What should you know about Groovy? ABOUT GROOVY
  4. 4. Common use cases • Setting header/property values • Logging payload • Mapping/Transformation • Custom function in Message Mapping One of the two scripting languages in CPI: GROOVY IN SAP CPI It is pervasive in CPI – you cannot run away from it!
  5. 5. Recommendation – IntelliJ IDEA Community Edition Features • Native support for Groovy syntax • Code completion • Inspection • Expression evaluation during debug GETTING STARTED WITH GROOVY Use an IDE!
  6. 6. • No semicolons • Optional typing • GString • As keyword http://groovy-lang.org/style-guide.html A LIL BIT OF GROOVY GOODNESS
  7. 7. Native support for Collections (Lists, Maps), with enhanced methods provided by GDK • Declaration • Adding elements • Loop http://docs.groovy- lang.org/next/html/documentation/workin g-with-collections.html MORE GROOVY GOODNESS
  8. 8. Easily process XML • Parsing – XmlSlurper or XmlParser • Creating – MarkupBuilder • WYSIWYG http://groovy-lang.org/processing- xml.html GROOVY MAPPINGS
  9. 9. GOING FURTHER WITH GROOVY IN CPI Local testing in IDE Test Driven Development using Spock Framework
  10. 10. www.int4.com Expression evaluation during debugging DEMO
  11. 11. • I Groovy mapping https://blogs.sap.com/2019/06/07/i-heart-groovy-mapping/ • Pimp My Groovy - boosting CPI Groovy developments with IntelliJ IDEA https://blogs.sap.com/2019/05/28/pimp-my-groovy-boosting-cpi-groovy- developments-with-intellij-idea/ • (How) Do You Test Your Groovy Scripts? https://blogs.sap.com/2017/10/06/how-do-you-test-your-groovy-scripts/ • CPI's Groovy meets Spock – To boldly test where none has tested before https://blogs.sap.com/2018/01/24/cpis-groovy-meets-spock-to-boldly-test- where-none-has-tested-before/ REFERENCES
  12. 12. www.int4.com Questions & Answers Q&A

×