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

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


public class WorkflowHost {
   
  private static final String DECISION_TASK_LIST = "AverageCalculatorWorkflow";
   
    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(AverageCalculatorWorkflowImpl.class);
        worker.start();
View Full Code Here


  private static String domain;
   
    public static void main(String[] args) throws Exception {

      // Load configuration
      ConfigHelper configHelper = ConfigHelper.createConfig();
       
        // Create the client for Simple Workflow Service
        swfService = configHelper.createSWFClient();
        domain = configHelper.getDomain();
       
        // Start Workflow execution
        String bucketName = configHelper.getValueFromConfig(SplitMergeConfigKeys.S3_BUCKET_NAME);
        String fileName = configHelper.getValueFromConfig(SplitMergeConfigKeys.S3_INPUT_FILENAME);
        String val = configHelper.getValueFromConfig(SplitMergeConfigKeys.NUMBER_OF_WORKERS);
        int numberOfWorkers = Integer.parseInt(val);
       
        AverageCalculatorWorkflowClientExternalFactory clientFactory = new AverageCalculatorWorkflowClientExternalFactoryImpl(swfService, domain);
        AverageCalculatorWorkflowClientExternal workflow = clientFactory.getClient();
        workflow.average(bucketName, fileName, numberOfWorkers);
View Full Code Here

public class ActivityHost {

    private static final String ACTIVITIES_TASK_LIST = "AverageCalculator";

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

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

        // Create activity implementations
        AverageCalculatorActivitiesImpl avgCalcActivitiesImpl = new AverageCalculatorActivitiesImpl(s3Client);
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.