Package com.amazonaws.services.simpleworkflow.flow

Examples of com.amazonaws.services.simpleworkflow.flow.WorkflowClock


    @Around("execution(@com.amazonaws.services.simpleworkflow.flow.annotations.ExponentialRetry * *(..)) && @annotation(retryAnnotation)")
    public Object retry(final ProceedingJoinPoint pjp, ExponentialRetry retryAnnotation) throws Throwable {
        ExponentialRetryPolicy retryPolicy = createExponentialRetryPolicy(retryAnnotation);

        WorkflowClock clock = new DecisionContextProviderImpl().getDecisionContext().getWorkflowClock();
        AsyncExecutor executor = new AsyncRetryingExecutor(retryPolicy, clock);

        Settable<?> result;
        if (isVoidReturnType(pjp)) {
            result = null;
View Full Code Here


            }
            childExecution.setWorkflowId(workflowId);
            childExecution.setRunId(runId);

            final GenericActivityClient activityClient = parentDecisionContext.getActivityClient();
            final WorkflowClock workflowClock = parentDecisionContext.getWorkflowClock();
            WorkflowDefinitionFactory factory;
            if (factoryFactory == null) {
                throw new IllegalStateException("required property factoryFactory is null");
            }
            factory = factoryFactory.getWorkflowDefinitionFactory(workflowType);
View Full Code Here

        cronOptions.setMaximumRetryIntervalSeconds(600);
        cronOptions.setRetryExpirationIntervalSeconds(3500);
        final String cronExpression = "0 0 * * * *";
        cronOptions.setCronExpression(cronExpression);

        WorkflowClock clock = workflowTest.getDecisionContext().getWorkflowClock();
        clock.createTimer(SECONDS_HOUR * 24 * 7 + 1000);
        // true constructor argument makes TryCatchFinally a daemon which causes it get cancelled after above timer firing
        new TryCatchFinally(true) {

            Throwable failure;

View Full Code Here

        cronOptions.setContinueAsNewAfterSeconds(SECONDS_HOUR * 24 + 300);
        cronOptions.setTimeZone("PST");
        final String cronExpression = "0 0 * * * *";
        cronOptions.setCronExpression(cronExpression);

        WorkflowClock clock = workflowTest.getDecisionContext().getWorkflowClock();
        clock.createTimer(SECONDS_HOUR * 24 * 7 + 1000);
        // true constructor argument makes TryCatchFinally a daemon which causes it get cancelled after above timer firing
        new TryCatchFinally(true) {

            Throwable failure;

View Full Code Here

    @Around("execution(@com.amazonaws.services.simpleworkflow.flow.annotations.ExponentialRetry * *(..)) && @annotation(retryAnnotation)")
    public Object retry(final ProceedingJoinPoint pjp, ExponentialRetry retryAnnotation) throws Throwable {
        ExponentialRetryPolicy retryPolicy = createExponentialRetryPolicy(retryAnnotation);

        WorkflowClock clock = new DecisionContextProviderImpl().getDecisionContext().getWorkflowClock();
        AsyncExecutor executor = new AsyncRetryingExecutor(retryPolicy, clock);

        Settable<?> result;
        if (isVoidReturnType(pjp)) {
            result = null;
View Full Code Here

            }
            childExecution.setWorkflowId(workflowId);
            childExecution.setRunId(runId);

            final GenericActivityClient activityClient = parentDecisionContext.getActivityClient();
            final WorkflowClock workflowClock = parentDecisionContext.getWorkflowClock();
            WorkflowDefinitionFactory factory;
            if (factoryFactory == null) {
                throw new IllegalStateException("required property factoryFactory is null");
            }
            factory = factoryFactory.getWorkflowDefinitionFactory(workflowType);
View Full Code Here

    @Around("execution(@com.amazonaws.services.simpleworkflow.flow.annotations.ExponentialRetry * *(..)) && @annotation(retryAnnotation)")
    public Object retry(final ProceedingJoinPoint pjp, ExponentialRetry retryAnnotation) throws Throwable {
        ExponentialRetryPolicy retryPolicy = createExponentialRetryPolicy(retryAnnotation);

        WorkflowClock clock = new DecisionContextProviderImpl().getDecisionContext().getWorkflowClock();
        AsyncExecutor executor = new AsyncRetryingExecutor(retryPolicy, clock);

        Settable<?> result;
        if (isVoidReturnType(pjp)) {
            result = null;
View Full Code Here

            }
            childExecution.setWorkflowId(workflowId);
            childExecution.setRunId(runId);

            final GenericActivityClient activityClient = parentDecisionContext.getActivityClient();
            final WorkflowClock workflowClock = parentDecisionContext.getWorkflowClock();
            WorkflowDefinitionFactory factory;
            if (factoryFactory == null) {
                throw new IllegalStateException("required property factoryFactory is null");
            }
            factory = factoryFactory.getWorkflowDefinitionFactory(workflowType);
View Full Code Here

        super(retryCallable, retryPolicy);
    }

    @Override
    public Object execute() throws Throwable {
        WorkflowClock clock = contextProvider.getDecisionContext().getWorkflowClock();
        scheduleWithRetry(null, 1, clock.currentTimeMillis(), 0, clock);
        return null;
    }
View Full Code Here

    }

    @Override
    public Object execute() throws Throwable {
        Settable<Object> result = new Settable<Object>();
        WorkflowClock clock = contextProvider.getDecisionContext().getWorkflowClock();
        scheduleWithRetry(result, null, 1, clock.currentTimeMillis(),
                0, clock);
        return result;
    }
View Full Code Here

TOP

Related Classes of com.amazonaws.services.simpleworkflow.flow.WorkflowClock

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.