Joal has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/240094

Change subject: Add oozie email sending subworkflow wrapper
......................................................................

Add oozie email sending subworkflow wrapper

Change-Id: I0ef57ec914c7b13e896ff0836b42f975787984b9
---
A oozie/util/send_error_email/worflow.xml
1 file changed, 74 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/94/240094/1

diff --git a/oozie/util/send_error_email/worflow.xml 
b/oozie/util/send_error_email/worflow.xml
new file mode 100644
index 0000000..d83177c
--- /dev/null
+++ b/oozie/util/send_error_email/worflow.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workflow-app xmlns="uri:oozie:workflow:0.4"
+    name="send-error-email-${parent_name}-wf">
+
+    <!--
+        This subworflow is a simple wrapper over the oozie email action
+          allowing to provide default values for most of the needed fields.
+    -->
+
+    <parameters>
+
+        <property>
+            <name>${parent_name}</name>
+            <description>
+                The name of the parent workflow in error.
+            </description>
+        </property>
+
+        <property>
+            <name>to</name>
+            
<value>[email protected],[email protected],[email protected],[email protected],[email protected]</value>
+            <description>
+                The comma-separated list of email recipients
+            </description>
+        </property>
+
+        <property>
+            <name>cc</name>
+            <value>[email protected]</value>
+            <description>
+                The comma-separated list of email cc recipients
+            </description>
+        </property>
+
+        <property>
+            <name>subject</name>
+            <value>Fatal Error - Oozie Job ${parent_name}</value>
+            <description>
+                The subject of the email
+            </description>
+        </property>
+
+        <property>
+            <name>object</name>
+            <value>
+                Please have a look and take necessary action !
+                Thanks :)
+                -- Oozie
+            </value>
+            <description>
+                The body of the email
+            </description>
+        </property>
+
+    </parameters>
+
+    <start to="send_email"/>
+
+    <action name="send_email">
+        <email xmlns="uri:oozie:email-action:0.1">
+            <to>${to}</to>
+            <cc>${cc}</cc> <!-- cc is optional -->
+            <subject>${subject}</subject>
+            <body>${body}</body>
+        </email>
+        <ok to="end"/>
+        <error to="kill"/>
+    </action>
+
+    <kill name="kill">
+        <message>send_error_email action failed, error 
message[${wf:errorMessage(wf:lastErrorNode())}]</message>
+    </kill>
+    <end name="end"/>
+</workflow-app>

-- 
To view, visit https://gerrit.wikimedia.org/r/240094
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ef57ec914c7b13e896ff0836b42f975787984b9
Gerrit-PatchSet: 1
Gerrit-Project: analytics/refinery
Gerrit-Branch: master
Gerrit-Owner: Joal <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to