blob: e0ed00057e2c4e88b231f73be81b63cc20bae95f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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();
}
}
|