sendWorkflowStepState method
Sends a callback for asynchronous custom steps.
The ExecutionId, WorkflowId, and
Token are passed to the target resource during execution of a
custom step of a workflow. You must include those with their callback as
well as providing a status.
May throw AccessDeniedException.
May throw InternalServiceError.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
Parameter executionId :
A unique identifier for the execution of a workflow.
Parameter status :
Indicates whether the specified step succeeded or failed.
Parameter token :
Used to distinguish between multiple callbacks for multiple Lambda steps
within the same execution.
Parameter workflowId :
A unique identifier for the workflow.
Implementation
Future<void> sendWorkflowStepState({
required String executionId,
required CustomStepStatus status,
required String token,
required String workflowId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'TransferService.SendWorkflowStepState'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ExecutionId': executionId,
'Status': status.value,
'Token': token,
'WorkflowId': workflowId,
},
);
}