Clarity

 View Only
  • 1.  GEL Script

    Posted Aug 25, 2014 05:01 PM

    GEL Script provide option to define <gel:persist> variable. I would like to
    know what is an actual scope of GLOBAL. I understand that, GLOBAL scope would
    make this variable available to all GEL scripts.
    <gel:persist scope="GLOBAL" value="VAR_VALUE" var="VAR_ID"/>

    1) How long this GLOBAL scoped PERSIST variable remain active? i.e. how long
    other processes can take values from this persist variable?
    2) What if there are multiple process engines?
    3) What if BG is restarted?
    4) What if App (Webpshere) is restarted?



  • 2.  Re: GEL Script

    Posted Aug 25, 2014 07:33 PM

    A simple gel script testing should answer all your questions.

     

    Regards,

    AK



  • 3.  Re: GEL Script

    Posted Aug 25, 2014 08:31 PM

    Actually, I need more than my own testing. I have done validation and continue to access variable post BG restart. But rather than depending on testing, I needed someone to confirm so that I can conclude findings. Addition to that, "How long?" could not be confirmed by testing whether its truly the day/week/month long scope.



  • 4.  Re: GEL Script

    Posted Aug 26, 2014 09:56 AM

    you will probably need to open up a ticket with support and ask them to provide some feedback/checking with a developer who can see the source code.   however i would avoid global variables in gel.  "The're bad -mkay!"  

     

    while this isn't related strictly to gel, the general take on things in most languages I have worked with, it work with local variables.  If you have need for a "global variable", stuff it into an object or in the database somewhere, then shove it into a local variable.  "you'll be awful glad you did!"

     

    http://c2.com/cgi/wiki?GlobalVariablesAreBad


    Please note, i quote a lot of tv, movies and commercials.   No ideas of mine are original, they exist in a dictionary some where in an unsorted/obscured.  Any mispellings in my work are encrypted using the homeron processor

     

    http://c2.com/cgi/wiki?GlobalVariablesAreBad



  • 5.  Re: GEL Script
    Best Answer

    Posted Sep 25, 2014 03:56 PM

    I got my answers:

    1) How long this GLOBAL
    scoped PERSIST variable remain active?
    i.e. how long other processes can take values from this persist variable?

    - This Global variable stays in system infinitely. It is stored in database and not impacted by Server restart/shutdown. Actually any scoped variable is stored into BPM_CUSTOM_SCRIPT_PROPS table and that how system keeps consistent track of scope of that variable.

    2) What if there are multiple process engines?

    - Not impacted. Variables and values are stored into DB.

    3) What if BG is restarted?

    - Not impacted. Variables and values are stored into DB.

    4) What if App (Webpshere) is restarted?

    - Not impacted. Variables and values are stored into DB.



  • 6.  Re: GEL Script

    Posted Feb 14, 2018 04:25 AM

    Regarding PERSIST (GLOBAL  and PROCESS scope) as you said both are stored in BPM_CUSTOM_SCRIPT_PROPS table infinitely.

     

    How can be deleted this global variables from DB using GEL?

    In  the same way that they can be defined from GEL,it should be a possible to remove from DB using GEL and without doing a SQL DELETE statement.