We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Failure in C2 does rollback C1 and P1 with wrong context.success? = true While P2 perform is executed.
C2
C1
P1
context.success?
P2
> [P1][Perform] | context: true > [C1][Perform] | context: true > [C2][Perform] | context: true > [C2][Rollback] | context: false > [C1][Rollback] | context: true > [P1][Rollback] | context: true > [P2][Perform] | context: false
C1 and P1 should have context.success? = false P2 perform should not execute
> [P1][Perform] | context: true > [C1][Perform] | context: true > [C2][Perform] | context: true > [C2][Rollback] | context: false > [C1][Rollback] | context: false > [P1][Rollback] | context: false
class P1 < ::ActiveInteractor::Base def perform puts "> [P1][Perform] | context: #{context.success?}" end def rollback puts "> [P1][Rollback] | context: #{context.success?}" end end class C1 < ::ActiveInteractor::Base def perform puts "> [C1][Perform] | context: #{context.success?}" end def rollback puts "> [C1][Rollback] | context: #{context.success?}" end end class P2 < ::ActiveInteractor::Base def perform puts "> [P2][Perform] | context: #{context.success?}" end def rollback puts "> [P2][Rollback] | context: #{context.success?}" end end class C2 < ::ActiveInteractor::Base def perform puts "> [C2][Perform] | context: #{context.success?}" context.fail! end def rollback puts "> [C2][Rollback] | context: #{context.success?}" end end class ChildOrganizer < ActiveInteractor::Organizer::Base organize do add C1 add C2 end end class ParentOrganizer < ActiveInteractor::Organizer::Base organize do add P1 add ChildOrganizer add P2 end end ParentOrganizer.perform
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Current Behavior
Failure in
C2
does rollbackC1
andP1
with wrongcontext.success?
= trueWhile
P2
perform is executed.Expected Behavior
C1
andP1
should havecontext.success?
= falseP2
perform should not executeSteps to Reproduce
Additional Comments
The text was updated successfully, but these errors were encountered: