src/Controller/ConfigurationController.php
public function configureWorkflowProcessorMessageQueueAction()
    {
        $queueEnabled = $this->bodyParam('enabled');

        if (! is_bool($queueEnabled)) {
            return new ApiProblemResponse(new ApiProblem(422, $this->translator->translate('The enabled flag should be a boolean value')));
        }

        if ($queueEnabled) {
            $this->commandBus->dispatch(
                EnableWorkflowProcessorMessageQueue::in(ConfigLocation::fromPath(Definition::getSystemConfigDir()))
            );
        } else {
            $this->commandBus->dispatch(
                DisableWorkflowProcessorMessageQueue::in(ConfigLocation::fromPath(Definition::getSystemConfigDir()))
            );
        }

        return ['success' => true];
    }
public function configureWorkflowProcessorMessageQueueAction()
    {
        $queueEnabled = $this->bodyParam('enabled');

        if (! is_bool($queueEnabled)) {
            return new ApiProblemResponse(new ApiProblem(422, $this->translator->translate('The enabled flag should be a boolean value')));
        }

        if ($queueEnabled) {
            $this->commandBus->dispatch(
                EnableWorkflowProcessorMessageQueue::in(ConfigLocation::fromPath(Definition::getSystemConfigDir()))
            );
        } else {
            $this->commandBus->dispatch(
                DisableWorkflowProcessorMessageQueue::in(ConfigLocation::fromPath(Definition::getSystemConfigDir()))
            );
        }

        return ['success' => true];
    }
public function configureWorkflowProcessorMessageQueueAction ( ) { $ queueEnabled = $ this -> bodyParam ( 'enabled' ) ; if ( ! is_bool ( $ queueEnabled ) ) { return new ApiProblemResponse ( new ApiProblem ( 422 , $ this -> translator -> translate ( 'The enabled flag should be a boolean value' ) ) ) ; } if ( $ queueEnabled ) { $ this -> commandBus -> dispatch ( EnableWorkflowProcessorMessageQueue :: in ( ConfigLocation :: fromPath ( Definition :: getSystemConfigDir ( ) ) ) ) ; } else { $ this -> commandBus -> dispatch ( DisableWorkflowProcessorMessageQueue :: in ( ConfigLocation :: fromPath ( Definition :: getSystemConfigDir ( ) ) ) ) ; } return [ 'success' => true ] ; }
Handles a POST request to enable or disable the workflow processor message queue
Handles a POST request to enable or disable the workflow processor message queue