Skip to main content

Workflow Types

Types for workflow stages and use case workflow status.

WorkflowStageStep

Workflow stage step enumeration for use case progression.

Enum Values

ValueDescription
assessment-
evidence_collection-
clear-
rejected-
from credoai import WorkflowStageStep

value = WorkflowStageStep.ASSESSMENT

WorkflowStageType

Workflow stage type enumeration.

Enum Values

ValueDescription
start-
intermediate-
end-
from credoai import WorkflowStageType

value = WorkflowStageType.START

WorkflowStageCreate

Schema for creating a workflow stage.

Note: Only intermediate stages can be created via the API. Start and end stages are system-managed.

Fields

FieldTypeRequiredDescription
namestr-
descriptionAny-
assessment_requiredbool-
evidence_collection_requiredbool-
parent_idstrID of the parent stage (new stage will be inserted after this)

Example

from credoai import WorkflowStageCreate

obj = WorkflowStageCreate(
name="example",
parent_id="example",
)

WorkflowStageResponse

Schema for a workflow stage response.

Fields

FieldTypeRequiredDescription
idstr-
namestr-
descriptionAny-
typeWorkflowStageType-
assessment_requiredbool-
evidence_collection_requiredbool-
parent_idAny-
child_idAny-

Example

from credoai import WorkflowStageResponse

obj = WorkflowStageResponse(
id="example",
name="example",
type=None,
)

WorkflowStageUpdate

Schema for updating a workflow stage.

Note: Stage type cannot be changed after creation. Start and end stages cannot be modified.

Fields

FieldTypeRequiredDescription
nameAny-
descriptionAny-
assessment_requiredAny-
evidence_collection_requiredAny-

Example

from credoai import WorkflowStageUpdate

obj = WorkflowStageUpdate(
)

WorkflowStageCreateRequest

Request wrapper for WorkflowStageCreate with validation and JSON:API support. Combines the WorkflowStageCreate data model with client request functionality, providing automatic validation and JSON:API format conversion for API requests.

Fields

FieldTypeRequiredDescription
namestr-
descriptionForwardRef('Optional[Any]')-
assessment_requiredForwardRef('Optional[bool]')Example: False
evidence_collection_requiredForwardRef('Optional[bool]')Example: False
parent_idstrID of the parent stage (new stage will be inserted after this)

Example

from credoai import WorkflowStageCreateRequest

obj = WorkflowStageCreateRequest(
name="example",
parent_id="example",
)

WorkflowStageResponseWrapper

Response wrapper for WorkflowStageResponse with metadata and validation. Extends ClientResponse to provide type-safe access to WorkflowStageResponse data along with HTTP response metadata.

Fields

FieldTypeRequiredDescription
status_codeintHTTP response status code
headersForwardRef('Dict[str, str]')HTTP response headers
request_idForwardRef('Optional[str]')Unique request identifier for tracing
dataForwardRef('WorkflowStageResponse')Validated response data

Example

from credoai import WorkflowStageResponseWrapper

obj = WorkflowStageResponseWrapper(
status_code=123,
data=None,
)