title: how to abort oozie workflow when subworkflow fails?
body: <p>I have sub workflows created with in the main workflow and they are called in the sequence that means when one completes then next sub workflow will be triggered but on the the failure of the sub-workflow, my main- workflow is not getting aborted and the next sub-workflow is getting triggered. The main workflow example is given below</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;workflow-app xmlns="uri:oozie:workflow:0.4" name="Mainworkflow_"&gt;
    &lt;start to="subworkflow-node-abc"/&gt;
    &lt;action name="subworkflow-node-abc"&gt;
      &lt;sub-workflow&gt;
        &lt;app-path&gt;hdfs://link/abc.xml&lt;/app-path&gt;
        &lt;configuration&gt;
          &lt;property&gt;
            &lt;name&gt;autoReconnect&lt;/name&gt;
            &lt;value&gt;true&lt;/value&gt;
          &lt;/property&gt;
          &lt;property&gt;
            &lt;name&gt;TableName&lt;/name&gt;
            &lt;value&gt;abc&lt;/value&gt;
          &lt;/property&gt;
          &lt;property&gt;
            &lt;name&gt;targetDirPath&lt;/name&gt;
            &lt;value&gt;${targetDirPath}&lt;/value&gt;
          &lt;/property&gt;
        &lt;/configuration&gt;
      &lt;/sub-workflow&gt;
      &lt;ok to="subworkflow-node-def"/&gt;
      &lt;error to="kill"/&gt;
    &lt;/action&gt;
    &lt;action name="subworkflow-node-def"&gt;
      &lt;sub-workflow&gt;
        &lt;app-path&gt;hdfs://def.xml&lt;/app-path&gt;
        &lt;configuration&gt;
          &lt;property&gt;
            &lt;name&gt;autoReconnect&lt;/name&gt;
            &lt;value&gt;true&lt;/value&gt;
          &lt;/property&gt;
          &lt;property&gt;
            &lt;name&gt;TableName&lt;/name&gt;
            &lt;value&gt;def&lt;/value&gt;
          &lt;/property&gt;
          &lt;property&gt;
            &lt;name&gt;targetDirPath&lt;/name&gt;
            &lt;value&gt;${targetDirPath}&lt;/value&gt;
          &lt;/property&gt;
        &lt;/configuration&gt;
      &lt;/sub-workflow&gt;
      &lt;ok to="end"/&gt;
      &lt;error to="kill"/&gt;
    &lt;/action&gt;
    &lt;kill name="kill"&gt;
      &lt;message&gt;Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]&lt;/message&gt;
    &lt;/kill&gt;
    &lt;end name="end"/&gt;
  &lt;/workflow-app&gt;
  </code></pre>
  
  <p>So in the above example, the second workflow is getting triggered. Can anyone tell the way to kill that main workflow in case it aborts.</p>