List of usage examples for com.amazonaws.services.simpleworkflow.model WorkflowExecution getWorkflowId
public String getWorkflowId()
The user defined identifier associated with the workflow execution.
From source file:com.dby.swf.WorkflowExecutionStarter.java
License:Open Source License
public static void main(String[] args) throws Exception { ConfigHelper configHelper = ConfigHelper.createConfig(); AmazonSimpleWorkflow swfService = configHelper.createSWFClient(); String domain = configHelper.getDomain(); SwfWorkflowClientExternalFactory clientFactory = new SwfWorkflowClientExternalFactoryImpl(swfService, domain);/*from www. j a v a 2 s .co m*/ SwfWorkflowClientExternal workflow = clientFactory.getClient("someID"); // Start Wrokflow Execution workflow.helloSwf("hello swf"); // WorkflowExecution is available after workflow creation WorkflowExecution workflowExecution = workflow.getWorkflowExecution(); System.out.println("Started helloWorld workflow with workflowId=\"" + workflowExecution.getWorkflowId() + "\" and runId=\"" + workflowExecution.getRunId() + "\""); }
From source file:jp.inc.forrest.aws.swf.WorkflowExecutionStarter.java
License:Open Source License
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();// w ww . j av a2 s.co m // 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); // WorkflowExecution is available after workflow creation WorkflowExecution workflowExecution = workflow.getWorkflowExecution(); System.out.println("Started periodic workflow with workflowId=\"" + workflowExecution.getWorkflowId() + "\" and runId=\"" + workflowExecution.getRunId() + "\""); System.exit(0); }