CA PPM: "INSTANCE" Persisting Variables in GEL

Blog Post created by Aurora_Gaimon Employee on Mar 18, 2017

Long time ago, I can't recall if it was a CA World or CA PPM workshop... but the following persisting variables were presented:



 <gel:persist>: To persist the value of a variable between multiple Scripts.


Scope can be:

  • GLOBAL. Set once, use it anywhere.
  • PROCESS. Set once, use it anywhere in the same process.
  • INSTANCE. Set once, use it anywhere in the same process during the current execution.


How ca we use it?


To  be honest, I usually  use just "INSTANCE" , since it's the most used one. I will provide a couple of examples.


a. Your process has multiple steps which requires XOG. 


<core:set value="${httpMethod}${servername}:${portnumber}/niku/xog" var="cappmUrl"/>
<gel:persist scope="INSTANCE" value="${cappmUrl}" var="cappmUrl"/>


**Note: You need to core:set value first.


b. Your process has multiple steps which requires a session ID.

<gel:persist scope="INSTANCE" value="${sessionID}" var="sessionID"/>


**Note: Login at the beginning of your process (it could be in the "Start" step), use <gel:persist> to hold on to your Session ID during the entire process and DO NOT FORGET TO LOGOUT at the end of the process (it could be in the "Finish" step).


c. Any variable you may need to keep for multiple Scripts within the same process. 





Related and interesting link: Clarity Gel Best Practices?


If you need help with GEL scripting, engage CA Services or ask questions in CA Communities.


That’s all. Thanks for reading until here. Did you like it? Please, don’t be shy and share it.