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

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

Introduction

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

Prototype


public void setName(String name) 

Source Link

Document

The name 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 ww  w .  j ava  2s  . 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   w w  w .  ja  v a  2s  . c  om*/
    return workflowTypes;
}