mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-01-15 04:34:16 +00:00
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 <jasquat@users.noreply.github.com>
This commit is contained in:
parent
5d3f531ae2
commit
a9cc15177f
@ -120,8 +120,6 @@ class Task:
|
|||||||
form_ui_schema: dict | None = None,
|
form_ui_schema: dict | None = None,
|
||||||
parent: str | None = None,
|
parent: str | None = None,
|
||||||
event_definition: dict[str, Any] | 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,
|
error_message: str | None = None,
|
||||||
):
|
):
|
||||||
self.id = id
|
self.id = id
|
||||||
@ -135,8 +133,6 @@ class Task:
|
|||||||
self.lane = lane
|
self.lane = lane
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.event_definition = event_definition
|
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
|
self.data = data
|
||||||
if self.data is None:
|
if self.data is None:
|
||||||
@ -194,8 +190,6 @@ class Task:
|
|||||||
"form_ui_schema": self.form_ui_schema,
|
"form_ui_schema": self.form_ui_schema,
|
||||||
"parent": self.parent,
|
"parent": self.parent,
|
||||||
"event_definition": self.event_definition,
|
"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,
|
"error_message": self.error_message,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1337,7 +1337,7 @@ class ProcessInstanceProcessor:
|
|||||||
for task in tasks:
|
for task in tasks:
|
||||||
if task.task_spec.description != "Call Activity":
|
if task.task_spec.description != "Call Activity":
|
||||||
continue
|
continue
|
||||||
spec_to_check = task.task_spec.spec
|
spec_to_check = task.task_spec.bpmn_id
|
||||||
|
|
||||||
if spec_to_check not in loaded_specs:
|
if spec_to_check not in loaded_specs:
|
||||||
lazy_subprocess_specs = self.element_unit_specs_loader(spec_to_check, spec_to_check)
|
lazy_subprocess_specs = self.element_unit_specs_loader(spec_to_check, spec_to_check)
|
||||||
|
@ -502,7 +502,6 @@ class ProcessInstanceService:
|
|||||||
processor: ProcessInstanceProcessor,
|
processor: ProcessInstanceProcessor,
|
||||||
spiff_task: SpiffTask,
|
spiff_task: SpiffTask,
|
||||||
add_docs_and_forms: bool = False,
|
add_docs_and_forms: bool = False,
|
||||||
calling_subprocess_task_id: str | None = None,
|
|
||||||
) -> Task:
|
) -> Task:
|
||||||
task_type = spiff_task.task_spec.description
|
task_type = spiff_task.task_spec.description
|
||||||
|
|
||||||
@ -529,11 +528,6 @@ class ProcessInstanceService:
|
|||||||
except UserDoesNotHaveAccessToTaskError:
|
except UserDoesNotHaveAccessToTaskError:
|
||||||
can_complete = False
|
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
|
parent_id = None
|
||||||
if spiff_task.parent:
|
if spiff_task.parent:
|
||||||
parent_id = spiff_task.parent.id
|
parent_id = spiff_task.parent.id
|
||||||
@ -561,8 +555,6 @@ class ProcessInstanceService:
|
|||||||
properties=props,
|
properties=props,
|
||||||
parent=parent_id,
|
parent=parent_id,
|
||||||
event_definition=serialized_task_spec.get("event_definition"),
|
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,
|
error_message=error_message,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -73,7 +73,6 @@ export interface ProcessInstanceTask {
|
|||||||
id: string;
|
id: string;
|
||||||
task_id: string;
|
task_id: string;
|
||||||
can_complete: boolean;
|
can_complete: boolean;
|
||||||
calling_subprocess_task_id: string;
|
|
||||||
created_at_in_seconds: number;
|
created_at_in_seconds: number;
|
||||||
current_user_is_potential_owner: number;
|
current_user_is_potential_owner: number;
|
||||||
data: any;
|
data: any;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user