You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Robert Kanter (JIRA)" <ji...@apache.org> on 2014/08/18 19:04:18 UTC

[jira] [Commented] (OOZIE-1975) Documentation issue in wf:lastErrorNode()

    [ https://issues.apache.org/jira/browse/OOZIE-1975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14100858#comment-14100858 ] 

Robert Kanter commented on OOZIE-1975:
--------------------------------------

Maybe we should change it to return an empty string?  Most EL functions return empty string instead of null in these sorts of situations.

> Documentation issue in wf:lastErrorNode()
> -----------------------------------------
>
>                 Key: OOZIE-1975
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1975
>             Project: Oozie
>          Issue Type: Bug
>            Reporter: Shwetha G S
>
> According to oozie doc http://oozie.apache.org/docs/4.0.1/WorkflowFunctionalSpec.html#a4.2.3_Workflow_EL_Functions,
> String wf:lastErrorNode()
> It returns the name of the last workflow action node that exit with an ERROR exit state, or an empty string if no action has exited with ERROR state in the current workflow job.
> But according to oozie code, 
> {code}
>     /**
>      * Return the name of the last action that ended in error.
>      *
>      * @return the name of the last action that ended in error, <code>null</code> if no action in the workflow job has
>      *         ended in error.
>      */
>     public static String wf_lastErrorNode() {
>         return getWorkflow().getWorkflowInstance().getVar(LAST_ACTION_IN_ERROR);
>     }
> {code}
> So, if there is no error, this EL returns null, but is documented as returning empty string



--
This message was sent by Atlassian JIRA
(v6.2#6252)