protected function saveItemState()
    {
        if ($this->getRequestParameter('itemDefinition') && $this->getRequestParameter('itemState')) {
            $serviceContext = $this->getServiceContext();
            $itemIdentifier = $this->getRequestParameter('itemDefinition');
            $state = $this->getRequestParameter('itemState') ? json_decode($this->getRequestParameter('itemState'), true) : new \stdClass();

            return $this->getRunnerService()->setItemState($serviceContext, $itemIdentifier, $state);
        }

        return false;
    }