Description
When a SOAP call fails, RequestTask does not report the failure to the process manager:
- with
error_strategy: stop (the default), the process stops but is not failed: it ends with "executed successfully" and the console command exits 0;
- with
error_strategy: skip, the error outputs receive false instead of the task input, unlike every other task.
Reproduction
unreachable is a non-WSDL client whose location is a closed port (http://127.0.0.1:1/soap), so every call fails with a SoapFault:
clever_age_process:
configurations:
demo.soap.call_failure:
tasks:
entry:
service: '@CleverAge\ProcessBundle\Task\ConstantOutputTask'
options:
output:
sCountryISOCode: 'FR'
outputs: [request]
request:
service: '@CleverAge\SoapProcessBundle\Task\RequestTask'
error_strategy: 'stop'
options:
client: unreachable
method: 'FullCountryInfo'
outputs: [debug]
debug:
service: '@CleverAge\ProcessBundle\Task\Debug\DebugTask'
$ bin/console cleverage:process:execute demo.soap.call_failure
ALERT [app] Soap call 'FullCountryInfo' on '' failed : Could not connect to host [...]
ERROR [app] Empty resultset for query [...]
Process 'demo.soap.call_failure' executed successfully
$ echo $?
0
With error_strategy: skip and error_outputs: [debug_error] (demo.soap.call_failure_skip), debug_error dumps false.
Expected: the process fails (non-zero exit code) with the stop strategy; the error outputs receive the task input with the skip strategy.
Tested on main (1a796cb), cleverage/process-bundle 5.1, PHP 8.5, Symfony 7.4.
Cause
On a false result, RequestTask::execute() applies the error strategy itself: it calls $state->setStopped(true) without an exception (so the process history is never marked as failed) and $state->setErrorOutput(false). It then calls $state->setOutput(false) in every case.
Description
When a SOAP call fails,
RequestTaskdoes not report the failure to the process manager:error_strategy: stop(the default), the process stops but is not failed: it ends with "executed successfully" and the console command exits 0;error_strategy: skip, the error outputs receivefalseinstead of the task input, unlike every other task.Reproduction
unreachableis a non-WSDL client whoselocationis a closed port (http://127.0.0.1:1/soap), so every call fails with aSoapFault:With
error_strategy: skipanderror_outputs: [debug_error](demo.soap.call_failure_skip),debug_errordumpsfalse.Expected: the process fails (non-zero exit code) with the
stopstrategy; the error outputs receive the task input with theskipstrategy.Tested on
main(1a796cb), cleverage/process-bundle 5.1, PHP 8.5, Symfony 7.4.Cause
On a
falseresult,RequestTask::execute()applies the error strategy itself: it calls$state->setStopped(true)without an exception (so the process history is never marked as failed) and$state->setErrorOutput(false). It then calls$state->setOutput(false)in every case.