From 8cc59eb33782a59e8b6d38ef674627370a735404 Mon Sep 17 00:00:00 2001 From: Elizabeth Esswein Date: Fri, 14 Oct 2022 13:27:40 -0400 Subject: [PATCH 1/2] add strptime to script engine --- .../services/process_instance_processor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/spiffworkflow_backend/services/process_instance_processor.py b/src/spiffworkflow_backend/services/process_instance_processor.py index f8204ff2..547f5b32 100644 --- a/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/src/spiffworkflow_backend/services/process_instance_processor.py @@ -4,6 +4,7 @@ import json import logging import os import time +import _strptime # type: ignore from datetime import datetime from typing import Any from typing import Callable @@ -95,6 +96,7 @@ DEFAULT_GLOBALS.update( "datetime": datetime, "time": time, "decimal": decimal, + "_strptime": _strptime, } ) # This will overwrite the standard builtins From 7e52204f791871b7776925f91553c35e72e75f70 Mon Sep 17 00:00:00 2001 From: Elizabeth Esswein Date: Fri, 14 Oct 2022 13:43:45 -0400 Subject: [PATCH 2/2] fix bs issue --- .../services/process_instance_processor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/spiffworkflow_backend/services/process_instance_processor.py b/src/spiffworkflow_backend/services/process_instance_processor.py index 547f5b32..7424c4ae 100644 --- a/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/src/spiffworkflow_backend/services/process_instance_processor.py @@ -1,10 +1,10 @@ """Process_instance_processor.""" +import _strptime # type: ignore import decimal import json import logging import os import time -import _strptime # type: ignore from datetime import datetime from typing import Any from typing import Callable @@ -53,7 +53,6 @@ from SpiffWorkflow.spiff.serializer import UserTaskConverter from SpiffWorkflow.task import Task as SpiffTask # type: ignore from SpiffWorkflow.task import TaskState from SpiffWorkflow.util.deep_merge import DeepMerge # type: ignore - from spiffworkflow_backend.models.active_task import ActiveTaskModel from spiffworkflow_backend.models.bpmn_process_id_lookup import BpmnProcessIdLookup from spiffworkflow_backend.models.file import File