Hi Oozie users,

I have made an online workflow.xml validation tool, I call it VisualOozie.
http://alpha.visualoozie.cloudbees.net
(It is still alpha version and buggy though.)

You can file upload workflow.xml files and the tool visualize the workflows.
Try one of the oozie examples from
http://svn.apache.org/viewvc/oozie/trunk/examples/src/main/apps/demo/workflow.xml?view=markup

And it can also identify issues in your workflow.xml files.
For example, just like in this email thread, some xml mistakes can be
identified.

PLEASE NOTE that this is my private project and not supported by the Apache
Oozie team, so if you have any questions/comments/feedback, please send to
this google groups forum.
https://groups.google.com/forum/#!forum/visualoozie-user

--------------- EXAMPLE
------------------------------------------------------------------------------
<workflow-app xmlns="uri:oozie:workflow:0.4" name="java-main-wf">
    <start to="shell-node"/>
 <action name="shell-node">
<shell xmlns="uri:oozie:shell-action:0.3">
 <job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<exec>script1.sh</exec>
 <file>script1/file1#file1</file>
<argument>arg1</argument>
<argument>arg2=val2</argument>
 </shell>
<ok to="end" />
<error to="fail1" />
 </action>

    <kill name="fail1">
        <message>Java failed, error
message[${wf:errorMessage(wf:lastErrorNode())}]</message>
    </kill>
    <end name="end"/>
</workflow-app>







On Fri, Feb 15, 2013 at 11:42 AM, Mohammad Islam <[email protected]> wrote:

> Hi Thomas,
> "argument" should be just after "exec" tag.
> Ordering is important too.
> Please check it here:
>
> http://oozie.apache.org/docs/3.3.1/DG_ShellActionExtension.html#Shell_Action_Schema_Version_0.2
>
> Regards,
> Mohammad
>
>
>
>
> ________________________________
>  From: Thomas Adam <[email protected]>
> To: [email protected]
> Sent: Friday, February 15, 2013 3:42 AM
> Subject: Can't add argument to shell action
>
> Hi,
>
> I have the following issue with this action definition:
>
> ....
>
> <action name="send_mail">
>     <shell xmlns="uri:oozie:shell-action:0.3">
>         <job-tracker>${jobTracker}</job-tracker>
>         <name-node>${nameNode}</name-node>
>         <exec>daily_report</exec>
>         <file>cmd/daily_report#daily_report</file>
>         <argument>send_report</argument>
>         <argument>--date=${date}</argument>
>     </shell>
>     <ok to="end" />
>     <error to="kill" />
> </action>
>
> ...
>
> If I look at the specs of "uri:oozie:shell-action:0.3" the <argument>
> node exists, but oozie throws an exception on parsing time:
>
> ERROR org.apache.oozie.command.wf.SubmitXCommand: USER[-] GROUP[-]
> TOKEN[-] APP[-] JOB[0000000-130215122701352-oozie-oozi-C]
> ACTION[0000000-130215122701352-oozie-oozi-C@1] XException,
> org.apache.oozie.command.CommandException: E0701: XML schema error,
> cvc-complex-type.2.4.a: Invalid content was found starting with
> element 'argument'. One of '{"uri:oozie:shell-action:0.3":file,
> "uri:oozie:shell-action:0.3":archive,
> "uri:oozie:shell-action:0.3":capture-output}' is expected.
>
> If I remove the <argument> node it works fine.
>
> I use oozie version 3.3.1 with cdh 4.1.2
>
> Thanks & Regards
> Thomas
>

Reply via email to