GELS2020 - Gel Scripts - Advanced
GELS2020 - Gel Scripts - Advanced
GELS2020 - Gel Scripts - Advanced
Scripts|
Advanced
• Take 5 Minutes
• Introduce Yourself
• core:invoke
• Use this GEL tag to call a method on an instantiated object
• For Ex:
• core:expr
• Use this GEL tag to call a method on an instantiated Java object where you do not require access
to the result of the operation.
• In the REST calls, this tag can be used to set request headers
• For Ex:
• core:invokeStatic
• Use this GEL tag to call a static method of a Java class
• For Ex:
• Read Node
• Use the below snippet to read the description of a group from userXML
• Write Node
• Use the below snippet to create a new group node in the userXML
• Delete Node
• Use the below snippet to delete a group node from userXML
• Use the below snippet to execute a XOG SOAP web service call
• To ensure success and as part of error handling the following snippet demonstrates how
to parse through the XML response returned by the SOAP call to the XOG interface
• Below are the most commonly used authentication methods for REST web
services
• Basic Authentication
• Authenticate using Base64 encoded string of Username and Password
• Maintain Session
• CA PPM REST API requires to maintain the session. Use the below snippet to
maintain the CA PPM REST session
• By including the namespace for the FTPTagLibrary, GEL has the ability to
read and write files on an FTP Server
• This library does not support SFTP, FTPS or passive mode
• Namespace
• <gel:script xmlns:gel="jelly:com.niku.union.gel.FTPTagLibrary">
• Tags
• ftp:open
• ftp:put
• ftp:get
• Integration Triggers
• Manual (User initiated)
• Scheduled
• Event Based
• Integration Methods
• Flat Files
• Web Services
• Database Links
• Third Party Tools
• Staging areas should often be utilized to load and validate the data prior to
pushing the data into the final destination inside CA PPM
• This helps reduce errors during the data load and can allow user interaction to
correct the values prior to processing
• A combination of GEL tag libraries, Java, and SQL can be utilized in
integration code
• A GEL script inside a process
• A SQL stored procedure inside a job definition
• A Java executable inside a job definition
• Note that stored procedures and Java executables are unsupported in on-demand
environments for security and stability reasons
• A typical flat file approach for exporting data from a GEL script:
• A query is ran to gather data to be sent to the other application
• The data is formatted into a file using the writeFile tag
• The file is uploaded to a FTP server using the FTPTagLibrary open and put tags
• The process containing the GEL script is scheduled to run at an agreed time
• The same process, instead of being scheduled, can be invoked by the
external application.