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 - .yeoh • Author of open-source PI & CPI solutions -
  3. 3. • JVM-based language • Syntax is super set of Java • Optional typing • Easy to learn 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 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- g-with-collections.html MORE GROOVY GOODNESS
  8. 8. Easily process XML • Parsing – XmlSlurper or XmlParser • Creating – MarkupBuilder • WYSIWYG xml.html GROOVY MAPPINGS
  9. 9. GOING FURTHER WITH GROOVY IN CPI Local testing in IDE Test Driven Development using Spock Framework
  10. 10. Expression evaluation during debugging DEMO
  11. 11. • I Groovy mapping • Pimp My Groovy - boosting CPI Groovy developments with IntelliJ IDEA developments-with-intellij-idea/ • (How) Do You Test Your Groovy Scripts? • CPI's Groovy meets Spock – To boldly test where none has tested before where-none-has-tested-before/ REFERENCES
  12. 12. Questions & Answers Q&A