File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -94,13 +94,13 @@ use Workflow\WorkflowStub;
9494class ParentWorkflow extends Workflow
9595{
9696 private bool $processed = false;
97- private ?string $approvalStatus = null;
97+ private ?string $status = null;
9898
9999 #[SignalMethod]
100100 public function process(string $status): void
101101 {
102102 $this->processed = true;
103- $this->approvalStatus = $status;
103+ $this->status = $status;
104104 }
105105
106106 public function execute()
@@ -111,7 +111,7 @@ class ParentWorkflow extends Workflow
111111
112112 yield WorkflowStub::await(fn () => $this->processed);
113113
114- $childHandle->process($this->approvalStatus );
114+ $childHandle->process($this->status );
115115
116116 $result = yield $child;
117117
@@ -154,7 +154,7 @@ class ParentWorkflow extends Workflow
154154 private ?int $childId = null;
155155
156156 #[QueryMethod]
157- public function getChildId (): ?int
157+ public function childId (): ?int
158158 {
159159 return $this->childId;
160160 }
@@ -176,7 +176,7 @@ Then you can interact with the child workflow directly.
176176
177177``` php
178178$workflow = WorkflowStub::load($workflowId);
179- $childWorkflow = WorkflowStub::load($workflow->getChildId ());
179+ $childWorkflow = WorkflowStub::load($workflow->childId ());
180180$childWorkflow->approve('approved');
181181```
182182
You can’t perform that action at this time.
0 commit comments