Processes the input, e.g. store given values.
A view must be available and this method doesn't generate any output
besides setting view variables.
344162
public function process()
	{
		$view = $this->getView();
		$context = $this->getContext();
		$ids = (array) $view->param( 'fav_id', [] );

		try
		{
			if( $context->getUserId() != null && !empty( $ids ) )
			{
				switch( $view->param( 'fav_action' ) )
				{
					case 'add':
						$this->addFavorites( $ids ); break;
					case 'delete':
						$this->deleteFavorites( $ids ); break;
				}
			}

			parent::process();
		}
		catch( \Aimeos\MShop\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
			$view->favoriteErrorList = $view->get( 'favoriteErrorList', [] ) + $error;
		}
		catch( \Aimeos\Controller\Frontend\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
			$view->favoriteErrorList = $view->get( 'favoriteErrorList', [] ) + $error;
		}
		catch( \Aimeos\Client\Html\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
			$view->favoriteErrorList = $view->get( 'favoriteErrorList', [] ) + $error;
		}
		catch( \Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
			$view->favoriteErrorList = $view->get( 'favoriteErrorList', [] ) + $error;
			$this->logException( $e );
		}
	}
285449
private function processEntries(): void
    {
        if (empty($this->lines)) {
            return;
        }

        foreach ($this->lines as $line) {

            if ($this->isLineComment($line) || !$this->isLineSetter($line)) {
                continue;
            }

            $this->setVariable($line);
        }
    }
548600
public function init()
    {
        $this->_processRequest();

        // storing current view
        $shouldInitialize = $this->shouldInitializeComponents();

        // init all components if there are any
        if ($this->_blLoadComponents) {
            foreach ($this->_getComponentNames() as $componentName => $isNotCacheable) {
                // do not override initiated components
                if (!isset($this->_oaComponents[$componentName])) {
                    // component objects MUST be created to support user called functions
                    $component = oxNew($componentName);
                    $component->setParent($this);
                    $component->setThisAction($componentName);
                    $this->_oaComponents[$componentName] = $component;
                }

                // do we really need to initiate them ?
                if ($shouldInitialize) {
                    $this->_oaComponents[$componentName]->init();

                    // executing only is view does not have action method
                    if (!method_exists($this, $this->getFncName())) {
                        $this->_oaComponents[$componentName]->executeFunction($this->getFncName());
                    }
                }
            }
        }

        parent::init();
    }
1119962
public function process()
    {
        $this->processFields();

        $this->editableFields()->each(function (Field $field) {
            $field->placeholder($field->description());
            $field->setNewValue($this->getInput($field->elementName()));

            if ($field->hasValidNewValue()) {
                $field->applyFilter($this->query);
            }
        });

        if ($this->paginatorEnabled) {
            $this->paginator();
        }
    }
1284959
void process() {

        int len = vList.size();

        for (int i = 0; i < len; i++) {
            System.out.print(".");

            String file = (String) vList.elementAt(i);

            if (!processFile(file)) {
                System.out.println("in file " + file + " !");
            }
        }

        System.out.println("");
    }
1002080
public void doProcessOutput(BasicServlet servlet, HttpServletRequest req, HttpServletResponse res, PrintWriter outExt, ScreenModel screen) 
        throws ServletException, IOException
    {
        PrintWriter out = outExt;
        if (screen == null)
        {
        	if (out != null)
        		out.println("Error: default screen not available");
        }
        else
        {
            try
            { // create and execute the query
                // if no parameters, just print the form
                String strDatatype = this.getProperty(DBParams.DATATYPE); // Raw data (such as in image from the DB)
                if (strDatatype == null)
                {
                    if (out == null)
                        out = servlet.getOutputStream(res); // Always
                    ((ScreenModel)screen).printReport(out);
                }
                else
                {       // Raw data output
                    ((ScreenModel)screen).getScreenFieldView().sendData(req, res);
                }
                screen.free();
                screen = null;
            }
            catch (DBException ex) {
                if (out != null)
                {
                    out.println("<hr>*** SQLException caught ***<p>");
                    out.println("Message:  " + ex.getMessage() + "<br>");
                    ex.printStackTrace(out);
                }
                ex.printStackTrace();
            }
            catch (java.lang.Exception ex) {
                ex.printStackTrace();
            } finally {
            	if (outExt == null)
            		if (out != null)
            			out.close();
            }
        }
    }
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');
        }
    }
