Process the Extract action.

@throws ActionException If an error is encountered during processing.
551505
public function process()
    {
        parent::process();
        try {
            $this->profile = Teleport::loadProfile($this->profile);

            $this->getMODX($this->profile);

            $this->tpl = $this->loadTpl($this->tpl);

            $this->package = $this->createPackage($this->getName(), $this->getVersion(), $this->getSequence());

            if (isset($this->tpl['attributes'])) {
                foreach ($this->tpl['attributes'] as $attribute => $attributeValue) {
                    if (is_array($attributeValue) && isset($attributeValue['sourceType']) && isset($attributeValue['source'])) {
                        switch ($attributeValue['sourceType']) {
                            case 'fileContent':
                                $attributeValue = file_get_contents($attributeValue['source']);
                                break;
                        }
                    }
                    $this->package->setAttribute($attribute, $attributeValue);
                }
            }

            foreach ($this->tpl['vehicles'] as $vehicle) {
                $this->createVehicles($vehicle);
            }

            if (!$this->package->pack()) {
                throw new ActionException($this, "Error packing {$this->package->signature}.transport.zip");
            }
            $this->request->log("Successfully extracted {$this->package->signature}.transport.zip from instance {$this->profile->code}");
            if ($this->target && $this->push) {
                if (!$this->push($this->package->path . $this->package->signature . '.transport.zip', $this->target . $this->package->signature . '.transport.zip')) {
                    throw new ActionException($this, "Error pushing {$this->package->signature}.transport.zip to {$this->target}");
                }

                if (!$this->preserveWorkspace && $this->modx->getCacheManager()) {
                    $this->modx->cacheManager->deleteTree($this->package->path . $this->package->signature);
                    @unlink($this->package->path . $this->package->signature . '.transport.zip');
                }

                $this->request->log("Successfully pushed {$this->package->signature}.transport.zip to {$this->target}");
                $this->request->log("{$this->target}{$this->package->signature}.transport.zip", false);
            } else {
                $this->request->log("{$this->package->path}{$this->package->signature}.transport.zip", false);
            }
        } catch (\Exception $e) {
            throw new ActionException($this, "Error Extracting snapshot: " . $e->getMessage(), $e);
        }
    }
330389
public function process()
    {
        try {
            $this->processAlias();
            $this->processRoute();
            $this->output404();
        } catch (Exception $ex) {
            trigger_error($ex->getMessage());
            $this->response->outputError500();
        }
    }
812237
protected void executeReplies() {
		if(actionFrame.getEvent().verifyEventCondition(this.getEnvelope())) {
			if (actionFrame.getReplies() != null && actionFrame.getReplies().size() > 0) {
				if (actionFrame.processMultipleReply(envelope)
						&& this.botMillPolicy.equals(BotMillPolicy.FIRST_ONLY)) {
				}
			} else {
				if (actionFrame.process(envelope)
						&& this.botMillPolicy.equals(BotMillPolicy.FIRST_ONLY)) {
				}
			}
		}
		actionFrame = null;
	}
1046146
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException
   {
      String action = request.getParameter(ACTION_PARAM);

      if (action == null)
         action = DISPLAY_MBEANS_ACTION;

      if (action.equals(DISPLAY_MBEANS_ACTION))
         displayMBeans(request, response);
      else if (action.equals(INSPECT_MBEAN_ACTION))
         inspectMBean(request, response);
      else if (action.equals(UPDATE_ATTRIBUTES_ACTION))
         updateAttributes(request, response);
      else if (action.equals(INVOKE_OP_ACTION))
         invokeOp(request, response);
      else if (action.equals(INVOKE_OP_BY_NAME_ACTION))
         invokeOpByName(request, response);
   }
467700
public function handleAction(ActionEvent $event)
    {
        if (!$this->scopeDeterminator->currentScopeIsBackend()) {
            return;
        }

        $this->checkLanguage($event->getEnvironment(), 'create' === $event->getAction()->getName());
    }
35263
protected void preProcessExecute(
			ActionMapping mapping,
			ActionForm af,
			HttpServletRequest req,
			HttpServletResponse res)
			throws Exception{
		
	}
