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

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


            protected void doFinally() throws Throwable {
                shouldRetry.set(failureToRetry);
            }
        };

        new Task(shouldRetry) {

            @Override
            protected void doExecute() throws Throwable {
                Throwable failure = shouldRetry.get();
                if (failure != null) {
View Full Code Here


            workflowAsyncScope = new UnhandledSignalAsyncScope(workflowAsyncScope.getOutput(), workflowAsyncScope.getFailure(),
                    workflowAsyncScope.isCancelRequested());
            completed = false;
        }
        // This task is attached to the root context of the workflowAsyncScope
        new Task(workflowAsyncScope) {

            @Override
            protected void doExecute() throws Throwable {
                definition.signalRecieved(signalAttributes.getSignalName(), signalAttributes.getInput());
            }
View Full Code Here

    @Test
    public void testThroughClientAssertWithTask() throws Exception {
        HelloWorldWorkflowClient workflow = workflowFactory.getClient();
        Promise<Void> done = workflow.helloWorld("AWS");
        new Task(done) {

            @Override
            protected void doExecute() throws Throwable {
                Assert.assertEquals("Hello AWS!", activitiesImplementation.getGreeting());
            }
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

        if (currentCommandTryCatchFinally != null) {
            // Skip duplicated calls to cancelCurrentAndReexecute
            if (commandDone == null) {
                commandDone = new Settable<Void>();
                currentCommandTryCatchFinally.cancel(null);
                new Task(commandDone) {

                    @Override
                    protected void doExecute() throws Throwable {
                        if (cancelledDueToRetryRequest) {
                            execute(command);
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

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.