From e97778844770f6d642c7cba50c32987a2b506223 Mon Sep 17 00:00:00 2001 From: jasquat Date: Tue, 17 Jan 2023 17:09:26 -0500 Subject: [PATCH] favor user_input_required over waiting status for process instances w/ burnettk --- .../services/process_instance_processor.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 5a299ef5d..faafdb273 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py @@ -1068,9 +1068,13 @@ class ProcessInstanceProcessor: if bpmn_process_instance.is_completed(): return ProcessInstanceStatus.complete user_tasks = bpmn_process_instance.get_ready_user_tasks() - waiting_tasks = bpmn_process_instance.get_tasks(TaskState.WAITING) - if len(waiting_tasks) > 0: - return ProcessInstanceStatus.waiting + + # if the process instance has status "waiting" it will get picked up + # by background processing. when that happens it can potentially overwrite + # human tasks which is bad because we cache them with the previous id's. + # waiting_tasks = bpmn_process_instance.get_tasks(TaskState.WAITING) + # if len(waiting_tasks) > 0: + # return ProcessInstanceStatus.waiting if len(user_tasks) > 0: return ProcessInstanceStatus.user_input_required else: