String startExecution(String stateMachineArn, String executionName, String executionInput) { AWSStepFunctions stepFunctions = buildStepFunctionsClient() StartExecutionResult startExecutionResult = stepFunctions.startExecution(new StartExecutionRequest() .withStateMachineArn(stateMachineArn) .withName(executionName) .withInput(executionInput) ) startExecutionResult.executionArn }
The function startExecution takes three arguments stateMachineArn, executionName and executionInput. The function will return the executionArn of the statemachine.