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

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


    /**
     * Asserts that two Promises content refer to the same object. If they are
     * not, an {@link AssertionError} is thrown with the given message.
     */
    static public void assertSame(final Object expected, final Promise<Object> actual) {
        new Task(actual) {

            @Override
            protected void doExecute() throws Throwable {
                Assert.assertSame(expected, actual.get());
            }
View Full Code Here


        };
    }

    static public void assertNotSameWaitFor(final String message, final Object expected, final Object actual,
            Promise<?>... waitFor) {
        new Task(waitFor) {

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

    /**
     * Asserts that two Promises content do not refer to the same object. If
     * they are an {@link AssertionError} is thrown with the given message.
     */
    static public void assertNotSame(final String message, final Object expected, final Promise<Object> actual) {
        new Task(actual) {

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

            }
        };
    }

    static public void assertNotSameWaitFor(final Object expected, final Object actual, Promise<?>... waitFor) {
        new Task(waitFor) {

            @Override
            protected void doExecute() throws Throwable {
                Assert.assertNotSame(expected, actual);
            }
View Full Code Here

    /**
     * Asserts that two Promises content do not refer to the same object. If
     * they are an {@link AssertionError} is thrown with the given message.
     */
    static public void assertNotSame(final Object expected, final Promise<Object> actual) {
        new Task(actual) {

            @Override
            protected void doExecute() throws Throwable {
                Assert.assertNotSame(expected, actual.get());
            }
View Full Code Here

            timerResult.set(context);
            if (handle.isReady()) {
                handle.get().complete();
            }
            else {
                new Task(handle) {

                    @Override
                    protected void doExecute() throws Throwable {
                        handle.get().complete();
                    }
View Full Code Here

    }

    private void continueAsNewWorkflowExecution(final ChildWorkflowTryCatchFinally tryCatch, final Settable<String> result) {
        // It is always set to ready with null if no continuation is necessary
        final Promise<ContinueAsNewWorkflowExecutionParameters> continueAsNew = tryCatch.getContinueAsNew();
        new Task(continueAsNew) {

            @Override
            protected void doExecute() throws Throwable {
                ContinueAsNewWorkflowExecutionParameters cp = continueAsNew.get();
                if (cp == null) {
View Full Code Here

        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 Promise<String> scheduleActivityTask(final String activity, final String version, final Promise<String> input) {
        final Settable<String> result = new Settable<String>();
        new Task(input) {

            @Override
            protected void doExecute() throws Throwable {
                result.chain(scheduleActivityTask(activity, version, input.get()));
            }
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

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.