diff --git a/Classes/Runtime/FusionObjects/MultiStepProcessImplementation.php b/Classes/Runtime/FusionObjects/MultiStepProcessImplementation.php index 2c5296c..97ff690 100644 --- a/Classes/Runtime/FusionObjects/MultiStepProcessImplementation.php +++ b/Classes/Runtime/FusionObjects/MultiStepProcessImplementation.php @@ -77,6 +77,10 @@ public function handle(ActionRequest $request, array $data = []): void $this->state = $this->formStateService->unserializeState($internalArguments['__state']); } + // make the current `data` available to the context before sub processes are evaluated + // as those may have conditions that rely on previous data + $this->runtime->pushContext('data', $this->getData()); + // evaluate the subprocesses this has to be done after the state was restored // as the current data may affect @if conditions $subProcesses = $this->getSubProcesses(); @@ -119,6 +123,9 @@ public function handle(ActionRequest $request, array $data = []): void $request->setArgument('__submittedArgumentValidationResults', new Result()); } } + + // restore fusion context to the state before data was pushed + $this->runtime->popContext(); } /**