summaryrefslogtreecommitdiff
path: root/tests/temporal/Workflow/WithChildWorkflow.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/temporal/Workflow/WithChildWorkflow.php')
-rw-r--r--tests/temporal/Workflow/WithChildWorkflow.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/temporal/Workflow/WithChildWorkflow.php b/tests/temporal/Workflow/WithChildWorkflow.php
new file mode 100644
index 00000000..aac0979b
--- /dev/null
+++ b/tests/temporal/Workflow/WithChildWorkflow.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Temporal\Tests\Workflow;
+
+use Temporal\Workflow;
+use Temporal\Workflow\WorkflowMethod;
+
+#[Workflow\WorkflowInterface]
+class WithChildWorkflow
+{
+ #[WorkflowMethod(name: 'WithChildWorkflow')]
+ public function handler(
+ string $input
+ ): iterable {
+ $result = yield Workflow::executeChildWorkflow(
+ 'SimpleWorkflow',
+ ['child ' . $input],
+ Workflow\ChildWorkflowOptions::new()
+ );
+
+ return 'Child: ' . $result;
+ }
+}