File tree Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,8 @@ public function markStepAsCanceled(string $name): static
245245
246246 public function run (): void
247247 {
248+ $ this ->definition ->beforeRun ($ this );
249+
248250 if (
249251 $ this ->isFinished () ||
250252 $ this ->isFailed () ||
@@ -253,18 +255,10 @@ public function run(): void
253255 return ;
254256 }
255257
256- if ($ this ->definition ->shouldCancel ($ this )) {
257- $ this ->markAsCanceled ();
258-
259- return ;
260- }
261-
262258 if (! $ this ->definition ->shouldRun ($ this )) {
263259 return ;
264260 }
265261
266- $ this ->definition ->beforeRun ($ this );
267-
268262 $ this ->definition ->run ($ this );
269263
270264 $ this ->definition ->afterRun ($ this );
Original file line number Diff line number Diff line change @@ -30,11 +30,6 @@ public function start(): Workflow
3030 return $ workflow ;
3131 }
3232
33- public function shouldCancel (Workflow $ workflow ): bool
34- {
35- return false ;
36- }
37-
3833 public function shouldRun (Workflow $ workflow ): bool
3934 {
4035 return true ;
You can’t perform that action at this time.
0 commit comments