Clarity PPM

Expand all | Collapse all

Gel Script

Jump to Best Answer
  • 1.  Gel Script

    Posted 09-13-2013 08:17 AM
    Hi

    I was wondering if any members of the community have a simple gel script to apply to a process I want to develop to update a number of custom fields with different values on a number of projects. I am not very good on the script writing but if I had a basic body of the script I could tweak to suit our custom fields.

    Or even point me in the direction where to abtain such scripts.

    Any help would be appreciated
    Stephen


  • 2.  RE: Gel Script

    Posted 09-13-2013 08:46 AM
    Its not a GEL script that you need its a XOG script.

    The "minimum" script* you need to provide is as below ; i.e. you will need to get the right project [color=#ff0000]NAME[color] and [color=#ff0000]ID[color] from your system as well as provide the right [color=#ff0000]custom attribute[color] names.
    <?xml version="1.0" encoding="UTF-8"?>
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd">
      <Header action="write" externalSource="NIKU" objectType="project" version="13.0.0.7032"/>
      <Projects>
        <Project name="[color=#ff0000]YOUR PROJECT NAME HERE[/color]" projectID="[color=#ff0000]YOUR PROJECT ID HERE[/color]">
          <CustomInformation>
            <ColumnValue name="[color=#ff0000]my_custom_attribute1[/color]">aaaa</ColumnValue>
            <ColumnValue name="[color=#ff0000]my_custom_attribute2[/color]">bbbb</ColumnValue>
            <ColumnValue name="[color=#ff0000]my_custom_attribute3[/color]">2013-09-13</ColumnValue>
          </CustomInformation>
        </Project>
      </Projects>
    </NikuDataBus>
    For multiple projects in one XOG file you just repeat all the <Project name... to </project> for each project.

    --

    * - If you are using partitions then the above is not quite enough, you also need the partition info in the CustomInformation section I think. Read out a project using XOG and compare what you get to the above to see what I mean there.

    --

    EDIT :
    Its not a GEL script that you need its a XOG script.
    What I mean there is that you don't need GEL to just update some data, XOG does this for you.... but if you are trying to build a business-driven process that does this all automagically in the system based on some rules or something like that then yes you might drop into GEL and I have just misunderstood your question :*)


  • 3.  RE: Gel Script

    Posted 09-13-2013 09:13 AM
    Thanks for that Dave. Yes you have understood my question/request correctly.

    I will look at the XOG but as far as my memory services me we tried this before and the problem we have is that some of these fields in question are locked down on some projects. If I use the XOG would I not have to first globally open these fields then run the XOG to change the values? Or you the XOG overwrite value with the field locked down?

    Excuse my ignorance can you have a XOG built into a process? I was always under the impression we use a GEL script built into a process.

    Thanks again
    Stephen


  • 4.  RE: Gel Script
    Best Answer

    Posted 09-13-2013 09:26 AM
    If fields are locked then yes you would have to unlock them before you tried to update with XOG I would assume (you had not mentioned that before! :grin: )

    --

    WRT XOG in a process; yes you are correct that to include some "programatic stuff" in a process then this is GEL, but GEL itself does not "update data", it can only do this (in a supported manner) by calling XOG. (GEL can do un-supported updates to data by calling SQL, but you can call SQL from "anywhere" - the fact that you could call it from GEL does not mean that it suddenly becomes supported! ).

    In simple terms, SQL/XOG are your data-manipulation tools, GEL is a language (which you might then choose to call SQL/XOG from). ( ....and direct-SQL updates are unsupported, so XOG is the way... )


  • 5.  RE: Gel Script

    Posted 09-21-2013 11:59 AM
    Thanks to all for helping me finally i got the data populated