Package com.amazonaws.services.simpleworkflow.flow.core

Examples of com.amazonaws.services.simpleworkflow.flow.core.Task


        public void signalRecieved(final String signalName, final String details) {
            if (getState() != State.TRYING) {
                throw new SignalExternalWorkflowException(0, childExecution, "UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION");
            }
            new Task(this) {

                @Override
                protected void doExecute() throws Throwable {
                    childWorkflowDefinition.signalRecieved(signalName, details);
                }
View Full Code Here


    }

    @Override
    public void requestCancelWorkflowExecution(Promise<?>... waitFor) {
        checkWorkflowExecution();
        new Task(waitFor) {

            @Override
            protected void doExecute() throws Throwable {
                GenericWorkflowClient client = getGenericClientToUse();
                client.requestCancelWorkflowExecution(workflowExecution);
View Full Code Here

                        schedulingOptions, startOptionsOverride);
                GenericWorkflowClient client = getGenericClientToUse();
                reply = client.startChildWorkflow(startParameters);
                runId.setDescription("runId of " + reply.getDescription());
                result.setDescription(reply.getDescription());
                new Task(reply) {

                    @Override
                    protected void doExecute() throws Throwable {
                        if (!runId.isReady()) {
                            runId.set(reply.get().getRunId());
View Full Code Here

    }

    @Override
    public void signalWorkflowExecution(final String signalName, final Object[] arguments, Promise<?>... waitFor) {
        checkWorkflowExecution();
        new Task(waitFor) {

            @Override
            protected void doExecute() throws Throwable {
                SignalExternalWorkflowParameters parameters = new SignalExternalWorkflowParameters();
                parameters.setSignalName(signalName);
View Full Code Here

    public Promise<Void> waitBlocked(Promise<?>... waitFor) {
        if (scope == null) {
            throw new IllegalArgumentException("Called outside of test method");
        }
        final Settable<Void> result = new Settable<Void>();
        new Task(waitFor) {

            @Override
            protected void doExecute() throws Throwable {
                waits.add(result);
            }
View Full Code Here

    public void clockAdvanceSeconds(final long seconds) {
        workflowClock.advanceSeconds(seconds);
    }

    public void clockAdvanceSeconds(final long seconds, Promise<?>... waitFor) {
        new Task(waitFor) {

            @Override
            protected void doExecute() throws Throwable {
                workflowClock.advanceSeconds(seconds);
            }
View Full Code Here

    static public void assertNotReady(Promise<?> condition) {
        Assert.assertFalse(condition.isReady());
    }

    static public void assertTrueWaitFor(final String message, final boolean condition, Promise<?>... waitFor) {
        new Task(waitFor) {

            @Override
            protected void doExecute() throws Throwable {
                Assert.assertTrue(message, condition);
            }
View Full Code Here

            }
        };
    }

    static public void assertTrue(final String message, final Promise<Boolean> condition) {
        new Task(condition) {

            @Override
            protected void doExecute() throws Throwable {
                Assert.assertTrue(message, condition.get());
            }
View Full Code Here

            }
        };
    }

    static public void assertTrueWaitFor(final boolean condition, Promise<?>... waitFor) {
        new Task(waitFor) {

            @Override
            protected void doExecute() throws Throwable {
                Assert.assertTrue(condition);
            }
View Full Code Here

            }
        };
    }

    static public void assertTrue(final Promise<Boolean> condition) {
        new Task(condition) {

            @Override
            protected void doExecute() throws Throwable {
                Assert.assertTrue(condition.get());
            }
View Full Code Here

TOP

Related Classes of com.amazonaws.services.simpleworkflow.flow.core.Task

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.