List of usage examples for com.amazonaws.services.simpleworkflow.model Run getRunId
public String getRunId()
The runId
of a workflow execution.
From source file:aws.example.helloswf.WorkflowStarter.java
License:Apache License
public static void main(String[] args) { String workflow_input = "Amazon SWF"; if (args.length > 0) { workflow_input = args[0];//w ww. ja v a2 s.co m } System.out.println("Starting the workflow execution '" + WORKFLOW_EXECUTION + "' with input '" + workflow_input + "'."); WorkflowType wf_type = new WorkflowType().withName(HelloTypes.WORKFLOW) .withVersion(HelloTypes.WORKFLOW_VERSION); Run run = swf.startWorkflowExecution(new StartWorkflowExecutionRequest().withDomain(HelloTypes.DOMAIN) .withWorkflowType(wf_type).withWorkflowId(WORKFLOW_EXECUTION).withInput(workflow_input) .withExecutionStartToCloseTimeout("90")); System.out.println("Workflow execution started with the run id '" + run.getRunId() + "'."); }
From source file:example.swf.hellolambda.WorkflowStarter.java
License:Apache License
public static void main(String[] args) { final String WORKFLOW_EXECUTION = "HelloWorld-Lambda-Execution"; AmazonSimpleWorkflow swf = AmazonSimpleWorkflowClientBuilder.defaultClient(); String workflow_input = "{\"who\": \"Amazon SWF\"}"; if (args.length > 0) { workflow_input = "{\"who\": \"" + args[0] + "\"}"; }// w ww.j av a 2s .co m System.out.println("Starting the workflow execution '" + WORKFLOW_EXECUTION + "' with input '" + workflow_input + "'."); WorkflowType wf_type = new WorkflowType().withName(HelloTypes.WORKFLOW) .withVersion(HelloTypes.WORKFLOW_VERSION); Run run = swf.startWorkflowExecution(new StartWorkflowExecutionRequest().withDomain(HelloTypes.DOMAIN) .withWorkflowType(wf_type).withWorkflowId(WORKFLOW_EXECUTION).withInput(workflow_input) .withExecutionStartToCloseTimeout("90")); System.out.println("Workflow execution started with the run id '" + run.getRunId() + "'."); }