decouplio 1.0.0alpha1 → 1.0.0alpha4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +11 -1
  3. data/.rubocop.yml +7 -0
  4. data/README.md +12 -3
  5. data/benchmarks/Gemfile +2 -1
  6. data/benchmarks/multi_step_benchmark.rb +336 -0
  7. data/benchmarks/single_step_benchmark.rb +159 -0
  8. data/decouplio.gemspec +4 -4
  9. data/docker-compose.yml +13 -2
  10. data/lib/decouplio/action.rb +34 -3
  11. data/lib/decouplio/composer.rb +111 -22
  12. data/lib/decouplio/const/doby_aide_options.rb +15 -0
  13. data/lib/decouplio/const/error_messages.rb +9 -0
  14. data/lib/decouplio/const/reserved_methods.rb +13 -9
  15. data/lib/decouplio/const/results.rb +2 -0
  16. data/lib/decouplio/const/types.rb +19 -5
  17. data/lib/decouplio/const/validations/aide.rb +38 -0
  18. data/lib/decouplio/const/validations/doby.rb +36 -0
  19. data/lib/decouplio/const/validations/fail.rb +5 -1
  20. data/lib/decouplio/const/validations/octo.rb +2 -1
  21. data/lib/decouplio/errors/aide_can_not_be_first_step_error.rb +18 -0
  22. data/lib/decouplio/errors/aide_controversial_keys_error.rb +26 -0
  23. data/lib/decouplio/errors/aide_finish_him_error.rb +26 -0
  24. data/lib/decouplio/errors/doby_controversial_keys_error.rb +26 -0
  25. data/lib/decouplio/errors/doby_finish_him_error.rb +26 -0
  26. data/lib/decouplio/errors/execution_error.rb +20 -0
  27. data/lib/decouplio/errors/{fail_is_first_step_error.rb → fail_can_not_be_first_step_error.rb} +1 -1
  28. data/lib/decouplio/errors/step_is_not_defined_for_aide_error.rb +26 -0
  29. data/lib/decouplio/errors/step_is_not_defined_for_doby_error.rb +27 -0
  30. data/lib/decouplio/errors/step_is_not_defined_for_pass_error.rb +27 -0
  31. data/lib/decouplio/logic_dsl.rb +30 -3
  32. data/lib/decouplio/options_validator.rb +162 -13
  33. data/lib/decouplio/steps/aide.rb +37 -0
  34. data/lib/decouplio/steps/base_resq.rb +13 -3
  35. data/lib/decouplio/steps/doby.rb +14 -9
  36. data/lib/decouplio/steps/fail.rb +7 -22
  37. data/lib/decouplio/steps/inner_action_fail.rb +7 -22
  38. data/lib/decouplio/steps/inner_action_step.rb +7 -18
  39. data/lib/decouplio/steps/octo.rb +7 -2
  40. data/lib/decouplio/steps/service_fail.rb +11 -23
  41. data/lib/decouplio/steps/service_pass.rb +4 -1
  42. data/lib/decouplio/steps/service_step.rb +11 -19
  43. data/lib/decouplio/steps/shared/fail_resolver.rb +40 -0
  44. data/lib/decouplio/steps/shared/step_resolver.rb +43 -0
  45. data/lib/decouplio/steps/step.rb +7 -18
  46. data/lib/decouplio/steps/wrap.rb +7 -18
  47. data/lib/decouplio/validators/condition.rb +10 -0
  48. data/lib/decouplio/version.rb +1 -1
  49. metadata +30 -41
  50. data/benchmarks/benchmarks.rb +0 -527
  51. data/docs/_config.yml +0 -1
  52. data/docs/benchmarks.md +0 -1
  53. data/docs/context.md +0 -74
  54. data/docs/context.rb +0 -62
  55. data/docs/doby.md +0 -80
  56. data/docs/doby.rb +0 -38
  57. data/docs/error_store.md +0 -347
  58. data/docs/error_store.rb +0 -202
  59. data/docs/fail.md +0 -1016
  60. data/docs/fail.rb +0 -762
  61. data/docs/index.md +0 -25
  62. data/docs/inner_action.md +0 -63
  63. data/docs/inner_action.rb +0 -43
  64. data/docs/logic_block.md +0 -25
  65. data/docs/octo.md +0 -269
  66. data/docs/octo.rb +0 -164
  67. data/docs/pass.md +0 -309
  68. data/docs/pass.rb +0 -213
  69. data/docs/quick_start.md +0 -71
  70. data/docs/quick_start.rb +0 -38
  71. data/docs/resq.md +0 -263
  72. data/docs/resq.rb +0 -176
  73. data/docs/step.md +0 -737
  74. data/docs/step.rb +0 -526
  75. data/docs/step_as_a_service.md +0 -109
  76. data/docs/step_as_a_service.rb +0 -77
  77. data/docs/wrap.md +0 -232
  78. data/docs/wrap.rb +0 -137
