julee.workflows.validate_document ================================= .. py:module:: julee.workflows.validate_document .. autoapi-nested-parse:: Temporal workflow for document validation operations. This workflow orchestrates the ValidateDocumentUseCase with Temporal's durability guarantees, providing retry logic, state management, and compensation for the document validation process. Attributes ---------- .. autoapisummary:: julee.workflows.validate_document.VALIDATE_DOCUMENT_RETRY_POLICY julee.workflows.validate_document.logger Classes ------- .. autoapisummary:: julee.workflows.validate_document.ValidateDocumentWorkflow Module Contents --------------- .. py:class:: ValidateDocumentWorkflow Temporal workflow for document validation operations. This workflow: 1. Receives document_id and policy_id 2. Orchestrates the ValidateDocumentUseCase with workflow-safe proxies 3. Provides durability and retry logic for validation processing 4. Returns the completed DocumentPolicyValidation object The workflow remains framework-agnostic by delegating all business logic to the use case, while providing Temporal-specific orchestration concerns like retry policies, timeouts, and state management. .. py:method:: cancel_validation(reason) :async: Signal handler to cancel the validation process. :param reason: Reason for cancellation .. note:: This is a placeholder for future cancellation logic. Currently, we rely on Temporal's built-in workflow cancellation. .. py:method:: get_current_step() Query method to get the current workflow step .. py:method:: get_validation_id() Query method to get the validation ID once created .. py:method:: run(document_id, policy_id) :async: Execute the document validation workflow. :param document_id: ID of the document to validate :param policy_id: ID of the policy to validate against :returns: Completed DocumentPolicyValidation object with validation results :raises ValueError: If required entities are not found :raises RuntimeError: If validation processing fails after retries .. py:attribute:: current_step :value: 'initialized' .. py:attribute:: validation_id :type: str | None :value: None .. py:data:: VALIDATE_DOCUMENT_RETRY_POLICY .. py:data:: logger