diff --git a/spiffworkflow-backend/.gitignore b/spiffworkflow-backend/.gitignore index ac2b0d10..0d420dae 100644 --- a/spiffworkflow-backend/.gitignore +++ b/spiffworkflow-backend/.gitignore @@ -21,3 +21,4 @@ node_modules *null-ls_* /local_wheels/*.whl /some_cache_dir +/process.json 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 41c3487b..cd4c56f2 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py @@ -1728,6 +1728,11 @@ class ProcessInstanceProcessor: return task return None + # for debugging, get the full json representation into a file on disk + def dump_to_disk(self, filename: str = "process.json") -> None: + with open(filename, "w") as f: + f.write(json.dumps(self.serialize(), indent=2)) + def remove_spiff_tasks_for_termination(self) -> None: start_time = time.time() deleted_tasks = self.bpmn_process_instance.cancel() or []