public class WorkflowHost {
public static final String DECISION_TASK_LIST = "PeriodicWorkflow";
public static void main(String[] args) throws Exception {
ConfigHelper configHelper = ConfigHelper.createConfig();
AmazonSimpleWorkflow swfService = configHelper.createSWFClient();
String domain = configHelper.getDomain();
final WorkflowWorker worker = new WorkflowWorker(swfService, domain, DECISION_TASK_LIST);
worker.addWorkflowImplementationType(CronWithRetryWorkflowImpl.class);
worker.setRegisterDomain(true);
worker.setDomainRetentionPeriodInDays(1);