938365
private void processData() {
    List<VariableElement> dataFields = ElementFilter
        .fieldsIn(component.getEnclosedElements())
        .stream()
        .filter(field -> field.getAnnotation(Data.class) != null)
        .collect(Collectors.toList());

    if (dataFields.isEmpty()) {
      return;
    }

    dataFields.forEach(collectionFieldsValidator::validateComponentDataField);

    this.fieldsToMarkAsData.addAll(dataFields);
  }
681717
protected function process()
    {

        // add the SKU => entity ID/store view code mapping
        $this->addSkuEntityIdMapping($sku = $this->getValue(ColumnKeys::SKU));
        $this->addSkuStoreViewCodeMapping($sku, $this->getSubject()->getStoreViewCode(StoreViewCodes::ADMIN));

        // clean-up the repositories etc. to free memory
        $this->getProductBunchProcessor()->cleanUp();

        // temporary persist the SKU
        $this->setLastSku($sku);
    }
1134651
public function process()
	{
		$view = $this->getView();

		try
		{
			if( $view->param( 'cs_order', null ) === null ) {
				return;
			}


			$controller = \Aimeos\Controller\Frontend::create( $this->getContext(), 'basket' );
			$customerref = $view->param( 'cs_customerref' );
			$comment = $view->param( 'cs_comment' );

			if( $customerref || $comment )
			{
				$controller->get()->setCustomerReference( $customerref )->setComment( $comment );
				$controller->save();
			}


			// only start if there's something to do
			if( $view->param( 'cs_option_terms', null ) !== null
				&& ( $option = $view->param( 'cs_option_terms_value', 0 ) ) != 1
			) {
				$error = $view->translate( 'client', 'Please accept the terms and conditions' );
				$errors = $view->get( 'summaryErrorCodes', [] );
				$errors['option']['terms'] = $error;

				$view->summaryErrorCodes = $errors;
				$view->standardStepActive = 'summary';
				$view->standardErrorList = array( $error ) + $view->get( 'standardErrorList', [] );
			}


			parent::process();

			$controller->get()->check( \Aimeos\MShop\Order\Item\Base\Base::PARTS_ALL );
		}
		catch( \Exception $e )
		{
			$view->standardStepActive = 'summary';
			throw $e;
		}
	}
