Clarity

 View Only
  • 1.  Any Way to write Custom Function in Gel?

    Posted Mar 23, 2018 04:04 PM

    I am trying to find a way to write custom functions in Gel or XOG Script without defining an User-defined Library in Java! As I am a SaaS user and don't have access to deploy it on the app server won't be able to do it through custom Java library!

     

    Thanks in Advance for your help!



  • 2.  Re: Any Way to write Custom Function in Gel?
    Best Answer

    Posted Mar 23, 2018 04:59 PM

    Being on SaaS, I don't think you will find a way to do this.  I looked around a couple of years ago to to see if the org.apache.commons.jelly.tags.define taglib was available which it wasn't.

     

    The way I get around this is I have a server setup in the cloud (Azure in my case) that contains a number of web services to perform a set of given functions.

     

    So in my SaaS gel script, I invoke a web service on my server passing in a define xml request payload which return a xml response payload. 

     

    In the request payload, I pass tjhe running sessionId encrypted which get's decrypted in the web service and checked via an query (PPM WSDL Query) to see if it is valid.  The query also returns attributes about the user which is running the query ( I mostly use their email to let them know I did something for them).

     

    Most of my functions are fire and forget which releases the gel script to reduce the chances of blocking the process engine.

     

    I have been using this method for a couple of year now and have even be able to extend it to for use in html portlets to allow a user to request/perform a given action.

     

    V/r,

    Gene