data/docs/step.md DELETED
@@ -1,737 +0,0 @@
1
- # Step
2
-
3
- `step` is the basic type of `logic` steps
4
-
5
- ## Signature
6
-
7
- ```ruby
8
- step(step_name, **options)
9
- ```
10
-
11
- ## Behavior
12
-
13
- - when step method(`#step_one`) returns truthy value then it goes to success track(`step_two` step)
14
- - when step method(#step_one) returns falsy value then it goes to failure track(`fail_one` step)
15
-
16
- <details><summary><b>EXAMPLE (CLICK ME)</b></summary>
17
- <p>
18
-
19
- ```ruby
20
- require 'decouplio'
21
-
22
- class SomeAction < Decouplio::Action
23
- logic do
24
- step :step_one
25
- fail :fail_one
26
- step :step_two
27
- end
28
-
29
- def step_one(param_for_step_one:, **)
30
- param_for_step_one
31
- end
32
-
33
- def fail_one(**)
34
- ctx[:action_failed] = true
35
- end
36
-
37
- def step_two(**)
38
- ctx[:result] = 'Success'
39
- end
40
- end
41
-
42
- success_action = SomeAction.call(param_for_step_one: true)
43
- failure_action = SomeAction.call(param_for_step_one: false)
44
-
45
- success_action # =>
46
- # Result: success
47
-
48
- # Railway Flow:
49
- # step_one -> step_two
50
-
51
- # Context:
52
- # {:param_for_step_one=>true, :result=>"Success"}
53
-
54
- # Errors:
55
- # {}
56
-
57
- failure_action # =>
58
- # Result: failure
59
-
60
- # Railway Flow:
61
- # step_one -> fail_one
62
-
63
- # Context:
64
- # {:param_for_step_one=>false, :action_failed=>true}
65
-
66
- # Errors:
67
- # {}
68
- ```
69
-
70
- ```mermaid
71
- flowchart LR
72
- A(start)-->B(step_one);
73
- B(step_one)-->|success track|C(step_two);
74
- B(step_one)-->|failure track|D(fail_one);
75
- C(step_two)-->|success track|E(finish_success);
76
- D(fail_one)-->|failure track|F(finish_failure);
77
- ```
78
-
79
- </p>
80
- </details>
81
-
82
- ***
83
-
84
- ## Options
85
-
86
- ### on_success:
87
- |Allowed values|Description|
88
- |-|-|
89
- |:finish_him|action stops execution if `step` method returns truthy value|
90
- |symbol with next step name|step with specified symbol name performs if step method returns truthy value|
91
-
92
- ### on_success: :finish_him
93
-
94
- <details><summary><b>EXAMPLE (CLICK ME)</b></summary>
95
- <p>
96
-
97
- ```ruby
98
- require 'decouplio'
99
-
100
- class SomeActionOnSuccessFinishHim < Decouplio::Action
101
- logic do
102
- step :step_one, on_success: :finish_him
103
- fail :fail_one
104
- step :step_two
105
- end
106
-
107
- def step_one(param_for_step_one:, **)
108
- param_for_step_one
109
- end
110
-
111
- def fail_one(**)
112
- ctx[:action_failed] = true
113
- end
114
-
115
- def step_two(**)
116
- ctx[:result] = 'Success'
117
- end
118
- end
119
-
120
- success_action = SomeActionOnSuccessFinishHim.call(param_for_step_one: true)
121
- failure_action = SomeActionOnSuccessFinishHim.call(param_for_step_one: false)
122
- success_action # =>
123
- # Result: success
124
-
125
- # Railway Flow:
126
- # step_one
127
-
128
- # Context:
129
- # {:param_for_step_one=>true}
130
-
131
- # Errors:
132
- # {}
133
-
134
- failure_action # =>
135
- # Result: failure
136
-
137
- # Railway Flow:
138
- # step_one -> fail_one
139
-
140
- # Context:
141
- # {:param_for_step_one=>false, :action_failed=>true}
142
-
143
- # Errors:
144
- # {}
145
- ```
146
-
147
- ```mermaid
148
- flowchart LR
149
- 1(start)-->2(step_one);
150
- 2(step_one)-->|success track|3(finish_success);
151
- 2(step_one)-->|failure track|4(fail_one);
152
- 4(fail_one)-->|failure track|5(finish_failure);
153
- ```
154
- </p>
155
- </details>
156
-
157
- ***
158
-
159
- ### on_success: next success track step
160
-
161
- <details><summary><b>EXAMPLE (CLICK ME)</b></summary>
162
- <p>
163
-
164
- ```ruby
165
- require 'decouplio'
166
-
167
- class SomeActionOnSuccessToSuccessTrack < Decouplio::Action
168
- logic do
169
- step :step_one, on_success: :step_three
170
- fail :fail_one
171
- step :step_two
172
- step :step_three
173
- end
174
-
175
- def step_one(param_for_step_one:, **)
176
- param_for_step_one
177
- end
178
-
179
- def fail_one(**)
180
- ctx[:action_failed] = true
181
- end
182
-
183
- def step_two(**)
184
- ctx[:step_two] = 'Success'
185
- end
186
-
187
- def step_three(**)
188
- ctx[:result] = 'Result'
189
- end
190
- end
191
-
192
- success_action = SomeActionOnSuccessToSuccessTrack.call(param_for_step_one: true)
193
- failure_action = SomeActionOnSuccessToSuccessTrack.call(param_for_step_one: false)
194
- success_action # =>
195
- # Result: success
196
-
197
- # Railway Flow:
198
- # step_one -> step_three
199
-
200
- # Context:
201
- # {:param_for_step_one=>true, :result=>"Result"}
202
-
203
- # Errors:
204
- # {}
205
-
206
- failure_action # =>
207
- # Result: failure
208
-
209
- # Railway Flow:
210
- # step_one -> fail_one
211
-
212
- # Context:
213
- # {:param_for_step_one=>false, :action_failed=>true}
214
-
215
- # Errors:
216
- # {}
217
- ```
218
-
219
- ```mermaid
220
- flowchart LR
221
- A(start)-->B(step_one);
222
- B(step_one)-->|success track|C(step_three);
223
- B(step_one)-->|failure track|D(fail_one);
224
- C(step_three)-->|success track|E(finish_success);
225
- D(fail_one)-->|failure track|F(finish_failure);
226
- ```
227
-
228
- </p>
229
- </details>
230
-
231
- ***
232
-
233
- ### on_success: next failure track step
234
-
235
- Can be used if for some reason you need to jump to fail step
236
-
237
- <details><summary><b>EXAMPLE (CLICK ME)</b></summary>
238
- <p>
239
-
240
- ```ruby
241
- require 'decouplio'
242
-
243
- class SomeActionOnSuccessToFailureTrack < Decouplio::Action
244
- logic do
245
- step :step_one, on_success: :fail_two
246
- fail :fail_one
247
- step :step_two
248
- step :step_three
249
- fail :fail_two
250
- end
251
-
252
- def step_one(param_for_step_one:, **)
253
- param_for_step_one
254
- end
255
-
256
- def fail_one(**)
257
- ctx[:action_failed] = true
258
- end
259
-
260
- def step_two(**)
261
- ctx[:step_two] = 'Success'
262
- end
263
-
264
- def step_three(**)
265
- ctx[:result] = 'Result'
266
- end
267
-
268
- def fail_two(**)
269
- ctx[:fail_two] = 'Failure'
270
- end
271
- end
272
-
273
- success_action = SomeActionOnSuccessToFailureTrack.call(param_for_step_one: true)
274
- failure_action = SomeActionOnSuccessToFailureTrack.call(param_for_step_one: false)
275
- success_action # =>
276
- # Result: failure
277
-
278
- # Railway Flow:
279
- # step_one -> fail_two
280
-
281
- # Context:
282
- # {:param_for_step_one=>true, :fail_two=>"Failure"}
283
-
284
- # Errors:
285
- # {}
286
-
287
- failure_action # =>
288
- # Result: failure
289
-
290
- # Railway Flow:
291
- # step_one -> fail_one -> fail_two
292
-
293
- # Context:
294
- # {:param_for_step_one=>false, :action_failed=>true, :fail_two=>"Failure"}
295
-
296
- # Errors:
297
- # {}
298
- ```
299
-
300
- ```mermaid
301
- flowchart LR
302
- A(start)-->B(step_one);
303
- B(step_one)-->|success track|C(fail_two);
304
- B(step_one)-->|failure track|D(fail_one);
305
- C(fail_two)-->|success track|E(finish_failure);
306
- D(fail_one)-->|failure track|C(fail_two);
307
- C(fail_two)-->|failure track|E(finish_failure);
308
- ```
309
-
310
- </p>
311
- </details>
312
-
313
- ***
314
-
315
- ### on_failure:
316
- |Allowed values|Description|
317
- |-|-|
318
- |:finish_him|action stops execution if `step` method returns falsy value|
319
- |symbol with next step name|step with specified symbol name performs if step method returns falsy value|
320
-
321
- ### on_failure: :finish_him
322
-
323
- <details><summary><b>EXAMPLE (CLICK ME)</b></summary>
324
- <p>
325
-
326
- ```ruby
327
- require 'decouplio'
328
-
329
- class SomeActionOnFailureFinishHim < Decouplio::Action
330
- logic do
331
- step :step_one, on_failure: :finish_him
332
- fail :fail_one
333
- step :step_two
334
- fail :fail_two
335
- end
336
-
337
- def step_one(param_for_step_one:, **)
338
- param_for_step_one
339
- end
340
-
341
- def fail_one(**)
342
- ctx[:action_failed] = true
343
- end
344
-
345
- def step_two(**)
346
- ctx[:result] = 'Success'
347
- end
348
-
349
- def fail_two(**)
350
- ctx[:fail_two] = 'failure'
351
- end
352
- end
353
-
354
- success_action = SomeActionOnFailureFinishHim.call(param_for_step_one: true)
355
- failure_action = SomeActionOnFailureFinishHim.call(param_for_step_one: false)
356
- success_action # =>
357
- # Result: success
358
-
359
- # Railway Flow:
360
- # step_one -> step_two
361
-
362
- # Context:
363
- # {:param_for_step_one=>true, :result=>"Success"}
364
-
365
- # Errors:
366
- # {}
367
-
368
- failure_action # =>
369
- # Result: failure
370
-
371
- # Railway Flow:
372
- # step_one
373
-
374
- # Context:
375
- # {:param_for_step_one=>false}
376
-
377
- # Errors:
378
- # {}
379
- ```
380
-
381
- ```mermaid
382
- flowchart LR
383
- 1(start)-->2(step_one);
384
- 2(step_one)-->|success track|3(step_two);
385
- 3(step_two)-->|success track|5(finish_success);
386
- 2(step_one)-->|failure track|4(finish_failure);
387
- ```
388
- </p>
389
- </details>
390
-
391
- ***
392
-
393
- ### on_failure: next success track step
394
-
395
- Can be used in case if you need to come back to success track
396
-
397
- <details><summary><b>EXAMPLE (CLICK ME)</b></summary>
398
- <p>
399
-
400
- ```ruby
401
- require 'decouplio'
402
-
403
- class SomeActionOnFailureToSuccessTrack < Decouplio::Action
404
- logic do
405
- step :step_one, on_failure: :step_three
406
- fail :fail_one
407
- step :step_two
408
- fail :fail_two
409
- step :step_three
410
- end
411
-
412
- def step_one(param_for_step_one:, **)
413
- param_for_step_one
414
- end
415
-
416
- def fail_one(**)
417
- ctx[:action_failed] = true
418
- end
419
-
420
- def step_two(**)
421
- ctx[:result] = 'Success'
422
- end
423
-
424
- def fail_two(**)
425
- ctx[:fail_two] = 'failure'
426
- end
427
-
428
- def step_three(**)
429
- ctx[:step_three] = 'Success'
430
- end
431
- end
432
-
433
- success_action = SomeActionOnFailureToSuccessTrack.call(param_for_step_one: true)
434
- failure_action = SomeActionOnFailureToSuccessTrack.call(param_for_step_one: false)
435
- success_action # =>
436
- # Result: success
437
-
438
- # Railway Flow:
439
- # step_one -> step_two -> step_three
440
-
441
- # Context:
442
- # {:param_for_step_one=>true, :result=>"Success", :step_three=>"Success"}
443
-
444
- # Errors:
445
- # {}
446
-
447
-
448
- failure_action # =>
449
- # Result: success
450
-
451
- # Railway Flow:
452
- # step_one -> step_three
453
-
454
- # Context:
455
- # {:param_for_step_one=>false, :step_three=>"Success"}
456
-
457
- # Errors:
458
- # {}
459
- ```
460
-
461
- ```mermaid
462
- flowchart LR
463
- 1(start)-->2(step_one);
464
- 2(step_one)-->|success track|3(step_two);
465
- 3(step_two)-->|success track|4(step_three);
466
- 4(step_three)-->|success track|5(finish_success);
467
- 2(step_one)-->|failure track|4(step_three);
468
- ```
469
- </p>
470
- </details>
471
-
472
- ***
473
-
474
- ### on_failure: next failure track step
475
-
476
- <details><summary><b>EXAMPLE (CLICK ME)</b></summary>
477
- <p>
478
-
479
- ```ruby
480
- require 'decouplio'
481
-
482
- class SomeActionOnFailureToFailureTrack < Decouplio::Action
483
- logic do
484
- step :step_one, on_failure: :fail_two
485
- fail :fail_one
486
- step :step_two
487
- fail :fail_two
488
- step :step_three
489
- end
490
-
491
- def step_one(param_for_step_one:, **)
492
- param_for_step_one
493
- end
494
-
495
- def fail_one(**)
496
- ctx[:action_failed] = true
497
- end
498
-
499
- def step_two(**)
500
- ctx[:result] = 'Success'
501
- end
502
-
503
- def fail_two(**)
504
- ctx[:fail_two] = 'failure'
505
- end
506
-
507
- def step_three(**)
508
- ctx[:step_three] = 'Success'
509
- end
510
- end
511
-
512
- success_action = SomeActionOnFailureToFailureTrack.call(param_for_step_one: true)
513
- failure_action = SomeActionOnFailureToFailureTrack.call(param_for_step_one: false)
514
- success_action # =>
515
- # Result: success
516
-
517
- # Railway Flow:
518
- # step_one -> step_two -> step_three
519
-
520
- # Context:
521
- # {:param_for_step_one=>true, :result=>"Success", :step_three=>"Success"}
522
-
523
- # Errors:
524
- # {}
525
-
526
- failure_action # =>
527
- # Result: failure
528
-
529
- # Railway Flow:
530
- # step_one -> fail_two
531
-
532
- # Context:
533
- # {:param_for_step_one=>false, :fail_two=>"failure"}
534
-
535
- # Errors:
536
- # {}
537
- ```
538
-
539
- ```mermaid
540
- flowchart LR
541
- 1(start)-->2(step_one);
542
- 2(step_one)-->|success track|3(step_two);
543
- 3(step_two)-->|success track|4(step_three);
544
- 4(step_three)-->|success track|5(finish_success);
545
- 2(step_one)-->|failure track|6(fail_two);
546
- 6(fail_two)-->|failure track|7(finish_failure);
547
- ```
548
- </p>
549
- </details>
550
-
551
- ***
552
-
553
- ### if: condition method name
554
- Can be used in case if for some reason step shouldn't be executed
555
-
556
- <details><summary><b>EXAMPLE (CLICK ME)</b></summary>
557
- <p>
558
-
559
- ```ruby
560
- require 'decouplio'
561
-
562
- class SomeActionOnIfCondition < Decouplio::Action
563
- logic do
564
- step :step_one
565
- fail :fail_one
566
- step :step_two
567
- fail :fail_two
568
- step :step_three, if: :step_condition?
569
- end
570
-
571
- def step_one(param_for_step_one:, **)
572
- param_for_step_one
573
- end
574
-
575
- def fail_one(**)
576
- ctx[:action_failed] = true
577
- end
578
-
579
- def step_two(**)
580
- ctx[:result] = 'Success'
581
- end
582
-
583
- def fail_two(**)
584
- ctx[:fail_two] = 'failure'
585
- end
586
-
587
- def step_three(**)
588
- ctx[:step_three] = 'Success'
589
- end
590
-
591
- def step_condition?(step_condition_param:, **)
592
- step_condition_param
593
- end
594
- end
595
-
596
- condition_positive = SomeActionOnIfCondition.call(
597
- param_for_step_one: true,
598
- step_condition_param: true
599
- )
600
- condition_negative = SomeActionOnIfCondition.call(
601
- param_for_step_one: true,
602
- step_condition_param: false
603
- )
604
- condition_positive # =>
605
- # Result: success
606
-
607
- # Railway Flow:
608
- # step_one -> step_two -> step_three
609
-
610
- # Context:
611
- # {:param_for_step_one=>true, :step_condition_param=>true, :result=>"Success", :step_three=>"Success"}
612
-
613
- # Errors:
614
- # {}
615
-
616
- condition_negative # =>
617
- # Result: success
618
-
619
- # Railway Flow:
620
- # step_one -> step_two
621
-
622
- # Context:
623
- # {:param_for_step_one=>true, :step_condition_param=>false, :result=>"Success"}
624
-
625
- # Errors:
626
- # {}
627
- ```
628
-
629
- ```mermaid
630
- flowchart LR
631
- 1(start)-->2(step_one);
632
- 2(step_one)-->|condition positive|3(step_two);
633
- 3(step_two)-->|condition positive|4(step_three);
634
- 4(step_three)-->|condition positive|5(finish_success);
635
- 2(step_one)-->|condition negative|6(step_two);
636
- 6(step_two)-->|condition negative|7(finish_success);
637
- ```
638
- </p>
639
- </details>
640
-
641
- ***
642
-
643
- ### unless: condition method name
644
- Can be used in case if for some reason step shouldn't be executed
645
-
646
- <details><summary><b>EXAMPLE (CLICK ME)</b></summary>
647
- <p>
648
-
649
- ```ruby
650
- require 'decouplio'
651
-
652
- class SomeActionOnUnlessCondition < Decouplio::Action
653
- logic do
654
- step :step_one
655
- fail :fail_one
656
- step :step_two
657
- fail :fail_two
658
- step :step_three, unless: :step_condition?
659
- end
660
-
661
- def step_one(param_for_step_one:, **)
662
- param_for_step_one
663
- end
664
-
665
- def fail_one(**)
666
- ctx[:action_failed] = true
667
- end
668
-
669
- def step_two(**)
670
- ctx[:result] = 'Success'
671
- end
672
-
673
- def fail_two(**)
674
- ctx[:fail_two] = 'failure'
675
- end
676
-
677
- def step_three(**)
678
- ctx[:step_three] = 'Success'
679
- end
680
-
681
- def step_condition?(step_condition_param:, **)
682
- step_condition_param
683
- end
684
- end
685
-
686
- condition_positive = SomeActionOnUnlessCondition.call(
687
- param_for_step_one: true,
688
- step_condition_param: true
689
- )
690
- condition_negative = SomeActionOnUnlessCondition.call(
691
- param_for_step_one: true,
692
- step_condition_param: false
693
- )
694
- condition_positive # =>
695
- # Result: success
696
-
697
- # Railway Flow:
698
- # step_one -> step_two
699
-
700
- # Context:
701
- # {:param_for_step_one=>true, :step_condition_param=>true, :result=>"Success"}
702
-
703
- # Errors:
704
- # {}
705
-
706
- condition_negative # =>
707
- # Result: success
708
-
709
- # Railway Flow:
710
- # step_one -> step_two -> step_three
711
-
712
- # Context:
713
- # {:param_for_step_one=>true, :step_condition_param=>false, :result=>"Success", :step_three=>"Success"}
714
-
715
- # Errors:
716
- # {}
717
- ```
718
-
719
- ```mermaid
720
- flowchart LR
721
- 1(start)-->2(step_one);
722
- 2(step_one)-->|condition positive|3(step_two);
723
- 3(step_two)-->|condition positive|4(finish_success);
724
- 2(step_one)-->|condition negative|5(step_two);
725
- 5(step_two)-->|condition negative|6(step_three);
726
- 6(step_three)-->|condition negative|7(finish_success);
727
- ```
728
- </p>
729
- </details>
730
-
731
- ***
732
-
733
- ### finish_him: :on_success
734
- The same behavior as for `on_success: :finish_him`
735
-
736
- ### finish_him: :on_failure
737
- The same behavior as for `on_failure: :finish_him`