diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py b/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py index 982dbb43..354b7591 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py @@ -807,7 +807,12 @@ def _task_submit_shared( if next_human_task_assigned_to_me: return make_response(jsonify(HumanTaskModel.to_task(next_human_task_assigned_to_me)), 200) - if "guestConfirmation" in spiff_task.task_spec.extensions: + spiff_task_extensions = spiff_task.task_spec.extensions + if ( + "allowGuest" in spiff_task_extensions + and spiff_task_extensions["allowGuest"] == "true" + and "guestConfirmation" in spiff_task.task_spec.extensions + ): return make_response( jsonify({"guest_confirmation": spiff_task.task_spec.extensions["guestConfirmation"]}), 200 ) diff --git a/spiffworkflow-frontend/src/routes/TaskShow.tsx b/spiffworkflow-frontend/src/routes/TaskShow.tsx index 9850baa2..09973172 100644 --- a/spiffworkflow-frontend/src/routes/TaskShow.tsx +++ b/spiffworkflow-frontend/src/routes/TaskShow.tsx @@ -147,8 +147,12 @@ export default function TaskShow() { removeError(); if (result.ok) { navigate(`/tasks`); - } else if (result.guest_confirmation) { - setGuestConfirmationText(result.guest_confirmation); + } else if ('guest_confirmation' in result) { + if (result.guest_confirmation) { + setGuestConfirmationText(result.guest_confirmation); + } else { + setGuestConfirmationText('Form submitted successfully'); + } } else if (result.process_instance_id) { if (result.can_complete) { navigate(`/tasks/${result.process_instance_id}/${result.id}`);