971036
protected function process()
    {

        // initialize the array for the artefacts and the store view codes
        $this->artefacts = array();
        $storeViewCodes = array();

        // load the SKU from the row
        $sku = $this->getValue(ColumnKeys::SKU);

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

        // try to load the store view code
        $storeViewCode = $this->getSubject()->getStoreViewCode(StoreViewCodes::ADMIN);

        // query whether or not we've a store view code
        if ($storeViewCode === StoreViewCodes::ADMIN) {
            // if not, load the websites the product is related with
            $websiteCodes = $this->getValue(ColumnKeys::PRODUCT_WEBSITES, array(), array($this, 'explode'));

            // load the store view codes of all websites
            foreach ($websiteCodes as $websiteCode) {
                $storeViewCodes = array_merge($storeViewCodes, $this->getStoreViewCodesByWebsiteCode($websiteCode));
            }
        } else {
            array_push($storeViewCodes, $storeViewCode);
        }

        // iterate over the available image fields
        foreach ($storeViewCodes as $storeViewCode) {
            // iterate over the store view codes and query if artefacts are already available
            if ($this->hasArtefactsByTypeAndEntityId(ProductUrlRewriteObserver::ARTEFACT_TYPE, $lastEntityId = $this->getSubject()->getLastEntityId())) {
                // if yes, load the artefacs
                $this->artefacts = $this->getArtefactsByTypeAndEntityId(ProductUrlRewriteObserver::ARTEFACT_TYPE, $lastEntityId);

                // override the existing data with the store view specific one
                for ($i = 0; $i < sizeof($this->artefacts); $i++) {
                    // query whether or not a URL key has be specfied and the store view codes are equal
                    if ($this->hasValue(ColumnKeys::URL_KEY) && $this->artefacts[$i][ColumnKeys::STORE_VIEW_CODE] === $storeViewCode) {
                        // update the URL key
                        $this->artefacts[$i][ColumnKeys::URL_KEY] = $this->getValue(ColumnKeys::URL_KEY);

                        // also update filename and line number
                        $this->artefacts[$i][ColumnKeys::ORIGINAL_DATA][ColumnKeys::ORIGINAL_FILENAME] = $this->getSubject()->getFilename();
                        $this->artefacts[$i][ColumnKeys::ORIGINAL_DATA][ColumnKeys::ORIGINAL_LINE_NUMBER] = $this->getSubject()->getLineNumber();
                    }
                }
            } else {
                // if no arefacts are available, append new data
                $artefact = $this->newArtefact(
                    array(
                        ColumnKeys::SKU                => $sku,
                        ColumnKeys::STORE_VIEW_CODE    => $storeViewCode,
                        ColumnKeys::CATEGORIES         => $this->getValue(ColumnKeys::CATEGORIES),
                        ColumnKeys::PRODUCT_WEBSITES   => $this->getValue(ColumnKeys::PRODUCT_WEBSITES),
                        ColumnKeys::VISIBILITY         => $this->getValue(ColumnKeys::VISIBILITY),
                        ColumnKeys::URL_KEY            => $this->getValue(ColumnKeys::URL_KEY)
                    ),
                    array(
                        ColumnKeys::SKU                => ColumnKeys::SKU,
                        ColumnKeys::STORE_VIEW_CODE    => ColumnKeys::STORE_VIEW_CODE,
                        ColumnKeys::CATEGORIES         => ColumnKeys::CATEGORIES,
                        ColumnKeys::PRODUCT_WEBSITES   => ColumnKeys::PRODUCT_WEBSITES,
                        ColumnKeys::VISIBILITY         => ColumnKeys::VISIBILITY,
                        ColumnKeys::URL_KEY            => ColumnKeys::URL_KEY,
                    )
                );

                // append the base image to the artefacts
                $this->artefacts[] = $artefact;
            }
        }

        // append the artefacts that has to be exported to the subject
        $this->addArtefacts($this->artefacts);
    }
763435
public function process()
	{
		$view = $this->getView();

		try
		{
			// only start if there's something to do
			if( $view->param( 'ca_billingoption', null ) === null ) {
				return;
			}

			$this->setAddress( $view );

			parent::process();
		}
		catch( \Aimeos\Controller\Frontend\Exception $e )
		{
			$view->billingError = $e->getErrorList();
			throw $e;
		}
	}
1015609
private function process()
    {
        if (empty($this->params)) {
            throw new ResolutionException('Parameters were not given');
        }
        $mode = $this->getMode();

        switch ($mode) {
            case 'list':
                $this->listAction();
                break;
            case 'compile':
                $this->compileAction();
                break;
        }
    }
763754
def process(self):
        
        try:
            result = self._func(*self._args, **self._kwds)
        except:
            self._result._set_exception()
        else:
            self._result._set_value(result)
880281
protected void process(String text, Map params, Writer writer){

        try{
            Template t = new Template("temp", new StringReader(text), FreeMarkerTL.getEnvironment().getConfiguration());
            t.process(params, writer);
        }catch(Exception e){          
            throw new ViewException(e);
        }
    }
