public function runImpl()
 {
     Log::writeInfo("Called invocation task: " . $this->rsi, $target = 'file');
     if ($this->rsi == null) {
         Log::writeInfo("Something is null in InvocationActionTask...");
         return;
     }
     try {
         if (GlobalState::$TYPE == 'CLOUD') {
             $xml_path = realpath(PathBuilder::getHostedService($this->rsi->getAppVersionId(), $this->rsi->getRelativePath()) . DS . "..") . DS . $this->rsi->getAppVersionId() . ".xml";
             HostedModelHolder::setXMLModel(file_get_contents($xml_path));
             // load xml from file to holder
         }
         $this->initSdk();
         $instance_class_name = $this->rsi->getClassName();
         $arguments = $this->rsi->getArguments();
         $hosted_mapper = new HostedMapper();
         $hosted_mapper->prepareArguments($arguments, $this->rsi->getMethod());
         if ($hosted_mapper->isError()) {
             Log::writeError($hosted_mapper->getError()['msg']);
             return ResponderProcessor::sendResult($this->rsi->getId(), $hosted_mapper->getError());
         }
         $reflection_method = new ReflectionMethod($this->rsi->getClassName(), $this->rsi->getMethod());
         $hosted_instance = new $instance_class_name();
         $this->setConfiguration($hosted_instance, $this->rsi->getConfiguration());
         $result = $reflection_method->invokeArgs($hosted_instance, $arguments);
         $invocation_result = new InvocationResult();
         $hosted_mapper->prepareResult($result);
         $invocation_result->setArguments($result);
         ResponderProcessor::sendResult($this->rsi->getId(), $invocation_result);
     } catch (Exception $e) {
         Log::writeError($e->getMessage());
     }
 }
 public function __construct()
 {
     $this->mapping_error = null;
     $this->xml_manager = new XmlManager();
     $this->xml_manager->loadDomtree(HostedModelHolder::getXMLModel());
 }