Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 63 Insurance
- 536.4K On-Premises Infrastructure
- 138.3K Analytics Software
- 38.6K Application Development Software
- 5.8K Cloud Platform
- 109.5K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71.1K Infrastructure Software
- 105.3K Integration
- 41.6K Security Software
Q: Unable to change the email attachment name on UMS Adapter BPEL 12c Email SendNotification operati

Hi Experts,
I have been trying to change the email attachment name while I send an email through UMS Adapter on Oracle SOA BPEL 12c.
I tried following properties one at a time. None of them seem to be working . Please advise.
<bpelx:toProperty name="jca.ums.msg.content-type">"text/plain; charset=UTF-8; name=filename1.txt;"</bpelx:toProperty>
<bpelx:toProperty name="jca.ums.msg.content-disposition">'attachment; filename="filename2.txt";'</bpelx:toProperty>
<bpelx:toProperty name="jca.ums.Content-Disposition">'attachment; name="filename3.txt";'</bpelx:toProperty>
<bpelx:toProperty name="jca.ums.Content-Type">'name="filename4.txt";'</bpelx:toProperty>
<bpelx:toProperty name="jca.ums.part.content-type">"text/plain; charset=UTF-8; name=filename5.txt;"</bpelx:toProperty>
Thanks for your help in advance!!
Best Answer
-
Hi mate,
It can be achieved by using function ora:readBinaryFromFileWithMimeHeaders... Please see example below...
It is not a JCA property, it is something that you have to do at the "assign" in BPEL, when creating the "SendNotification" input variable...
<copy bpelx:insertMissingToData="yes">
<from>ora:readBinaryFromFileWithMimeHeaders(concat($directoryOutbound,'\',$outFilename),'one','text/csv',concat('attachment; filename="',$outFilename,'"'),'7bit','text file','en')</from>
<to expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">$SendNotification_SendNotification_InputVariable.body/ns5:attachment[1]</to>
</copy>
Cheers,
Vlad
Answers
-
Hi mate,
It can be achieved by using function ora:readBinaryFromFileWithMimeHeaders... Please see example below...
It is not a JCA property, it is something that you have to do at the "assign" in BPEL, when creating the "SendNotification" input variable...
<copy bpelx:insertMissingToData="yes">
<from>ora:readBinaryFromFileWithMimeHeaders(concat($directoryOutbound,'\',$outFilename),'one','text/csv',concat('attachment; filename="',$outFilename,'"'),'7bit','text file','en')</from>
<to expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">$SendNotification_SendNotification_InputVariable.body/ns5:attachment[1]</to>
</copy>
Cheers,
Vlad
-
Thanks Vlad. Its working as expected now.
-
Hi Vlad,
I am seeing one issue on the output CSV format. Please advise.
Input :
160708046131
160709036169
Output :
Here is the expression I used in BPEL:
<copy> <from>ora:readBinaryFromFileWithMimeHeaders(concat($attachmentPath,'/',$attachmentFileName),'one','text/csv',concat('attachment; filename="', $attachmentFileName,'"'),'7bit', $attachmentFileName,'en')</from>
<to expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">$Invoke_SendEmail_SendNotification_InputVariable.body/ns5:attachment[1]
</to>
</copy>
Thanks
-
Hi mate,
If you open the file in Excel it will show like that, but the data in the file should be correct - try and open it using notepad++ or similar.
You can either format the column in excel to show a big number or do some trick in the CSV so Excel will think it is a text field when opening the file.
See the answer to this question in Stack Overflow...
Cheers,
Vlad
-
Dear Sir, i have copy pasted the above code in assign activity, created 2 variables. One for outfilename and other one for directoryOutbound
Created another assign before the actual assign which calls the ums And mapped href element(iam reading a file as an attachement) to directoryOutbound and hardcoded a filename(without .csv extension)
but still i am getting the xpath incorrect error when testing in em console
Please help and let me know what needs to be done/mapped to directoryOutbound and outFilename in the expression you suggested
Thanks in advance