From a9cc15177fdefbc338982208628e7c3a273d5638 Mon Sep 17 00:00:00 2001 From: jasquat <2487833+jasquat@users.noreply.github.com> Date: Mon, 26 Jun 2023 02:27:32 -0400 Subject: [PATCH] updated usages of task_spec.spec for new spiff (#345) * updated usages of task_spec.spec for new spiff * removed unused attributes referring to call activities --------- Co-authored-by: jasquat --- .../src/spiffworkflow_backend/models/task.py | 6 ------ .../services/process_instance_processor.py | 2 +- .../services/process_instance_service.py | 8 -------- spiffworkflow-frontend/src/interfaces.ts | 1 - 4 files changed, 1 insertion(+), 16 deletions(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/models/task.py b/spiffworkflow-backend/src/spiffworkflow_backend/models/task.py index c0a93685..359b20d3 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/models/task.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/models/task.py @@ -120,8 +120,6 @@ class Task: form_ui_schema: dict | None = None, parent: str | None = None, event_definition: dict[str, Any] | None = None, - call_activity_process_identifier: str | None = None, - calling_subprocess_task_id: str | None = None, error_message: str | None = None, ): self.id = id @@ -135,8 +133,6 @@ class Task: self.lane = lane self.parent = parent self.event_definition = event_definition - self.call_activity_process_identifier = call_activity_process_identifier - self.calling_subprocess_task_id = calling_subprocess_task_id self.data = data if self.data is None: @@ -194,8 +190,6 @@ class Task: "form_ui_schema": self.form_ui_schema, "parent": self.parent, "event_definition": self.event_definition, - "call_activity_process_identifier": self.call_activity_process_identifier, - "calling_subprocess_task_id": self.calling_subprocess_task_id, "error_message": self.error_message, } diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py index 8a79d20a..ae09994f 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py @@ -1337,7 +1337,7 @@ class ProcessInstanceProcessor: for task in tasks: if task.task_spec.description != "Call Activity": continue - spec_to_check = task.task_spec.spec + spec_to_check = task.task_spec.bpmn_id if spec_to_check not in loaded_specs: lazy_subprocess_specs = self.element_unit_specs_loader(spec_to_check, spec_to_check) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py index 402c0115..12df04e4 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py @@ -502,7 +502,6 @@ class ProcessInstanceService: processor: ProcessInstanceProcessor, spiff_task: SpiffTask, add_docs_and_forms: bool = False, - calling_subprocess_task_id: str | None = None, ) -> Task: task_type = spiff_task.task_spec.description @@ -529,11 +528,6 @@ class ProcessInstanceService: except UserDoesNotHaveAccessToTaskError: can_complete = False - if hasattr(spiff_task.task_spec, "spec"): - call_activity_process_identifier = spiff_task.task_spec.spec - else: - call_activity_process_identifier = None - parent_id = None if spiff_task.parent: parent_id = spiff_task.parent.id @@ -561,8 +555,6 @@ class ProcessInstanceService: properties=props, parent=parent_id, event_definition=serialized_task_spec.get("event_definition"), - call_activity_process_identifier=call_activity_process_identifier, - calling_subprocess_task_id=calling_subprocess_task_id, error_message=error_message, ) diff --git a/spiffworkflow-frontend/src/interfaces.ts b/spiffworkflow-frontend/src/interfaces.ts index 09aafbb2..2084c6cc 100644 --- a/spiffworkflow-frontend/src/interfaces.ts +++ b/spiffworkflow-frontend/src/interfaces.ts @@ -73,7 +73,6 @@ export interface ProcessInstanceTask { id: string; task_id: string; can_complete: boolean; - calling_subprocess_task_id: string; created_at_in_seconds: number; current_user_is_potential_owner: number; data: any;