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>