diff options
Diffstat (limited to 'tests/temporal/Workflow/ExceptionalActivityWorkflow.php')
-rw-r--r-- | tests/temporal/Workflow/ExceptionalActivityWorkflow.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/temporal/Workflow/ExceptionalActivityWorkflow.php b/tests/temporal/Workflow/ExceptionalActivityWorkflow.php new file mode 100644 index 00000000..e0ed0005 --- /dev/null +++ b/tests/temporal/Workflow/ExceptionalActivityWorkflow.php @@ -0,0 +1,25 @@ +<?php + +namespace Temporal\Tests\Workflow; + +use Temporal\Activity\ActivityOptions; +use Temporal\Common\RetryOptions; +use Temporal\Tests\Activity\SimpleActivity; +use Temporal\Workflow; +use Temporal\Workflow\WorkflowMethod; + +#[Workflow\WorkflowInterface] +class ExceptionalActivityWorkflow +{ + #[WorkflowMethod(name: 'ExceptionalActivityWorkflow')] + public function handler() + { + $simple = Workflow::newActivityStub( + SimpleActivity::class, + ActivityOptions::new()->withStartToCloseTimeout(5) + ->withRetryOptions((new RetryOptions())->withMaximumAttempts(1)) + ); + + return yield $simple->fail(); + } +} |