Clarity

  • 1.  How can we get gel script code from back end which is used on custom defined process?

    Posted Nov 05, 2015 03:20 AM

    Hi All,

     

    Do we have any table which is stored gel script code which is used on custom defined process? Thanks.



  • 2.  Re: How can we get gel script code from back end which is used on custom defined process?

    Posted Nov 05, 2015 03:44 AM

    Its in CMN_CUSTOM_SCRIPTS.script_text

     

    But if you are an application administrator, you should just be able to get it from the administration / processes screens?



  • 3.  Re: How can we get gel script code from back end which is used on custom defined process?

    Posted Nov 05, 2015 03:49 AM

    Thanks for the update Dave.

     

    what is the CMN_CUSTOM_SCRIPTS.ID column is this is the process id from bpm_def_processes.id? or something else? Thank You.



  • 4.  Re: How can we get gel script code from back end which is used on custom defined process?

    Posted Nov 05, 2015 03:54 AM

    Check this (thanks to nick_darlington )-

     

    List of processes that contain a specific text

    https://communities.ca.com/message/98904877#98904877

     

     

    NJ



  • 5.  Re: How can we get gel script code from back end which is used on custom defined process?

    Posted Nov 05, 2015 04:07 AM

    Check this as well -

     

    Search All GEL Scripts

    https://communities.ca.com/docs/DOC-231150725

     

     

    NJ



  • 6.  Re: How can we get gel script code from back end which is used on custom defined process?

    Posted Nov 05, 2015 10:01 AM

    I like that query that NJ linked better, but if you're just looking to see if based on your other thread ( BPM-0522: Internal Process Engine Error. Contact your site administrator (Error executing action) ) whether or not you have any process definitions where you might be locking attributes directly with SQL, you could start with something simpler like what I replied with there:

     

    select id, script_text from cmn_custom_scripts where script_text like '%ODF_LOCKED_ATTRIBUTES%' or script_text like '%odf_locked_attributes%'

     

    There are still caveats to this.. for example, locked attribute inserts could also be buried away in procedures and/or triggers on the database that the GEL calls but without having the name of the table present, but this is going to be rather uncommon.  If you suspect that as well though or want to rule it out to be sure, and you are using Oracle, you could connect to the database as your Clarity/PPM schema user and issue this query - but note that it will pull out some stock or out of the box results too, not just any custom ones:

     

    select distinct * from user_source us1 where exists

    (

      select null from user_source us2

      where us2.name = us1.name

      and us2.type = us2.type

      and upper(us2.text) like '%ODF_LOCKED_ATTRIBUTES%'

    )

    order by name, type, line

     

    Hope that helps, and if you raised a support ticket for that other thread in the end, please can you let me know what it is if you don't mind.



  • 7.  Re: How can we get gel script code from back end which is used on custom defined process?

    Posted Nov 05, 2015 03:58 AM

    No thats just a sequence - that table is holding the definition of the custom-actions within the process.



  • 8.  Re: How can we get gel script code from back end which is used on custom defined process?

    Posted Nov 05, 2015 04:58 AM

    There was a partial ERD for the process tables in the Tech ref of 7.5 See

    https://communities.ca.com/message/241787359#241787359



  • 9.  Re: How can we get gel script code from back end which is used on custom defined process?

    Posted Nov 05, 2015 10:10 AM

    What I do is extract all the GEL scripts on to my development box.

     

    Once I have them as files, I use grep (actual PowerGrep) to find any string such as a table name, nsql code...

     

    ExtractGelScriptsToFiles.zip

     

    I find this helpful for "where used" or finding code snip-its.

    V/r,

    Gene