1279997
public function processAction() {
        // allow callers to set a targetUrl via the request
        if ($targetUrl = $this->_getSubmittedTargetUrl()) {
            Garp_Auth::getInstance()->getStore()->targetUrl = $targetUrl;
        }

        // never cache the process request
        $this->_helper->cache->setNoCacheHeaders($this->getResponse());
        // This action does not render a view, it only redirects elsewhere.
        $this->_helper->viewRenderer->setNoRender(true);
        $method = $this->getRequest()->getParam('method') ?: 'db';
        $adapter = Garp_Auth_Factory::getAdapter($method);
        $authVars = Garp_Auth::getInstance()->getConfigValues();

        $postData = $this->getRequest()->getPost();
        // Before login hook.
        $this->_beforeLogin($authVars, $adapter, $postData);

        /**
         * Params can come from GET or POST.
         * The implementing adapter should decide which to use,
         * using the current request to fetch params.
         */
        if (!$userData = $adapter->authenticate($this->getRequest(), $this->getResponse())) {
            $this->_respondToFaultyProcess($adapter);
            return;
        }

        $this->_helper->viewRenderer->setNoRender(true);

        // Check if adapter issued a redirect (as is the case with oAuth for instance)
        if ($this->getResponse()->isRedirect()) {
            return;
        }

        if ($userData instanceof Garp_Db_Table_Row) {
            $userData = $userData->toArray();
        }

        // Save user data in a store.
        Garp_Auth::getInstance()->store($userData, $method);

        // Store User role in a cookie, so that we can use it with Javascript.
        if (!Garp_Auth::getInstance()->getStore() instanceof Garp_Store_Cookie) {
            $this->_storeRoleInCookie();
        }

        // Determine targetUrl.
        // This is the URL the user was trying to access before logging in, or a default URL.
        $router = Zend_Controller_Front::getInstance()->getRouter();
        if (!empty($authVars['login']['successRoute'])) {
            $targetUrl = $router->assemble(array(), $authVars['login']['successRoute']);
        } elseif (!empty($authVars['login']['successUrl'])) {
            $targetUrl = $authVars['login']['successUrl'];
        } else {
            $targetUrl = '/';
        }
        $store = Garp_Auth::getInstance()->getStore();
        if ($store->targetUrl) {
            $targetUrl = $store->targetUrl;
            unset($store->targetUrl);
        }

        // After login hook.
        $this->_afterLogin($userData, $targetUrl);

        // Set a Flash message welcoming the user.
        $flashMessenger = $this->_helper->getHelper('FlashMessenger');
        $fullName = new Garp_Util_FullName($userData);
        $successMsg = __($authVars['login']['successMessage']);
        if (strpos($successMsg, '%s') !== false) {
            $successMsg = sprintf($successMsg, $fullName);
        } elseif (strpos('%USERNAME%', $successMsg) !== false) {
            $successMsg = Garp_Util_String::interpolate(
                $successMsg, array(
                'USERNAME' => $fullName
                )
            );
        }
        $flashMessenger->addMessage($successMsg);
        $this->_redirect($targetUrl);
    }
270290
public void extract() throws IOException, InterruptedException {

    try {
      extractorProvider.extract(archive, destination, progressListener);
    } catch (IOException ex) {
      try {
        logger.warning("Extraction failed, cleaning up " + destination);
        cleanUp(destination);
      } catch (IOException exx) {
        logger.warning("Failed to cleanup directory");
      }
      // intentional rethrow after cleanup
      throw ex;
    }

    // we do not allow interrupt mid extraction, so catch it here, we still end up
    // with a valid directory though, so don't clean it up.
    if (Thread.currentThread().isInterrupted()) {
      logger.warning("Process was interrupted");
      throw new InterruptedException("Process was interrupted");
    }
  }
283290
private void executeResult() throws Exception {
		result = createResult();

		String timerKey = "executeResult: " + getResultCode();
		try {
			UtilTimerStack.push(timerKey);
			if (result != null) {
				result.execute(this);
			} else if (resultCode != null && !Action.NONE.equals(resultCode)) {
				throw new ConfigurationException("No result defined for action " + getAction().getClass().getName()
						+ " and result " + getResultCode(), proxy.getConfig());
			} else {
				if (LOG.isDebugEnabled()) {
					LOG.debug("No result returned for action " + getAction().getClass().getName() + " at "
							+ proxy.getConfig().getLocation());
				}
			}
		} finally {
			UtilTimerStack.pop(timerKey);
		}
	}
895301
public function handleEvent(ActionEvent $event)
    {
        if (!$this->scopeDeterminator->currentScopeIsBackend()) {
            return;
        }

        $environment = $event->getEnvironment();
        $basic       = $environment->getDataDefinition()->getBasicDefinition();
        $action      = $event->getAction();

        if (null !== $event->getResponse()
            || ('showAll' !== $action->getName())
            || !$this->wantToHandle($basic->getMode(), $action)
        ) {
            return;
        }

        if (false !== ($response = $this->process($action, $environment))) {
            $event->setResponse($response);
        }
    }
