Example usage for com.amazonaws.services.simpleworkflow.model RegisterDomainRequest setWorkflowExecutionRetentionPeriodInDays

List of usage examples for com.amazonaws.services.simpleworkflow.model RegisterDomainRequest setWorkflowExecutionRetentionPeriodInDays

Introduction

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

Prototype


public void setWorkflowExecutionRetentionPeriodInDays(String workflowExecutionRetentionPeriodInDays) 

Source Link

Document

The duration (in days) that records and histories of workflow executions on the domain should be kept by the service.

Usage

From source file:CreateSwfDomain.java

License:Open Source License

/**
 * Register a domain. Does nothing if the domain already exists.
 * @param swf The SWF client that will be used to register the domain.
 * @param name The name of the domain to register.
 */// w  ww . j  a va2  s.c o  m
public void RegisterSwfDomain(AmazonSimpleWorkflow swf, String name) {
    RegisterDomainRequest request = new RegisterDomainRequest().withName(name);
    request.setWorkflowExecutionRetentionPeriodInDays("10");

    try {
        swf.registerDomain(request);
    } catch (DomainAlreadyExistsException e) {
        System.out.println("Domain already exists!");
    }
}