invokeActStep method
Executes the next step of an act, processing tool call results and returning new tool calls if needed.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter actId :
The unique identifier of the act to invoke the next step for.
Parameter callResults :
The results from previous tool calls that the act requested.
Parameter sessionId :
The unique identifier of the session containing the act.
Parameter workflowDefinitionName :
The name of the workflow definition containing the act.
Parameter workflowRunId :
The unique identifier of the workflow run containing the act.
Parameter previousStepId :
The identifier of the previous step, used for tracking execution flow.
Implementation
Future<InvokeActStepResponse> invokeActStep({
required String actId,
required List<CallResult> callResults,
required String sessionId,
required String workflowDefinitionName,
required String workflowRunId,
String? previousStepId,
}) async {
final $payload = <String, dynamic>{
'callResults': callResults,
if (previousStepId != null) 'previousStepId': previousStepId,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/workflow-definitions/${Uri.encodeComponent(workflowDefinitionName)}/workflow-runs/${Uri.encodeComponent(workflowRunId)}/sessions/${Uri.encodeComponent(sessionId)}/acts/${Uri.encodeComponent(actId)}/invoke-step/',
exceptionFnMap: _exceptionFns,
);
return InvokeActStepResponse.fromJson(response);
}