Example usage for com.amazonaws.services.simpleworkflow.model RegisterWorkflowTypeRequest RegisterWorkflowTypeRequest

List of usage examples for com.amazonaws.services.simpleworkflow.model RegisterWorkflowTypeRequest RegisterWorkflowTypeRequest

Introduction

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

Prototype

RegisterWorkflowTypeRequest

Source Link

Usage

From source file:aws.example.helloswf.HelloTypes.java

License:Apache License

public static void registerWorkflowType() {
    try {/*from  w w  w .ja  va 2 s.c  o  m*/
        System.out.println("** Registering the workflow type '" + WORKFLOW + "-" + WORKFLOW_VERSION + "'.");
        swf.registerWorkflowType(new RegisterWorkflowTypeRequest().withDomain(DOMAIN).withName(WORKFLOW)
                .withVersion(WORKFLOW_VERSION).withDefaultChildPolicy(ChildPolicy.TERMINATE)
                .withDefaultTaskList(new TaskList().withName(TASKLIST))
                .withDefaultTaskStartToCloseTimeout("30"));
    } catch (TypeAlreadyExistsException e) {
        System.out.println("** Workflow type already exists!");
    }
}

From source file:example.swf.hellolambda.HelloTypes.java

License:Apache License

public static void registerWorkflowType() {
    String lambda_role_arn = createLambdaRole();

    if (lambda_role_arn == null) {
        System.err.println("Could not get Lambda role ARN!");
    }// w w  w . j  av a2s.c  om

    System.out.println("** Registering the workflow type '" + WORKFLOW + "-" + WORKFLOW_VERSION + "'.");
    try {
        swf.registerWorkflowType(new RegisterWorkflowTypeRequest().withDomain(DOMAIN).withName(WORKFLOW)
                .withDefaultLambdaRole(lambda_role_arn).withVersion(WORKFLOW_VERSION)
                .withDefaultChildPolicy(ChildPolicy.TERMINATE)
                .withDefaultTaskList(new TaskList().withName(TASKLIST))
                .withDefaultTaskStartToCloseTimeout("30"));
    } catch (TypeAlreadyExistsException e) {
        System.out.println("** Workflow type already exists!");
    }
}