1155062
public function run()
    {
        // Prepare data
        $view = $this->getView();

        // Render input for results
        if ($this->_renderInput) {
            if ($this->hasModel()) {
                echo Html::activeHiddenInput($this->model, $this->attribute, $this->options);
            } else {
                echo Html::hiddenInput($this->name, $this->value, $this->options);
            }
        }

        // Render editor container
        $containerOptions = $this->containerOptions;
        $tag              = ArrayHelper::remove($containerOptions, 'tag', 'div');
        echo Html::tag($tag, '', $containerOptions);

        // Prepare client options
        $clientOptions           = $this->clientOptions;
        $clientOptions['schema'] = $this->schema;

        try {
            $parsedValue = Json::decode($this->value);
        } catch (\Exception $e) {
            $parsedValue = null;
            \Yii::error($e->getMessage(), __METHOD__);
        }

        if (!empty($parsedValue)) {
            $clientOptions['startval'] = $parsedValue;
        }

        $clientOptions = Json::encode($clientOptions);

        // Prepare element IDs
        $widgetId    = $this->id;
        $inputId     = $this->inputId;
        $containerId = $this->containerOptions['id'];

        // Add the "JSONEditor" instance to the global window object, otherwise the instance is only available in "ready()" function scope
        $widgetJs = "window.{$widgetId} = new JSONEditor(document.getElementById('{$containerId}'), {$clientOptions});\n";
        // Add the "JSONEditor" instance to the global window.jsonEditors array.
        $widgetJs .= "if (!window.jsonEditors) { window.jsonEditors = []; } window.jsonEditors.push(window.{$widgetId});";

        $readyFunction = '';
        $readyFunction .= "{$widgetId}.on('change', function() { document.getElementById('{$inputId}').value = JSON.stringify({$widgetId}.getValue()); });\n";

        $widgetJs .= "{$widgetId}.on('ready', function() {\n{$readyFunction}\n});";

        // Register js code
        $view->registerJs($widgetJs, $view::POS_READY);

        parent::run();
    }
128145
public function process()
    {
        $context = $this->getContext();
        $templateProcessing = $this->getComponent();
        $trialCount = 0;
        
        // Make a copy of possibly impacted variables.
        $impactedVariables = Utils::templateProcessingImpactedVariables($templateProcessing);
        
        $tplVarCopies = array();
        foreach ($impactedVariables as $varIdentifier) {
            $tplVarCopies[] = clone $context->getVariable($varIdentifier);
        }
        
        do {
            $validConstraints = true;
            
            try {
                $trialCount++;
                
                foreach ($templateProcessing->getTemplateRules() as $rule) {
                    $processor = $this->getRuleProcessorFactory()->createProcessor($rule);
                    $processor->setState($context);
                    $processor->process();
                    $this->trace($rule->getQtiClassName() . ' executed.');
                }
            } catch (RuleProcessingException $e) {
                if ($e->getCode() === RuleProcessingException::EXIT_TEMPLATE) {
                    $this->trace('Termination of template processing.');
                } else if ($e->getCode() === RuleProcessingException::TEMPLATE_CONSTRAINT_UNSATISFIED) {
                    $this->trace('Unsatisfied template constraint.');
                    
                    // Reset variables with their originals.
                    foreach ($tplVarCopies as $copy) {
                        $context->getVariable($copy->getIdentifier())->setValue($copy->getDefaultValue());
                        $context->getVariable($copy->getIdentifier())->setDefaultValue($copy->getDefaultValue());
                        
                        if ($copy instanceof ResponseVariable) {
                            $context->getVariable($copy->getIdentifier())->setCorrectResponse($copy->getCorrectResponse());
                        }
                    }

                    $validConstraints = false;
                } else {
                    throw $e;
                }
            }
        } while ($validConstraints === false && $trialCount < 100);
    }