Clarity

  • 1.  Getting error with GEL email

    Posted Feb 18, 2011 08:28 PM
    I am testing sending an email with attachment from a process. Here's the code
    <gel:script
       xmlns:core="jelly:core"
       xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
       xmlns:mail="jelly:email"  >     
    
      <mail:email
        from="goofy@bb.org"
        to="goofy@bb.org"
        subject="Simple email"
        server="mta.bb.org" 
        attach="/apps/niku/gseBBFiles/BB_Report.html" >
        Hello World.
      </mail:email>
    
    </gel:script>
    Here's the error:

    BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:11:60: <mail:email> Property 'attach' has no write method at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:671) at org.apache.commons.jelly.impl.TagScript.run

    If I remove the attach attribute, it works fine.

    Any ideas?

    Thanks


  • 2.  RE: Getting error with GEL email
    Best Answer

    Posted Feb 19, 2011 06:28 AM
    Just a GUESS, but the attachment is defined in the jelly docuumentation HERE as a "java.io.file" type not just a simple string path?

    Or maybe the HTML nature of your file is confusing it - have you tried with a simple text file?

    Your GEL is running on the same server as that file?

    Thats it I'm out of guesses!


  • 3.  RE: Getting error with GEL email

    Posted Feb 20, 2011 02:16 PM
    I'm no Java programer, but I googled around regarding java.io.file, and from what I found, I don't see any issue with my example code.

    The process and the file are on the same server.

    I tried attaching different files types, and a non-existant file name. I always get the same error. Very possible I've just written it incorrectly.

    So, anybody have a working example?

    (Dave, thanks for your guesses!)


  • 4.  RE: Getting error with GEL email

    Posted Feb 20, 2011 09:38 PM
    Well, belay that order. My error, I miss-capitalized one letter in the path name. Doh!

    The above code works fine.


  • 5.  RE: Getting error with GEL email

     
    Posted Feb 22, 2011 06:12 PM
    Thanks for letting everyone know you were able to resolve this!

    Chris