fixed minor types w/ burnettk
This commit is contained in:
parent
caf317c545
commit
8884d32cd6
|
@ -231,7 +231,7 @@ class ProcessInstanceMetadata:
|
|||
description: str | None = None
|
||||
spec_version: str | None = None
|
||||
state: str | None = None
|
||||
status: ProcessInstanceStatus | None = None
|
||||
status: str | None = None
|
||||
total_tasks: int | None = None
|
||||
completed_tasks: int | None = None
|
||||
is_review: bool | None = None
|
||||
|
|
|
@ -40,7 +40,7 @@ class ProcessModelInfo:
|
|||
display_order: int | None = 0
|
||||
is_review: bool = False
|
||||
files: list[File] | None = field(default_factory=list[File])
|
||||
fault_or_suspend_on_exception: NotificationType = NotificationType.fault.value
|
||||
fault_or_suspend_on_exception: str = NotificationType.fault.value
|
||||
exception_notification_addresses: list[str] = field(default_factory=list)
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
|
|
|
@ -16,7 +16,7 @@ class ErrorHandlingService:
|
|||
"""ErrorHandlingService."""
|
||||
|
||||
@staticmethod
|
||||
def set_instance_status(instance_id: str, status: str) -> None:
|
||||
def set_instance_status(instance_id: int, status: str) -> None:
|
||||
"""Set_instance_status."""
|
||||
instance = (
|
||||
db.session.query(ProcessInstanceModel)
|
||||
|
@ -26,7 +26,6 @@ class ErrorHandlingService:
|
|||
if instance:
|
||||
instance.status = status
|
||||
db.session.commit()
|
||||
return instance
|
||||
|
||||
def handle_error(
|
||||
self, _processor: ProcessInstanceProcessor, _error: Union[ApiError, Exception]
|
||||
|
|
|
@ -254,7 +254,7 @@ class ProcessInstanceProcessor:
|
|||
% (process_instance_model.id, e.__class__.__name__, str(e))
|
||||
)
|
||||
process_instance_model.bpmn_json = None
|
||||
process_instance_model.status = ProcessInstanceStatus.not_started
|
||||
process_instance_model.status = ProcessInstanceStatus.not_started.value
|
||||
|
||||
# clear out any task assignments
|
||||
db.session.query(TaskEventModel).filter(
|
||||
|
|
|
@ -126,7 +126,7 @@ class ProcessInstanceService:
|
|||
else:
|
||||
return {}
|
||||
|
||||
def get_process_instance(self, process_instance_id: int) -> ProcessInstanceModel:
|
||||
def get_process_instance(self, process_instance_id: int) -> Any:
|
||||
"""Get_process_instance."""
|
||||
result = (
|
||||
db.session.query(ProcessInstanceModel)
|
||||
|
|
Loading…
Reference in New Issue