AnsweredAssumed Answered

JAR executions from GEL

Question asked by msnizek on Mar 6, 2014
Latest reply on Mar 6, 2014 by gcubed

Hello,

I need to execute *.jar from my GEL script, I do it by following script:

<gel:script xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:core="jelly:core"
    xmlns:file="jelly:com.niku.union.gel.FileTagLibrary"
    xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
    xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary"
    xmlns:sql="jelly:sql" xmlns:xog="http://www.niku.com/xog"
    <!-- Parametry -->
    <gel:parameter
        default="/services/niku/clarity/lib/custom/Automation" var="location"/>
    <!--- Spuštění batch souboru -->
    <core:invokeStatic className="java.lang.Runtime" method="getRuntime" var="javaRuntime"/>
    <core:set value="java -jar ${location}/arm.jar" var="myArgs"/>
    <core:invoke method="exec" on="${javaRuntime}" var="execBAT">
        <core:arg type="java.lang.String" value="${myArgs}"/>
    </core:invoke>
    <core:invoke method="waitFor" on="${execBAT}" var="waitBAT"/>
    <gel:log category="XOG" level="INFO">myArgs: ${myArgs}, execBAT: ${execBAT}, javaRuntime: ${javaRuntime},waitBAT: ${waitBAT}</gel:log>
</gel:script>
 
There is a problem, that the JAR finishes, but the process in Clarity is still running (for more than two months). Please have you got any idea how to avoid this?
 
It worked OK in Clarity v12, we are now on 13.2.0.472
 
Regards,
Martin Snizek

Outcomes