I finally got this running ... however... I have two issues
1. it's putting a comma at the end of each row... how do i remove that?
>
CLTCR,33634,04112011,CH.40000157.SC01,4.00,
CLTCR,33634,04122011,CH.40000157.SC01,4.00,
CLTCR,33634,04132011,CH.40000157.SC01,4.00,
CLTCR,33634,04142011,CH.40000157.SC01,4.00,
CLTCR,33634,04152011,CH.40000157.SC01,4.00,
CLTCR,33634,04112011,CH.40000292.SC01,4.00,
CLTCR,33634,04122011,CH.40000292.SC01,4.00,
CLTCR,33634,04132011,CH.40000292.SC01,4.00,
here is some of the code i am using: I had to put another column of the return char because it would not break on the next row... don't know if that is correct but it's getting me the results i need just the comma at the end of each row.. ^^^^
>
<file:writeFile delimiter="," embedded="false" fileName="${filePath}\${fileName}">
<core:forEach trim="true" items="${results.rowsByIndex}" var="row">
<core:forEach var="field" items="${results.columnNames}" indexVar="i" step="5">
<file:line>
<file:column value="${row}" />
<file:column value="${row[i+1]}" />
<file:column value="${row[i+2]}" />
<file:column value="${row[i+3]}" />
<file:column value="${row[i+4]}" />
<file:column value=" " />
</file:line>
</core:forEach>
</core:forEach>
</file:writeFile>
2. i am getting an error when putting in a process...I am using jelly instead of GEL tags. The issue is when i "hard code" the attachement details, it works and sends the email... but when i take from parameters the same details (${filePath}${fileName} it gives the error below.
>
BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:112:22: <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(TagScript.java:259) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) at com.niku.union.gel.tags.ScriptTag.doTag(ScriptTag.java:20) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) at com.niku.union.gel.GELScript.run(GELScript.java:80) at com.niku.union.gel.GELController.invoke(GELController.java:20) at com.niku.bpm.services.ExecuteCustomAction.run(ExecuteCustomAction.java:180) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.IllegalArgumentException: Property 'attach' has no write method at org.apache.commons.beanutils.ConvertingWrapDynaBean.set(ConvertingWrapDynaBean.java:71) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:243) ... 9 more Root cause java.lang.IllegalArgumentException: Property 'attach' has no write method at org.apache.commons.beanutils.ConvertingWrapDynaBean.set(ConvertingWrapDynaBean.java:71) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:243) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) at com.niku.union.gel.tags.ScriptTag.doTag(ScriptTag.java:20) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) at com.niku.union.gel.GELScript.run(GELScript.java:80) at com.niku.union.gel.GELController.invoke(GELController.java:20) at com.niku.bpm.services.ExecuteCustomAction.run(ExecuteCustomAction.java:180) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727) at java.lang.Thread.run(Thread.java:595)
some of the code:
>
...
xmlns:mail="jelly:email"
...
<gel:parameter default="\\orlcldev\niku\Clarity\filestore" var="filePath"/>
<gel:formatDate format="yyyy-MM-ddHH-mm" stringVar="rundate"/>
<gel:parameter default="${rundate}TimeData.txt" var="fileName"/>
...
<mail:email
from="clarity.helpdesk@fiserv.com"
to="keri.taylor@fiserv.com"
CC="pat.fitzgerald@fiserv.com"
subject="Simple email"
attach="${filePath}\${fileName}"
server="10.1.2.67">
Hi,
This is the timedata file: ${fileName}.
</mail:email>
any help would be appreciated.
Keri