Asynchronously
The current thread asynchronous run relative to the main thread,
not blocking the current thread

@param action Action Interface
978898
public static Result onUiAsync(Action action) {
        if (Looper.myLooper() == Looper.getMainLooper()) {
            action.call();
            return new ActionAsyncTask(action, true);
        }
        ActionAsyncTask task = new ActionAsyncTask(action);
        getUiPoster().async(task);
        return task;
    }
759549
public void forEach(BiConsumer<? super K, ? super T> action) {
        connections.forEach((key, sync) -> sync.doWithConnection(action));
    }
383614
public void performAction() throws InterruptedException {
	if (isDone()) {
	    return;
	}

	performing.set(true);

	try {
	    getAction().perform(unschedulable); // Execute action
	} catch (final InterruptedException e) {
	    cancelled.set(true);
	    throw e;
	} catch (final Exception e) { // Continue
	    logger.log(Level.WARNING, "Error performing action", e);
	    if (!isPeriodicOnException()) {
		cancelled.set(true);
	    }
	} finally {
	    performing.set(false);
	    done.set(true);
	    signalRan(); // Wake up awaiting
	}

	if (isCancelled()) {
	    return;
	}

	if (isPeriodic()) {
	    estimated.set(System.nanoTime() + getPeriod(TimeUnit.NANOSECONDS));
	    done.set(false);
	    addAsWork(); // Add to engines work queue
	}
    }
1363924
@SuppressWarnings({"ConstantConditions","deprecation"})
    @SuppressFBWarnings("RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE")
    public void addAction(@Nonnull Action a) {
        if(a==null) {
            throw new IllegalArgumentException("Action must be non-null");
        }
        getActions().add(a);
    }
617225
public void setHandler(String contextId, Runnable action) {

        if (contextId != null) {
            m_createFunctions.put(contextId, action);
        }
    }
1162270
static <T> ContinuableFuture<T> executeOnUiThread(final Callable<T> action, final long delay) {
        return execute(new FutureTask<>(action), _UI_EXECUTOR, delay);
    }
51297
function ActionHandler(actionBlock, wait, dontCheckAlerts) {
    this.actionBlock = actionBlock;
    CommandHandler.call(this, "action", true);
    if (wait) {
        this.wait = true;
    }
    // note that dontCheckAlerts could be undefined!!!
    this.checkAlerts = (dontCheckAlerts) ? false : true;
}
1279410
@Override
    public void doAction(Action action) {
        switch (action) {
            case REMOVE:
                close();
                break;
            
            case HIDE:
                setVisible(false);
                break;
            
            case SHOW:
                setVisible(true);
                break;
            
            case COLLAPSE:
                setSize(Size.MINIMIZED);
                break;
            
            case EXPAND:
                setSize(Size.NORMAL);
                break;
            
            case TOP:
                moveToTop();
                break;
        }
    }
872505
@Override
    public <V> Future<V> submit(String name, Callable<V> action) {
        ActionEvent<V> event = ActionEvent.create(name, action);
        return sink.add(event, Channel.BROADCAST);
    }
1055515
static ContinuableFuture<Void> execute(final Try.Runnable<? extends Exception> action) {
        return execute(new FutureTask<Void>(FN.toCallable(action)), SERIAL_EXECUTOR);
    }
441458
public function setCurrentAction($action): void
    {
        if (!$action instanceof Action) {
            $action = $this->getAction($action);
        }
        $this->currentAction = $action;
    }
322914
@Override
    public void submit(String name, Runnable action) {
        ActionEvent<Void> event = ActionEvent.create(name, action);
        sink.add(event, Channel.BROADCAST);
    }
507292
private void updateStopRunnable(final int action) {
        if (stopRunnable != null) {
            if (action == 0) {
                handler.removeCallbacks(stopRunnable);
            } else if (action == 1) {
                handler.removeCallbacks(stopRunnable);
                handler.postDelayed(stopRunnable, STOP_DELAY);
            }
        }
    }
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();
        }
    }
611644
protected void onError(Action action, Throwable t) {
        Console.error(Console.CONSTANTS.lastActionError(), t.getMessage());
    }
1344799
public void setAction(String action) throws ApplicationException {
	if (StringUtil.isEmpty(action)) return;
	action = action.toLowerCase().trim();
	if (action.equals("run")) this.action = ACTION_RUN;
	else if (action.equals("delete")) this.action = ACTION_DELETE;
	else if (action.equals("update")) this.action = ACTION_UPDATE;
	else if (action.equals("list")) this.action = ACTION_LIST;
	else if (action.equals("lists")) this.action = ACTION_LIST;
	else if (action.equals("pause")) this.action = ACTION_PAUSE;
	else if (action.equals("resume")) this.action = ACTION_RESUME;
	else throw new ApplicationException("attribute action with value [" + action + "] of tag schedule is invalid",
		"valid attributes are [delete,run,update,list,resume,pause]");
    }
1019522
@Override
    protected void doActionsInSwingThread() {
        if (component instanceof JComboBox) {
            ((JComboBox) component).setSelectedIndex(mIndex);
        } else if (component instanceof JList) {
            ((JList) component).setSelectedIndex(mIndex);
        }
    }