Retry Workflow Execution

async AsyncCogniteClient.workflows.executions.retry(
id: str,
client_credentials: ClientCredentials | None = None,
) WorkflowExecution

Retry a workflow execution.

Parameters:
  • id (str) – The server-generated id of the workflow execution.

  • client_credentials (ClientCredentials | None) – Specific credentials that should be used to retry the workflow execution. When passed will take precedence over the current credentials.

Returns:

The retried workflow execution.

Return type:

WorkflowExecution

Examples

Retry a workflow execution that has been cancelled or failed:

>>> from cognite.client import CogniteClient, AsyncCogniteClient
>>> client = CogniteClient()
>>> # async_client = AsyncCogniteClient()  # another option
>>> res = client.workflows.executions.run("foo", "1")
>>> client.workflows.executions.cancel(id=res.id, reason="test cancellation")
>>> client.workflows.executions.retry(res.id)