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

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


        if (decisions.handleChildWorkflowExecutionClosed(workflowId)) {
            OpenRequestInfo<StartChildWorkflowReply, WorkflowType> scheduled = scheduledExternalWorkflows.remove(workflowId);
            if (scheduled != null) {
                Exception failure = new ChildWorkflowTimedOutException(event.getEventId(), execution,
                        attributes.getWorkflowType());
                ExternalTaskCompletionHandle context = scheduled.getCompletionHandle();
                context.fail(failure);
            }
        }
    }
View Full Code Here


        if (decisions.handleChildWorkflowExecutionClosed(workflowId)) {
            OpenRequestInfo<StartChildWorkflowReply, WorkflowType> scheduled = scheduledExternalWorkflows.remove(workflowId);
            if (scheduled != null) {
                Exception failure = new ChildWorkflowTerminatedException(event.getEventId(), execution,
                        attributes.getWorkflowType());
                ExternalTaskCompletionHandle context = scheduled.getCompletionHandle();
                context.fail(failure);
            }
        }
    }
View Full Code Here

                workflowExecution.setWorkflowId(workflowId);
                WorkflowType workflowType = attributes.getWorkflowType();
                String cause = attributes.getCause();
                Exception failure = new StartChildWorkflowFailedException(event.getEventId(), workflowExecution, workflowType,
                        cause);
                ExternalTaskCompletionHandle context = scheduled.getCompletionHandle();
                context.fail(failure);
            }
        }
    }
View Full Code Here

            if (scheduled != null) {
                String reason = attributes.getReason();
                String details = attributes.getDetails();
                Exception failure = new ChildWorkflowFailedException(event.getEventId(), execution, attributes.getWorkflowType(),
                        reason, details);
                ExternalTaskCompletionHandle context = scheduled.getCompletionHandle();
                context.fail(failure);
            }
        }
    }
View Full Code Here

        WorkflowExecution execution = attributes.getWorkflowExecution();
        String workflowId = execution.getWorkflowId();
        if (decisions.handleChildWorkflowExecutionClosed(workflowId)) {
            OpenRequestInfo<StartChildWorkflowReply, WorkflowType> scheduled = scheduledExternalWorkflows.remove(workflowId);
            if (scheduled != null) {
                ExternalTaskCompletionHandle context = scheduled.getCompletionHandle();
                String result = attributes.getResult();
                StartChildWorkflowReplyImpl startedReply = (StartChildWorkflowReplyImpl) scheduled.getResult().get();
                startedReply.setResult(result);
                context.complete();
            }
        }
    }
View Full Code Here

        String activityId = decisions.getActivityId(attributes);
        if (decisions.handleActivityTaskCanceled(event)) {
            CancellationException e = new CancellationException();
            OpenRequestInfo<String, ActivityType> scheduled = scheduledActivities.remove(activityId);
            if (scheduled != null) {
                ExternalTaskCompletionHandle completionHandle = scheduled.getCompletionHandle();
                // It is OK to fail with subclass of CancellationException when cancellation requested.
                // It allows passing information about cancellation (details in this case) to the surrounding doCatch block
                completionHandle.fail(e);
            }
        }
    }
View Full Code Here

        OpenRequestInfo<String, ActivityType> scheduled = scheduledActivities.remove(activityId);
        if (decisions.handleScheduleActivityTaskFailed(event)) {
            String cause = attributes.getCause();
            ScheduleActivityTaskFailedException failure = new ScheduleActivityTaskFailedException(event.getEventId(),
                    attributes.getActivityType(), activityId, cause);
            ExternalTaskCompletionHandle completionHandle = scheduled.getCompletionHandle();
            completionHandle.fail(failure);
        }
    }
View Full Code Here

        if (decisions.handleActivityTaskClosed(activityId)) {
            OpenRequestInfo<String, ActivityType> scheduled = scheduledActivities.remove(activityId);
            if (scheduled != null) {
                String result = attributes.getResult();
                scheduled.getResult().set(result);
                ExternalTaskCompletionHandle completionHandle = scheduled.getCompletionHandle();
                completionHandle.complete();
            }
        }
    }
View Full Code Here

            if (scheduled != null) {
                String reason = attributes.getReason();
                String details = attributes.getDetails();
                ActivityTaskFailedException failure = new ActivityTaskFailedException(event.getEventId(),
                        scheduled.getUserContext(), activityId, reason, details);
                ExternalTaskCompletionHandle completionHandle = scheduled.getCompletionHandle();
                completionHandle.fail(failure);
            }
        }
    }
View Full Code Here

            if (scheduled != null) {
                String timeoutType = attributes.getTimeoutType();
                String details = attributes.getDetails();
                ActivityTaskTimedOutException failure = new ActivityTaskTimedOutException(event.getEventId(),
                        scheduled.getUserContext(), activityId, timeoutType, details);
                ExternalTaskCompletionHandle completionHandle = scheduled.getCompletionHandle();
                completionHandle.fail(failure);
            }
        }
    }
View Full Code Here

TOP

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

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.