WorkflowOutboundRequestInterceptor
extends
Interceptor
in
Intercept a request before it's sent to RoadRunner.
It's recommended to use WorkflowOutboundRequestInterceptorTrait when implementing this interface because the interface might be extended in the future. The trait will provide forward compatibility.
class MyWorkflowOutboundRequestInterceptor implements WorkflowOutboundRequestInterceptor
{
use WorkflowOutboundRequestInterceptorTrait;
private function executeActivityRequest(ExecuteActivity $request, callable $next): PromiseInterface
{
error_log('Starting activity: ' . $request->getActivityName());
return $next($request);
}
}
Table of Contents
Methods
- handleOutboundRequest() : PromiseInterface
Methods
handleOutboundRequest()
public
handleOutboundRequest(RequestInterface $request, callable(RequestInterface): PromiseInterface $next) : PromiseInterface
Parameters
- $request : RequestInterface
- $next : callable(RequestInterface): PromiseInterface