852192
public void process() {
    // are we ready to process yet, or have we had an error, and are
    // waiting a bit longer in the hope that it will resolve itself?
    if (error_skips > 0) {
      error_skips--;
      return;
    }
    
    try {
      if (logger != null)
        logger.debug("Starting processing");
      status = "Processing";
      lastCheck = System.currentTimeMillis();

      // FIXME: how to break off processing if we don't want to keep going?
      processor.deduplicate(batch_size);

      status = "Sleeping";
      if (logger != null)
        logger.debug("Finished processing");
    } catch (Throwable e) {
      status = "Thread blocked on error: " + e;
      if (logger != null)
        logger.error("Error in processing; waiting", e);
      error_skips = error_factor;
    }
  }
74848
protected function doProcess(): void
    {
        $module = Request::getModule();
        $controller = Request::getController();
        $params = Request::getParams();

        try {
            // try to dispatch controller
            $result = $this->dispatch($module, $controller, $params);
        } catch (ForbiddenException $e) {
            // dispatch default error controller
            $result = $this->forbidden($e);
        } catch (RedirectException $e) {
            // should return `null` for disable output and setup redirect headers
            $result = $this->redirect($e);
        } catch (\Exception $e) {
            // dispatch default error controller
            $result = $this->error($e);
        }

        // setup layout, if needed
        if ($this->useLayout()) {
            // render view to layout
            // needed for headScript and headStyle helpers
            Layout::setContent($result->render());
            Response::setBody(Layout::getInstance());
        } else {
            Response::setBody($result);
        }
    }
15092
public function processSource(): void
    {
        if (null === $this->adapter) {
            throw new GridException('Grid Adapter is not initiated, please update method `init()` and try again');
        }

        try {
            $this->data = $this->getAdapter()->process(
                $this->getPage(),
                $this->getLimit(),
                $this->getFilters(),
                $this->getOrders()
            );
        } catch (\Exception $e) {
            throw new GridException('Grid Adapter can\'t process request: '. $e->getMessage());
        }
    }
592108
public function extract()
	{
		$this->reader->read($this->file);

		$this->converter
			 ->setExtension($this->extension)
			 ->process($this->reader->getData());
	}
36035
protected function process()
    {

        // prepare the store view code
        $this->getSubject()->prepareStoreViewCode();

        // set the entity ID for the product with the passed SKU
        if ($product = $this->loadProduct($this->getValue(ColumnKeys::SKU))) {
            $this->setIds($product);
        } else {
            $this->setIds(array());
        }

        // query whether or not the URL key column has a value
        if ($this->hasValue(ColumnKeys::URL_KEY)) {
            $this->setValue(ColumnKeys::URL_KEY, $this->makeUrlKeyUnique($this->getValue(ColumnKeys::URL_KEY)));
            return;
        }

        // query whether or not a product name is available
        if ($this->hasValue(ColumnKeys::NAME)) {
            $this->setValue(ColumnKeys::URL_KEY, $this->makeUrlKeyUnique($this->convertNameToUrlKey($this->getValue(ColumnKeys::NAME))));
            return;
        }

        // throw an exception, that the URL key can not be initialized and we're in admin store view
        if ($this->getSubject()->getStoreViewCode(StoreViewCodes::ADMIN) === StoreViewCodes::ADMIN) {
            throw new \Exception('Can\'t initialize the URL key because either columns "url_key" or "name" have a value set for default store view');
        }
    }
1338441
public function process()
	{
		$context = $this->getContext();
		$view = $this->getView();

		try
		{
			parent::process();
		}
		catch( \Aimeos\MShop\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
			$view->filterErrorList = $view->get( 'filterErrorList', [] ) + $error;
		}
		catch( \Aimeos\Controller\Frontend\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
			$view->filterErrorList = $view->get( 'filterErrorList', [] ) + $error;
		}
		catch( \Aimeos\Client\Html\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
			$view->filterErrorList = $view->get( 'filterErrorList', [] ) + $error;
		}
		catch( \Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
			$view->filterErrorList = $view->get( 'filterErrorList', [] ) + $error;
			$this->logException( $e );
		}
	}
628665
protected void process(T input) {
        try {
            Optional.ofNullable(this.transformFunction.apply(input))
                    .ifPresent(this.outputPublisher::submit);
        } catch (Exception e) {
            JMExceptionManager.handleException(log, e, "process", input);
        }
    }