Hi,
I am facing a strange behavior in Oozie email action with attachment.
Oozie version:
Oozie server build version: 4.0.0-cdh5.3.3
Action:
<action name="bragreport">
<email xmlns="uri:oozie:email-action:0.2">
<to>${success_emails}</to>
<subject>test attachment</subject>
<body>Hi - email to test attachment</body>
*<content_type>image/jpeg</content_type>*
* <attachment>/user/manoj/PieChart.jpeg</attachment>*
</email>
<ok to="end" />
<error to="kill" />
</action>
-sh-4.1$ oozie validate workflow.xml
Error: Invalid app definition, org.xml.sax.SAXParseException; lineNumber:
51; columnNumber: 13; cvc-complex-type.2.4.d: Invalid content was found
starting with element 'attachment'. No child element is expected at this
point.
After removing attachment element the error dissappers but in
email-action:0.2.xsd content_type and attachment elementes are supported
but here it behaves strange.
<action name="bragreport">
<email xmlns="uri:oozie:email-action:0.2">
<to>${success_emails}</to>
<subject>test attachment</subject>
<body>Hi - email to test attachment</body>
* <content_type>image/jpeg</content_type>*
</email>
<ok to="end" />
<error to="kill" />
</action>
-sh-4.1$ oozie validate workflow.xml
Valid workflow-app
Cheers!
Manoj.