Hi,

I have the following snippet in my oozie workflow

    <decision name="decideDeleteTemp">
        <switch>
            <case to="cleanupTemp">${deleteTemp}</case>
            <default to="emailOk" />
        </switch>
    </decision>
    <action name="cleanupTemp">
        <fs>
            <delete path="${tempPath}" />
        </fs>
        <ok to="end" />
        <error to="emailError" />
    </action>
    <action name="emailOk">
        <email xmlns="uri:oozie:email-action:0.1">
            <to>[email protected]</to>
            <subject>mySubject</subject>
            <body>myBody</body>
        </email>
        <ok to="end" />
        <error to="end" />
    </action>

Basically, a decision node controls whether to delete temp files based on a variable and after that email is sent in all cases.

The problem is that this causes the following error:

   Error: E0743 : E0743: Multiple "ok to" transitions to the same node,
   [emailOk], are not allowed

Now, I understand that in action sequence there must be only one transition to some node so that it is guaranteed that a node will be executed only once. But decision node above also forces an emailOk action to be executed only once since it will either transition directly to emailOk or to cleanupTemp which will afterwards transition to emailOk.

Is this perhaps a bug or was it intentional? Is there a way to work around this limitation?

Thanks,
Miljan

Reply via email to