Erki Kriks [
http://community.jboss.org/people/krixerx] replied to the discussion
"E-mail attachments"
To view the discussion, visit:
http://community.jboss.org/message/556207#556207
--------------------------------------------------------------
I found easy solution. It's not nice but it works.
i - number of attachments.
<decision name="sendEmailDecision">
<transition to="sendEmailWith1Attachment">
<condition expr="#{i == 1}"/>
</transition>
<transition to="sendEmailWith2Attachments">
<condition expr="#{i == 2}"/>
</transition>
<transition to="sendEmailWith3Attachments">
<condition expr="#{i == 3}"/>
</transition>
<transition to="end"/>
</decision>
<mail name="sendEmailWith1Attachment">
...
<attachments>
<attachment file="#{attachmentAddresses.get(0)}"
mime-type="txt/xml" name="#{attachmentNames.get(0)}"/>
</attachments>
<transition to="end"/>
</mail>
<mail name="sendEmailWith2Attachments">
...
<attachments>
<attachment file="#{attachmentAddresses.get(0)}"
mime-type="txt/xml" name="#{attachmentNames.get(0)}"/>
<attachment file="#{attachmentAddresses.get(1)}"
mime-type="txt/xml" name="#{attachmentNames.get(1)}"/>
</attachments>
<transition to="end"/>
</mail>
<mail name="sendEmailWith3Attachments">
...
<attachments>
<attachment file="#{attachmentAddresses.get(0)}"
mime-type="txt/xml" name="#{attachmentNames.get(0)}"/>
<attachment file="#{attachmentAddresses.get(1)}"
mime-type="txt/xml" name="#{attachmentNames.get(1)}"/>
<attachment file="#{attachmentAddresses.get(2)}"
mime-type="txt/xml" name="#{attachmentNames.get(2)}"/>
</attachments>
<transition to="end"/>
</mail>
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/556207#556207]
Start a new discussion in jBPM Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]