In this post I have explained how to send Attachments along with notification's body in OIC Notification action.
Knowledge :๐
The total size limit on a notification email is 1 MB for Oracle Integration and 2 MB for Oracle Integration Generation 2.Steps overview to send attachment in OIC notification action :
- Open the Notification action and click on Plus icon "+" to add attachments.
- Select the Attachments ( 'Reference' )to add.You can edit or delete the attachment once added. Click save and close.That's it. Your configuration for sending attachment in email notification completed.
[You can take reference from below image:- Fig -1, Fig -2, Fig-3]
Info ๐ File Reference are of different types.For example, in the below image the integration includes three file reference attachments (highlighted in yellow) that are available for selection. You can select one or all as attachments.
- An attachment from a REST Adapter connection
- A file reference from a stage file write operation ⃕this case scenario I have covered in below hands-on practice.
- A file reference from an FTP Adapter download operation
#Hand-On Practice :
Use Case : Lets develop one simple APP DRIVEN ORCHESTRATION integration which can take some JSON inputs and that inputs will get send as an attachment in email notification in XML format.
Top view of integration which we are going to develop :
Lets see the steps in detail :
Step 1 : Crate one APP DRIVEN ORCHESTRATION by giving Integration a meaningful name.
Select any REST Trigger connection and configure the adapter as shown below -
- Configure the Request Sample JSON Payload window by entering below JSON and then click Ok.Click Next
{
"Employee" : {
"EmployeeDetail" : [ {
"Name" : "Amit",
"Id" : "01"
}, {
"Name" : "Rohit",
"Id" : "02"
} ]
}
}
- Configure the Response Sample JSON Payload window by entering below JSON and then click Ok.Click Next
{
"Message" : "Success"
}
STEP 2 : Now add Stage File Action and configure the adapter as shown below
- Enter a meaningful name , click Next
- In this window select XML Schema (XSD) Document.Click Next
- Stage File Action configuration completed. Click Done.
- Open the mapper to map the value
- Enter the basic details -- *FROM, *TO EMAIL ids, *Subject , *Body and then click "+" icon of attachments
Knowledge :๐
You can configure the approval email address to use in the FROM field on the notifications page that is accessible from Settings → Notifications.[as shown in below image]
STEP 5 : Enable Tracking for the integration
- Click Save and Close the integration . Integration is ready to TEST.
UNIT TESTING : -
- Activate the Integration
- You can see "Success" response in downward response window.
- Now check your email. You have received one email notification with payload as shown below :
- Email Notification along with attachment
Thanks for the blog .It was working fine. Getting mail with attachment.
ReplyDeletethank for the blog. it is very useful information to learn OIC
ReplyDeleteThank You Sreenivas :)
DeleteThanks for the blog, it is helping me in learning OIC
ReplyDeleteWelcome Harsha :)
DeleteExcellent blog, Keep posting bro, Thanks a lot. God Bless You Dear
ReplyDeleteThanks :)
Delete