私の Grails アプリでは、次の (単純化された) Web フローを定義しました。
def registerFlow = {
start {
action {RegistrationCommand cmd ->
try {
memberService.validateRegistrationCommandDTO(cmd)
} catch (MemberException ex) {
flow.regErrorCode = ex.errorCode
throw ex
}
}
on("success").to "survey" // The 'survey' state has been omitted
on(MemberException).to "handleRegMemberException"
on(Exception).to "handleUnexpectedException"
}
handleRegMemberException {
action {
// Implementation omitted
}
}
handleUnexpectedException {
redirect(controller:'error', action:'serverError')
}
}
「開始」状態で MemberException がスローされた場合、実行は「handleRegMemberException」状態に進む必要がありますが、そうではありません。フローの定義、またはこれがどのように機能するかについての私の理解に何か問題がありますか?
ありがとう、ドン