make sure we prcoess the parents and children of failing spiff tasks as well since these do not go through the normal flow w/ burnettk
This commit is contained in:
parent
4bd63bac78
commit
f9000d4dc5
|
@ -650,10 +650,12 @@ def process_instance_task_list(
|
|||
.add_columns(
|
||||
BpmnProcessDefinitionModel.bpmn_identifier.label("bpmn_process_definition_identifier"), # type: ignore
|
||||
BpmnProcessDefinitionModel.bpmn_name.label("bpmn_process_definition_name"), # type: ignore
|
||||
direct_parent_bpmn_process_alias.guid.label("bpmn_process_direct_parent_guid"),
|
||||
direct_parent_bpmn_process_definition_alias.bpmn_identifier.label(
|
||||
"bpmn_process_direct_parent_bpmn_identifier"
|
||||
),
|
||||
bpmn_process_alias.guid.label("bpmn_process_guid"),
|
||||
# not sure why we needed these
|
||||
# direct_parent_bpmn_process_alias.guid.label("bpmn_process_direct_parent_guid"),
|
||||
# direct_parent_bpmn_process_definition_alias.bpmn_identifier.label(
|
||||
# "bpmn_process_direct_parent_bpmn_identifier"
|
||||
# ),
|
||||
TaskDefinitionModel.bpmn_identifier,
|
||||
TaskDefinitionModel.bpmn_name,
|
||||
TaskDefinitionModel.typename,
|
||||
|
@ -672,7 +674,7 @@ def process_instance_task_list(
|
|||
task_model_list = {}
|
||||
if most_recent_tasks_only:
|
||||
for task_model in task_models:
|
||||
bpmn_process_guid = task_model.bpmn_process_direct_parent_guid or "TOP"
|
||||
bpmn_process_guid = task_model.bpmn_process_guid or "TOP"
|
||||
row_key = f"{bpmn_process_guid}:::{task_model.bpmn_identifier}"
|
||||
if row_key not in task_model_list:
|
||||
task_model_list[row_key] = task_model
|
||||
|
|
|
@ -92,6 +92,8 @@ class TaskModelSavingDelegate(EngineStepDelegate):
|
|||
if hasattr(script_engine, "failing_spiff_task") and script_engine.failing_spiff_task is not None:
|
||||
failing_spiff_task = script_engine.failing_spiff_task
|
||||
self.task_service.update_task_model_with_spiff_task(failing_spiff_task, task_failed=True)
|
||||
self.task_service.process_spiff_task_parent_subprocess_tasks(failing_spiff_task)
|
||||
self.task_service.process_spiff_task_children(failing_spiff_task)
|
||||
|
||||
self.task_service.save_objects_to_database()
|
||||
|
||||
|
@ -101,13 +103,6 @@ class TaskModelSavingDelegate(EngineStepDelegate):
|
|||
|
||||
def after_engine_steps(self, bpmn_process_instance: BpmnWorkflow) -> None:
|
||||
if self._should_update_task_model():
|
||||
# TODO: also include children of the last task processed. This may help with task resets
|
||||
# if we have to set their states to FUTURE.
|
||||
# excludes FUTURE and COMPLETED. the others were required to get PP1 to go to completion.
|
||||
# for waiting_spiff_task in bpmn_process_instance.get_tasks(
|
||||
# TaskState.WAITING | TaskState.CANCELLED | TaskState.READY | TaskState.MAYBE | TaskState.LIKELY
|
||||
# ):
|
||||
# self._update_task_model_with_spiff_task(waiting_spiff_task)
|
||||
if self.last_completed_spiff_task is not None:
|
||||
self.task_service.process_spiff_task_parent_subprocess_tasks(self.last_completed_spiff_task)
|
||||
self.task_service.process_spiff_task_children(self.last_completed_spiff_task)
|
||||
|
|
|
@ -998,6 +998,11 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
|||
): {taskToUse.state}
|
||||
{taskDisplayButtons(taskToUse)}
|
||||
</Stack>
|
||||
<div>
|
||||
<Stack orientation="horizontal" gap={2}>
|
||||
Guid: {taskToUse.guid}
|
||||
</Stack>
|
||||
</div>
|
||||
{taskToUse.state === 'COMPLETED' ? (
|
||||
<div>
|
||||
<Stack orientation="horizontal" gap={2}>
|
||||
|
|
Loading…
Reference in New Issue