Execute action.

@param action the executable action
@param contentResult the content result
193116
private void execute(Executable action, ContentResult contentResult) {
        try {
            ChooseWhenRule chooseWhenRule = null;
            if (action.getCaseNo() > 0) {
                ChooseRuleMap chooseRuleMap = getTransletRule().getChooseRuleMap();
                if (chooseRuleMap == null || chooseRuleMap.isEmpty()) {
                    throw new IllegalRuleException("No defined choose rules");
                }
                ChooseRule chooseRule = chooseRuleMap.getChooseRule(action.getCaseNo());
                if (chooseRule == null) {
                    throw new IllegalRuleException("No choose rule with case number: " +
                            ChooseRule.toCaseGroupNo(action.getCaseNo()));
                }
                chooseWhenRule = chooseRule.getChooseWhenRule(action.getCaseNo());
                if (chooseWhenRule == null) {
                    throw new IllegalRuleException("No choose rule with case number: " + action.getCaseNo());
                }
                if (processedChooses != null && processedChooses.contains(chooseRule.getCaseNo())) {
                    return;
                }
                if (processedChooses == null || !processedChooses.contains(chooseWhenRule.getCaseNo())) {
                    BooleanExpression expression = new BooleanExpression(this);
                    if (expression.evaluate(chooseWhenRule)) {
                        if (processedChooses == null) {
                            processedChooses = new HashSet<>();
                        }
                        processedChooses.add(chooseRule.getCaseNo());
                        processedChooses.add(chooseWhenRule.getCaseNo());
                    } else {
                        return;
                    }
                }
            }

            if (log.isDebugEnabled()) {
                log.debug("Action " + action);
            }

            Object resultValue = action.execute(this);
            if (!action.isHidden() && contentResult != null && resultValue != ActionResult.NO_RESULT) {
                if (resultValue instanceof ProcessResult) {
                    contentResult.addActionResult(action, (ProcessResult) resultValue);
                } else {
                    contentResult.addActionResult(action, resultValue);
                }
            }

            if (action.isLastInChooseWhen() && chooseWhenRule != null && chooseWhenRule.getResponse() != null) {
                reserveResponse(chooseWhenRule.getResponse());
            }
        } catch (ActionExecutionException e) {
            throw e;
        } catch (Exception e) {
            setRaisedException(e);
            throw new ActionExecutionException("Failed to execute action " + action, e);
        }
    }
1347026
def Execute(self, action, *args, **kw):
        
        action = self.Action(action, *args, **kw)
        result = action([], [], self)
        if isinstance(result, SCons.Errors.BuildError):
            errstr = result.errstr
            if result.filename:
                errstr = result.filename + ': ' + errstr
            sys.stderr.write("scons: *** %s\n" % errstr)
            return result.status
        else:
            return result
90610
@Override
    public void execute() throws MojoExecutionException {
        try {
            ensureNotExisting();
            createDirectories();

            if ("blank".equalsIgnoreCase(skel)) {
                createApplicationConfiguration();
                createBlankPomFile();
                createPackageStructure();
                copyDefaultErrorTemplates();
            } else {
                createApplicationConfiguration();
                createPomFile();
                createPackageStructure();
                createDefaultController();
                createTests();
                copyAssets();
                createWelcomeTemplate();
                copyDefaultErrorTemplates();
            }

            printStartGuide();
        } catch (IOException e) {
            throw new MojoExecutionException("Error during project generation", e);
        }
    }
1106089
public static <T> ActionPredicate<T> fromAction
	(final Action<T> action,
	 final boolean predicateResult) {
	
	return new ActionPredicate<T>() {
	    public boolean actionPredicate(T obj) {
		action.action(obj);
		return predicateResult;
	    }
	};
    }
626708
public void execute(DelegateExecution execution) {
    boolean isSkipExpressionEnabled = SkipExpressionUtil.isSkipExpressionEnabled(execution, skipExpression);
    if (!isSkipExpressionEnabled || (isSkipExpressionEnabled && !SkipExpressionUtil.shouldSkipFlowElement(execution, skipExpression))) {

      if (Context.getProcessEngineConfiguration().isEnableProcessDefinitionInfoCache()) {
        ObjectNode taskElementProperties = Context.getBpmnOverrideElementProperties(serviceTaskId, execution.getProcessDefinitionId());
        if (taskElementProperties != null && taskElementProperties.has(DynamicBpmnConstants.SERVICE_TASK_CLASS_NAME)) {
          String overrideClassName = taskElementProperties.get(DynamicBpmnConstants.SERVICE_TASK_CLASS_NAME).asText();
          if (StringUtils.isNotEmpty(overrideClassName) && !overrideClassName.equals(className)) {
            className = overrideClassName;
            activityBehaviorInstance = null;
          }
        }
      }
      
      if (activityBehaviorInstance == null) {
        activityBehaviorInstance = getActivityBehaviorInstance();
      }

      try {
        activityBehaviorInstance.execute(execution);
      } catch (BpmnError error) {
        ErrorPropagation.propagateError(error, execution);
      } catch (RuntimeException e) {
        if (!ErrorPropagation.mapException(e, (ExecutionEntity) execution, mapExceptions))
          throw e;
      }
    }
  }
151567
private void sendSolutionActions(String action, String reqId){
        if(reqId!=null && !reqId.equals("")) {
            Map<String, String> map = Maps.newHashMap();
            map.put("action", action);
            map.put("reqid", reqId);
            this.sendEvent(map);
        }
    }
