Package com.amazonaws.services.simpleworkflow.flow.examples.common

Examples of com.amazonaws.services.simpleworkflow.flow.examples.common.ConfigHelper


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);
View Full Code Here


public class ActivityHost {   
   
    private static final String ACTIVITIES_TASK_LIST = "Periodic";

    public static void main(String[] args) throws Exception {
        ConfigHelper configHelper = ConfigHelper.createConfig();
        AmazonSimpleWorkflow swfService = configHelper.createSWFClient();
        String domain = configHelper.getDomain();

        final ActivityWorker worker = new ActivityWorker(swfService, domain, ACTIVITIES_TASK_LIST);

        // Create activity implementations
        CronWithRetryExampleActivities periodicActivitiesImpl = new CronExampleActivitiesImpl();
View Full Code Here

public class WorkflowHost {

    private static final String DECISION_TASK_LIST = "HelloWorldWorkflow";
   
    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(HelloWorldWorkflowImpl.class);
        worker.start();
View Full Code Here

import com.amazonaws.services.simpleworkflow.model.WorkflowExecution;

public class WorkflowExecutionStarter {

    public static void main(String[] args) throws Exception {
        ConfigHelper configHelper = ConfigHelper.createConfig();
        AmazonSimpleWorkflow swfService = configHelper.createSWFClient();
        String domain = configHelper.getDomain();

        HelloWorldWorkflowClientExternalFactory clientFactory = new HelloWorldWorkflowClientExternalFactoryImpl(swfService,
                domain);
        HelloWorldWorkflowClientExternal workflow = clientFactory.getClient();
       
View Full Code Here

public class ActivityHost {

    private static final String ACTIVITIES_TASK_LIST = "HelloWorld";

    public static void main(String[] args) throws Exception {
        ConfigHelper configHelper = ConfigHelper.createConfig();
        AmazonSimpleWorkflow swfService = configHelper.createSWFClient();
        String domain = configHelper.getDomain();

        final ActivityWorker worker = new ActivityWorker(swfService, domain, ACTIVITIES_TASK_LIST);

        // Create activity implementations
        HelloWorldActivities helloWorldActivitiesImpl = new HelloWorldActivitiesImpl();
View Full Code Here

        catch (NumberFormatException e) {
            System.err.println("Value of CONTINUE_AS_NEW_AFTER_SECONDS is not int: " + args[2]);
            System.exit(1);
        }
        // Load configuration
        ConfigHelper configHelper = ConfigHelper.createConfig();

        // Create the client for Simple Workflow Service
        swfService = configHelper.createSWFClient();
        domain = configHelper.getDomain();

        // Name and versions are hardcoded here but they can be passed as args or loaded from configuration file.
        ActivityType activity = new ActivityType();
        activity.setName("CronWithRetryExampleActivities.doSomeWork");
        activity.setVersion("1.0");
View Full Code Here

public class WorkflowHost {

    private 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(PeriodicWorkflowImpl.class);
        worker.start();
View Full Code Here

public class ActivityHost {   
   
    private static final String ACTIVITIES_TASK_LIST = "Periodic";

    public static void main(String[] args) throws Exception {
        ConfigHelper configHelper = ConfigHelper.createConfig();
        AmazonSimpleWorkflow swfService = configHelper.createSWFClient();
        String domain = configHelper.getDomain();

        final ActivityWorker worker = new ActivityWorker(swfService, domain, ACTIVITIES_TASK_LIST);

        // Create activity implementations
        CronExampleActivities periodicActivitiesImpl = new CronExampleActivitiesImpl();
View Full Code Here

        }
        return host;
    }

    public static void main(String[] args) throws Exception {
      ConfigHelper configHelper = loadConfiguration();
     
        getWorkflowHost().startWorkflowWorker(configHelper);

        // Add a Shutdown hook to close WorkflowWorker
        addShutDownHook();
View Full Code Here

        worker.awaitTermination(Long.MAX_VALUE, TimeUnit.DAYS);
        System.out.println("Workflow Host Service Stopped...");
    }
   
    static ConfigHelper loadConfiguration() throws IllegalArgumentException, IOException{
        ConfigHelper configHelper = ConfigHelper.createConfig();

        // Create the client for Simple Workflow Service and S3 Service
        swfService = configHelper.createSWFClient();
        domain = configHelper.getDomain();
        domainRetentionPeriodInDays = configHelper.getDomainRetentionPeriodInDays();
        configHelper.createS3Client();
       
        return configHelper;
    }
View Full Code Here

TOP

Related Classes of com.amazonaws.services.simpleworkflow.flow.examples.common.ConfigHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.