AnsweredAssumed Answered

12.1 win2008server tomcat gel scripting failures!

Question asked by mrmikev on Apr 18, 2011
Latest reply on Apr 19, 2011 by mrmikev
howdy folks...
on our new env... using the sm gel scripts that ran just fin on old env (minus additional email at top where I explicitly name the email server)...
also using sm email hostname as old env...
script should figure out the env based on prop.xml and email accordingly...
when I run as original (minuse <mail:email tags)... script executes fine but I get no email!

I added the tags for explicitly using myserver and I get an error regarding authentication... any ideas?
-------------------------------------------------------------------------------------------

<gel:script xmlns:f="jelly:com.niku.union.gel.FileTagLibrary"
xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
xmlns:j="jelly:core"
xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary"
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sql="jelly:sql" xmlns:x="jelly:xml"
xmlns:xog="http://www.niku.com/xog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mail="jelly:email" >

<mail:email to="myemail" from="myemail" subject="just a test" server="myserver">
Hello,
test number 0
</mail:email>


<!-- STEP1: READ THE CUR ENV DETAILS VIA CONFIG FILE -->
<f:readFile delimiter=" " embedded="false"
fileName="../config/properties.xml" var="ENV"/>

<gel:email to="myemail" from="myemail" subject="just a test" >
Hello,
test number 1
</gel:email>


<j:forEach items="${ENV.rows}" var="row">
<j:if escapeText="false" test="${row[7].length()>'19'}" trim="false">
<j:set value="${row[7].substring(0,12)}" var="prefx"/>
<j:set value="${row[7].substring(13,20)}" var="envmt"/>
<j:if escapeText="false" test="${prefx=='serviceName='}" trim="false">
<j:if escapeText="false" test="${envmt=='clrtyacc'}" trim="false">
<j:set value="http://172.27.4.60/niku/xog" var="env_ip"/>
<j:set value="Acceptance" var="env_nm"/>
</j:if>
<j:if escapeText="false" test="${envmt=='clrtyprod'}" trim="false">
<j:set value="http://172.27.4.46/niku/xog" var="env_ip"/>
<j:set value="Production" var="env_nm"/>
</j:if>
<j:if escapeText="false" test="${envmt=='clrtydev'}" trim="false">
<j:set value="http://wphxclrtydev.phx.axway.int/niku/xog" var="env_ip"/>
<j:set value="Development" var="env_nm"/>
</j:if>
</j:if>
</j:if>
</j:forEach>

<gel:email to="myemail" from="myemail" subject="just a test" >
Hello,
test number 1
</gel:email>

<!-- STEP3: SETUP THE LIST OF FOLKS TO SEND THE EMAIL TO BASED ON ENV... -->
<j:if escapeText="false" test="${env_nm=='Production'}" trim="false">
<j:set value="myemail" var="tolist"/>
</j:if>
<j:if escapeText="false" test="${env_nm=='Acceptance'}" trim="false">
<j:set value="myemail" var="tolist"/>
</j:if>
<j:if escapeText="false" test="${env_nm=='Development'}" trim="false">
<j:set value="myemail" var="tolist"/>
</j:if>


<gel:email to="myemail" from="myemail" subject="this is just a test in the ${env_nm} environment">
Hello,
this is just a test!
</gel:email>

</gel:script>

Outcomes