265202
public Api getActionResult(String action, String params) throws Exception {
    Api result = this.getActionResult(action, params, null, null);
    return result;
  }
582318
public ActionResult getActionResult(String actionId) {
        if (actionId == null) {
            return null;
        }
        for (ListIterator<ContentResult> iterator = listIterator(size()); iterator.hasPrevious();) {
            ContentResult contentResult = iterator.previous();
            ActionResult actionResult = contentResult.getActionResult(actionId);
            if (actionResult != null) {
                return actionResult;
            }
        }
        return null;
    }
482649
@Override
    public void execute ()
        throws BuildException
    {
        // make sure everythign was set up properly
        ensureSet(_actionDef, "Must specify the action sequence " +
                  "definitions via the 'actiondef' attribute.");
        ensureSet(_classDef, "Must specify the component class definitions " +
                  "via the 'classdef' attribute.");
        ensureSet(_target, "Must specify the path to the target bundle " +
                  "file via the 'target' attribute.");

        // make sure we can write to the target bundle file
        OutputStream fout = null;
        try {

            // parse our metadata
            Tuple<Map<String, ActionSequence>, Map<String, TileSet>> tuple = parseActions();
            Map<String, ActionSequence> actions = tuple.left;
            Map<String, TileSet> actionSets = tuple.right;
            Map<String, ComponentClass> classes = parseClasses();

            fout = createOutputStream(_target);

            // throw the serialized actions table in there
            fout = nextEntry(fout, BundleUtil.ACTIONS_PATH);
            ObjectOutputStream oout = new ObjectOutputStream(fout);
            oout.writeObject(actions);
            oout.flush();

            // throw the serialized action tilesets table in there
            fout = nextEntry(fout, BundleUtil.ACTION_SETS_PATH);
            oout = new ObjectOutputStream(fout);
            oout.writeObject(actionSets);
            oout.flush();

            // throw the serialized classes table in there
            fout =  nextEntry(fout, BundleUtil.CLASSES_PATH);
            oout = new ObjectOutputStream(fout);
            oout.writeObject(classes);
            oout.flush();

            // close it up and we're done
            fout.close();

        } catch (IOException ioe) {
            String errmsg = "Unable to output to target bundle " +
                "[path=" + _target.getPath() + "].";
            throw new BuildException(errmsg, ioe);

        } finally {
            if (fout != null) {
                try {
                    fout.close();
                } catch (IOException ioe) {
                    // nothing to complain about here
                }
            }
        }
    }
285386
public void setAction(String action)
    {
        ExtendedInfo info = getInfo(action);
        if (info != null)
            info._action = action;
    }
1217733
public ZealotKhala doAnything(ICustomAction action) {
        SqlInfo sqlInfo = this.source.getSqlInfo();
        action.execute(sqlInfo.getJoin(), sqlInfo.getParams());
        return this;
    }
720413
public com.google.iam.v1.BindingDelta.Action getAction() {
    com.google.iam.v1.BindingDelta.Action result = com.google.iam.v1.BindingDelta.Action.valueOf(action_);
    return result == null ? com.google.iam.v1.BindingDelta.Action.UNRECOGNIZED : result;
  }
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);
		}
	}
436032
@Override
	public <T> T execute(SolrCallback<T> action) {
		Assert.notNull(action, "SolrCallback must not be null!");

		try {
			SolrClient solrClient = this.getSolrClient();
			return action.doInSolr(solrClient);
		} catch (Exception e) {
			DataAccessException resolved = getExceptionTranslator().translateExceptionIfPossible(
					e instanceof RuntimeException ? (RuntimeException) e : new RuntimeException(e.getMessage(), e));
			throw resolved == null ? new UncategorizedSolrException(e.getMessage(), e) : resolved;
		}
	}
867457
@Override
    public <T> T action(EntityTypeActionOperation<T> entityTypeActionOperation)
            throws ServiceException {
        try {
            return service.action(entityTypeActionOperation);
        } catch (UniformInterfaceException e) {
            throw processCatch(new ServiceException(e));
        } catch (ClientHandlerException e) {
            throw processCatch(new ServiceException(e));
        }
    }
864533
function ReportContentAction(Content $content, Enums\Action $action)
    {
        $logItem = $this->CreateLogItem(Enums\ObjectType::Content(), $action);       
        if (!$action->Equals(Enums\Action::Delete()))
        {
            $logContent = new LogContent();
            $logContent->SetLogItem($logItem);
            $logContent->SetContent($content);
            $logContent->Save();
        }
        else
        {
            if ($content->GetContainerContent())
            {
                $this->ReportContainerAction($content->GetContainerContent()->GetContainer(), Enums\Action::ChildDelete());
            }
            else if ($content->GetPageContent())
            {
                $this->ReportPageAction($content->GetPageContent()->GetPage(), Enums\Action::ChildDelete());
            }
            else if ($content->GetLayoutContent())
            {
                $this->ReportAreaAction($content->GetLayoutContent()->GetArea(), Enums\Action::ChildDelete());
            }
        }
    }
180049
@Override
   public void execute()  throws MojoExecutionException, MojoFailureException
   {
      ClassLoader oldCL = SecurityActions.getThreadContextClassLoader();
      try 
      {
         SecurityActions.setThreadContextClassLoader(SecurityActions.getClassLoader(ValidatorMojo.class));

         Validation.validate(getRarFile().toURI().toURL(), 
            getOutputDir(), getClasspath());
      }
      catch (Throwable t) 
      {
         t.printStackTrace();
      }
      finally
      {
         SecurityActions.setThreadContextClassLoader(oldCL);
      }
   }