public function createExecutor($application_id, $app_version_id)
 {
     $executor = new CodeExecutor($application_id, $app_version_id);
     try {
         // code download java driver on server side
         //CodeManagement::getInstance()->downloadCode( $application_id, $app_version_id );///
         $executor->init();
     } catch (Exception $e) {
         Log::writeError("Can not create executor for appVersionId: " . $app_version_id);
         Log::writeError("Can not create executor msg:" . $e->getMessage(), $target = "file");
     }
     return $executor;
 }
 public function getCodeExecutor($application_id, $app_version_id, $call_init = false)
 {
     if (GlobalState::$TYPE == "LOCAL") {
         if ($this->debug_executor == null) {
             $this->debug_executor = new CodeExecutor($application_id, $app_version_id);
         }
         return $this->debug_executor;
         // $this->debug_executor need one instance for  possibility set event model in EventModelParser  class
     }
     $executor = new CodeExecutor($application_id, $app_version_id);
     if ($call_init) {
         $executor->init();
         //in CLOUD mode red event model from file
     }
     return $executor;
 }