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);