/*! check if some event intercepts processing, send data to DataWrapper in other case

@param action
DataAction object
@param mode
name of inner mode ( will be used to generate event names )
547118
function check_exts($action,$mode){
		$old_config = new DataConfig($this->config);
		
		$this->connector->event->trigger("before".$mode,$action);
		if ($action->is_ready())
			LogMaster::log("Event code for ".$mode." processed");
		else {
			//check if custom sql defined
			$sql = $this->connector->sql->get_sql($mode,$action);
			if ($sql){
				$this->connector->sql->query($sql);
			}
			else{
				$action->sync_config($this->config);
				if ($this->connector->model && method_exists($this->connector->model, $mode)){
					call_user_func(array($this->connector->model, $mode), $action);
					LogMaster::log("Model object process action: ".$mode);
				}
				if (!$action->is_ready()){
					$method=array($this->connector->sql,$mode);
					if (!is_callable($method))
						throw new Exception("Unknown dataprocessing action: ".$mode);
					call_user_func($method,$action,$this->request);
				}
			}
		}
		$this->connector->event->trigger("after".$mode,$action);
		
		$this->config->copy($old_config);
	}
779062
private boolean cancelActiveAction(final Long actionId) {
        if (actionId != null) {
            try {
                deploymentManagement.cancelAction(actionId);
                return true;
            } catch (final CancelActionNotAllowedException e) {
                LOG.info("Cancel action not allowed exception :{}", e);
                return false;
            }
        }
        return false;
    }
927007
void addActionReleased(int click, EventAction action)
    {
        final Integer key = Integer.valueOf(click);
        final List<EventAction> list;
        if (actionsReleased.get(key) == null)
        {
            list = new ArrayList<>();
            actionsReleased.put(key, list);
        }
        else
        {
            list = actionsReleased.get(key);
        }
        list.add(action);
    }
1296229
function(action, data) {

    if(isUndefined(data)) {
      data = {};
    } else if(!isObject(data) && !isFunction) {
      throw new Error('Data passed to an advisor action must be in instance of Object.');
    }

    var executeAction;
    if(isFunction(data)) {
      executeAction = compose(this._askAdvisor.actions[action], data)
    } else {
      executeAction = partial(this._askAdvisor.actions[action], data);
    }

    this.then(function(advisorEvent, deferred, consequenceActions, streamEvent) {
      data.triggeringEvents = {
        advisor: advisorEvent,
        stream: streamEvent
      };
      if(isFunction(data)) {
        executeAction(advisorEvent, streamEvent);
      } else {
        if(this._waitTime) {
          setTimeout(function(){
            executeAction();
            deferred.resolve();
          }, this._waitTime);
          return;
        } else {
          executeAction();
        }
      }
      deferred.resolve();
    });

    // terminate chain
    return this;
  }
25892
protected void executeAction(Action action) {
        ProcessContext context = new ProcessContext(getProcessInstance().getKnowledgeRuntime());
        context.setNodeInstance(this);
        try {
            action.execute(context);
        } catch (Exception e) {
            String exceptionName = e.getClass().getName();
            ExceptionScopeInstance exceptionScopeInstance = (ExceptionScopeInstance)
                resolveContextInstance(ExceptionScope.EXCEPTION_SCOPE, exceptionName);
            if (exceptionScopeInstance == null) {
                throw new WorkflowRuntimeException(this, getProcessInstance(), "Unable to execute Action: " + e.getMessage(), e);
            }
            
            exceptionScopeInstance.handleException(exceptionName, e);
            cancel();
        }
    }
513223
private void sendAction(Context context, String action) {
        Intent intent = new Intent(context, PlaybackService.class);
        intent.setAction(action);
        LocalBroadcastManager.getInstance(context).sendBroadcast(intent);
    }
484214
private void executeAction(PluginAction action, boolean async, Object data) {
        if (hasListeners() || action == PluginAction.LOAD) {
            PluginEvent event = new PluginEvent(this, action, data);

            if (async) {
                EventUtil.post(event);
            } else {
                onAction(event);
            }
        }
    }
285386
public void setAction(String action)
    {
        ExtendedInfo info = getInfo(action);
        if (info != null)
            info._action = action;
    }
931533
function(action, implementation){
            this.resolvableActions                      = this.resolvableActions                        || {};
            this.resolvableActions[action]              = this.resolvableActions[action]                || {};
            this.resolvableActions[action].actionName   = this.resolvableActions[action].actionName     || action;

            implementation = implementation || RL.ResolvableAction.Types[action];
            this.resolvableActions[action] = Object.create(implementation);
            // merge could be used instead of Object.create but is less desirable
            // RL.Util.merge(this.resolvableAction.Types[action], implementation);

            if(this.resolvableActions[action].init){
                this.resolvableActions[action].init.call(this);
            }
        }
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));
        }
    }
376519
@Override
    public void doPortletAction(
            IPortletWindowId portletWindowId,
            HttpServletRequest request,
            HttpServletResponse response) {
        final long timeout = getPortletActionTimeout(portletWindowId, request);

        final IPortletExecutionWorker<Long> portletActionExecutionWorker =
                this.portletWorkerFactory.createActionWorker(request, response, portletWindowId);
        portletActionExecutionWorker.submit();

        try {
            portletActionExecutionWorker.get(timeout);
        } catch (Exception e) {
            // put the exception into the error map for the session
            final Map<IPortletWindowId, Exception> portletFailureMap = getPortletErrorMap(request);
            portletFailureMap.put(portletWindowId, e);
        }

        // If the worker is still running add it to the hung-workers queue
        if (!portletActionExecutionWorker.isComplete()) {
            cancelWorker(request, portletActionExecutionWorker);
        }

        // Is this portlet permitted to emit events?  (Or is it disablePortletEvents=true?)
        final IPortletWindow portletWindow =
                portletWindowRegistry.getPortletWindow(request, portletWindowId);
        IPortletDefinition portletDefinition =
                portletWindow.getPortletEntity().getPortletDefinition();
        IPortletDefinitionParameter disablePortletEvents =
                portletDefinition.getParameter(DISABLE_PORTLET_EVENTS_PARAMETER);
        if (disablePortletEvents != null && Boolean.parseBoolean(disablePortletEvents.getValue())) {
            logger.info(
                    "Ignoring portlet events for portlet '{}' because they have been disabled.",
                    portletDefinition.getFName());
        } else {
            // Proceed with events...
            final PortletEventQueue portletEventQueue =
                    this.eventCoordinationService.getPortletEventQueue(request);
            this.doPortletEvents(portletEventQueue, request, response);
        }
    }
237614
public void actionPerformed(ActionEvent e)
	{
		try
		{
			myFunctor.process();
		}
		catch (Exception _exception)
		{
			_exception.printStackTrace(System.err);
		}
	}
562003
@Override
    public void doAction(Action action) {
        BaseComponent parent = getParent();
        
        switch (action) {
            case REMOVE:
                ActionListener.unbindActionListeners(this, actionListeners);
                detach();
                break;
            
            case HIDE:
            case COLLAPSE:
                setVisible(false);
                break;
            
            case SHOW:
            case EXPAND:
                setVisible(true);
                break;
            
            case TOP:
                parent.addChild(this, 0);
                break;
        }
        
        if (parent != null) {
            EventUtil.post(MainController.ALERT_ACTION_EVENT, parent, action);
        }
    }
504935
function(event)
	{
		if(!this._isSuspended)
		{
			var res, view = this;
			while(view)
			{
				if(view.dispatcher !== null && view.dispatcher.hasAction(event.type))
				{
					if(process.env.NODE_ENV !== 'production')
					{
						try {
							view.dispatcher.trigger(event);
						}
						catch(e)
						{
							console.error('Caught exception in ' + this.element.getAttribute('data-kff-view') + '#dispatchEvent');
							console.info('View element', this.element);
							console.info('View object', this);
							console.info('Action object', event);
							console.info('Original error follows…');
							if(this.element)
							{
								this.element.scrollIntoView();
								this.element.style.outline = '2px dashed red';
							}
							throw e;
						}
					}
					else
					{
						view.dispatcher.trigger(event);
					}
					break;
				}
				if(view._isolated) view = null;
				else view = view.parentView;
			}
		}
	}
52240
@Override
    public void tryUnchecked(ActionToTry<E> action) {
        tryUnchecked(noParam -> {
            action.execute();
            return null;
        }, null);
    }
1182881
@Override
    public void actionPerformed(final ActionEvent EVENT) {
        if (lcdTextX > (lcdImage.getWidth() + VALUE_BOUNDARY.getWidth())) {
            lcdTextX = -VALUE_BOUNDARY.getBounds().width;
        }
        lcdTextX += 1;
        if (EVENT.getSource().equals(LCD_BLINKING_TIMER)) {
            lcdTextVisible ^= true;
        }
        repaint(getInnerBounds());
    }
1139520
public void porcessMixNotificationArrived(String message, String action) {
    if (!StringUtil.isEmpty(message) && !StringUtil.isEmpty(action)) {
      String channel = getChannel(message);
      if (channel == null || !containsDefaultPushCallback(channel)) {
        channel = AVOSCloud.getApplicationId();
      }

      sendNotificationBroadcast(channel, message, action);
    }
  }