Examples of WorkflowType


Examples of com.amazonaws.services.simpleworkflow.model.WorkflowType

    protected WorkflowType getWorkflowType(String interfaceName, Method method, Execute executeAnnotation) {
        assert (method != null);
        assert (executeAnnotation != null);

        WorkflowType workflowType = new WorkflowType();

        String workflowName = null;
        if (executeAnnotation.name() != null && !executeAnnotation.name().isEmpty()) {
            workflowName = executeAnnotation.name();
        }
        else {
            workflowName = interfaceName + "." + method.getName();
        }

        if (executeAnnotation.version().isEmpty()) {
            throw new IllegalArgumentException(
                    "Empty value of the required \"version\" parameter of the @Execute annotation found on "
                            + getMethodFullName(method));
        }
        workflowType.setName(workflowName);
        workflowType.setVersion(executeAnnotation.version());
        return workflowType;
    }
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.model.WorkflowType

    }

    public String[] startWorkflowExecution(String workflowId, String runId, String eventName, String version, Object arguments) {
        DynamicWorkflowClientExternalImpl dynamicWorkflowClientExternal = (DynamicWorkflowClientExternalImpl) getDynamicWorkflowClient(workflowId, runId);

        WorkflowType workflowType = new WorkflowType();
        workflowType.setName(eventName);
        workflowType.setVersion(version);
        dynamicWorkflowClientExternal.setWorkflowType(workflowType);
        dynamicWorkflowClientExternal.startWorkflowExecution(toArray(arguments));

        String newWorkflowId = dynamicWorkflowClientExternal.getWorkflowExecution().getWorkflowId();
        String newRunId = dynamicWorkflowClientExternal.getWorkflowExecution().getRunId();
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.model.WorkflowType

    }

    @Override
    public Iterable<WorkflowType> getWorkflowTypesToRegister() {
        ArrayList<WorkflowType> workflowTypes = new ArrayList<WorkflowType>(1);
        WorkflowType workflowType = new WorkflowType();
        workflowType.setName(configuration.getEventName());
        workflowType.setVersion(configuration.getVersion());
        workflowTypes.add(workflowType);
        return workflowTypes;
    }
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.model.WorkflowType

        return decider.getAsynchronousThreadDumpAsString();
    }

    private AsyncDecider createDecider(HistoryHelper historyHelper) throws Exception {
        DecisionTask decisionTask = historyHelper.getDecisionTask();
        WorkflowType workflowType = decisionTask.getWorkflowType();
        if (log.isDebugEnabled()) {
            log.debug("WorkflowTask received: taskId=" + decisionTask.getStartedEventId() + ", taskToken="
                    + decisionTask.getTaskToken() + ", workflowExecution=" + decisionTask.getWorkflowExecution());
        }
        WorkflowDefinitionFactory workflowDefinitionFactory = definitionFactoryFactory.getWorkflowDefinitionFactory(workflowType);
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.model.WorkflowType

            }
            result.setEvents(events);
            result.setPreviousStartedEventId(previousStartedEventId);
            result.setStartedEventId(startedEventId);
            result.setWorkflowExecution(workflowExecution);
            WorkflowType workflowType = startedAttributes.getWorkflowType();
            result.setWorkflowType(workflowType);
            return result;
        }
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.model.WorkflowType

            throws InstantiationException, IllegalAccessException {
        Workflow workflowAnnotation = interfaze.getAnnotation(Workflow.class);
        String interfaceName = interfaze.getSimpleName();
        MethodConverterPair workflowImplementationMethod = null;
        MethodConverterPair getStateMethod = null;
        WorkflowType workflowType = null;
        WorkflowTypeRegistrationOptions registrationOptions = null;
        Map<String, MethodConverterPair> signals = new HashMap<String, MethodConverterPair>();
        for (Method method : interfaze.getMethods()) {
            if (method.getDeclaringClass().getAnnotation(Workflow.class) == null) {
                continue;
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.model.WorkflowType

    protected WorkflowType getWorkflowType(String interfaceName, Method method, Execute executeAnnotation) {
        assert (method != null);
        assert (executeAnnotation != null);

        WorkflowType workflowType = new WorkflowType();

        String workflowName = null;
        if (executeAnnotation.name() != null && !executeAnnotation.name().isEmpty()) {
            workflowName = executeAnnotation.name();
        }
        else {
            workflowName = interfaceName + "." + method.getName();
        }

        if (executeAnnotation.version().isEmpty()) {
            throw new IllegalArgumentException(
                    "Empty value of the required \"version\" parameter of the @Execute annotation found on "
                            + getMethodFullName(method));
        }
        workflowType.setName(workflowName);
        workflowType.setVersion(executeAnnotation.version());
        return workflowType;
    }
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.model.WorkflowType

        workflowClock = (TestWorkflowClock) decisionContext.getWorkflowClock();
        WorkflowExecution we = new WorkflowExecution();
        we.setWorkflowId("testWorkflowId");
        we.setRunId("testRunId");
        workflowContext.setWorkflowExecution(we);
        WorkflowType wt = new WorkflowType();
        wt.setName("testWorkflow");
        wt.setVersion("0.0");
        workflowContext.setWorkflowType(wt);
    }
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.model.WorkflowType

    public Collection<WorkflowDefinitionFactory> getWorkflowDefinitionFactories() {
        return factoriesMap.values();
    }

    public void addWorkflowDefinitionFactory(WorkflowDefinitionFactory factory) {
        WorkflowType workflowType = factory.getWorkflowType();
        factoriesMap.put(workflowType, factory);
        WorkflowTypeRegistrationOptions registrationOptions = factory.getWorkflowRegistrationOptions();
        if (registrationOptions != null) {
            typesToRegister.add(workflowType);
        }
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.model.WorkflowType

        return decider.getAsynchronousThreadDumpAsString();
    }

    private AsyncDecider createDecider(HistoryHelper historyHelper) throws Exception {
        DecisionTask decisionTask = historyHelper.getDecisionTask();
        WorkflowType workflowType = decisionTask.getWorkflowType();
        if (log.isDebugEnabled()) {
            log.debug("WorkflowTask received: taskId=" + decisionTask.getStartedEventId() + ", taskToken="
                    + decisionTask.getTaskToken() + ", workflowExecution=" + decisionTask.getWorkflowExecution());
        }
        WorkflowDefinitionFactory workflowDefinitionFactory = definitionFactoryFactory.getWorkflowDefinitionFactory(workflowType);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.