Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multiline case statement #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix multiline case statement #1

wants to merge 2 commits into from

Conversation

cykl
Copy link

@cykl cykl commented Mar 5, 2013

Oozie users usually write case statement as follows:

<switch>
            <case to="foo">
                ${wf:actionData('bar')['baz'] == 1} 
            </case>             
            <default to="join"/>
        </switch>

A such entry lead vizoozie to generate an invalid DOT file. This pull request fix this issue. I decided to join all the lines since I never saw a huge EL expression in a case statement.

cykl added 2 commits March 5, 2013 15:23
An Oozie case statement can be multiline and even with simple expression users
often put the el expression on its own line. If not handled carrefully it leads to
an invalid file. Indeed, the DOT language specifies that a double-quoted string
"allows single logical lines to span multiple physical lines using the standard
C convention of a backslash immediately preceding a newline character."

Usually EL expressions are short enough to be merged as a single line. If
required we can use a more sophisticated algorithm to decide if the lines
should be joined or not.
Even if the DOT language specification says that the ID after (di)graph is
optional, some tools like dotty crash if ID is ommited.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant