Example usage for com.amazonaws.services.simpleworkflow.model WorkflowType setVersion

List of usage examples for com.amazonaws.services.simpleworkflow.model WorkflowType setVersion

Introduction

In this page you can find the example usage for com.amazonaws.services.simpleworkflow.model WorkflowType setVersion.

Prototype


public void setVersion(String version) 

Source Link

Document

The version of the workflow type.

Usage

From source file:org.apache.camel.component.aws.swf.CamelSWFWorkflowClient.java

License:Apache License

public String[] startWorkflowExecution(String workflowId, String runId, String eventName, String version,
        Object arguments) {//from w ww . ja v  a  2  s .  c om
    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();

    return new String[] { newWorkflowId, newRunId };
}

From source file:org.apache.camel.component.aws.swf.CamelWorkflowDefinitionFactoryFactory.java

License:Apache License

@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);/*from ww  w. ja  v a  2 s .c  o  m*/
    return workflowTypes;
}