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

Response element migration does not account for error handling #530

Closed
afelisatti opened this issue Aug 5, 2021 · 1 comment
Closed

Comments

@afelisatti
Copy link

Response elements should be added as the last elements of a flow when migrated. However, this should consider that if the flow has error handling, then that component will be the last so the response elements should be added before it.
The current behavior generates invalid applications that fail on deployment since no elements are expected after the error handler:
Mule 3 flow:

    <flow name="simpleFlow">
        <response>
            <logger message="in response"/>
        </response>
        <logger/>
        <catch-exception-strategy when="#[exception.causedBy(java.lang.IllegalStateException)]">
            <logger message="#['IlegalState']" />
        </catch-exception-strategy>
    </flow>

Migrated Mule 4 result (fails to deploy):

    <flow name="simpleFlow">
        <try>
            <logger/>
        </try>
        <error-handler>
            <on-error-continue when="#[Java::isCausedBy(error.cause, 'java.lang.IllegalStateException', false)]">
                <logger message="#['IlegalState']" />
            </on-error-continue>
        </error-handler>
        <logger message="in response"/>
    </flow>
@holiday-sunrise
Copy link
Contributor

may you add a example application. did you have an idea in which step the failure occurs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants