Skip to content

Commit

Permalink
the reviewer activity now always stops in a suspend.
Browse files Browse the repository at this point in the history
  • Loading branch information
apotonick committed Mar 25, 2024
1 parent 6f5185e commit 433ac4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ def build_custom_editor_lane(lanes, message_flow)

approver_start_suspend = nil
approver_activity = Class.new(Trailblazer::Activity::Railway) do
step task: approver_start_suspend = Trailblazer::Workflow::Event::Suspend.new(semantic: "invented_semantic", "resumes" => ["catch-before-decider-xxx"]), id: "~suspend~"
terminus task: approver_start_suspend = Trailblazer::Workflow::Event::Suspend.new(semantic: "invented_semantic", "resumes" => ["catch-before-decider-xxx"]), id: "~suspend~"

fail task: Trailblazer::Workflow::Event::Catch.new(semantic: "xxx --> decider"), id: "catch-before-decider-xxx", Output(:success) => Track(:failure)
fail :decider, id: "xxx",
Output(:failure) => Trailblazer::Activity::Railway.Id("xxx_reject")
fail task: decision_is_approve_throw = Trailblazer::Workflow::Event::Throw.new(semantic: "xxx_approve")
fail task: decision_is_approve_throw = Trailblazer::Workflow::Event::Throw.new(semantic: "xxx_approve"), Output(:success) => Id("~suspend~")

step task: decision_is_reject_throw = Trailblazer::Workflow::Event::Throw.new(semantic: "xxx_reject"),
magnetic_to: :reject, id: "xxx_reject"
magnetic_to: :reject, id: "xxx_reject", Output(:success) => Id("~suspend~")

def decider(ctx, decision: true, **)
# raise if !decision
Expand Down

0 comments on commit 433ac4a

Please sign in to comment.