diff --git a/spiffworkflow-backend/conftest.py b/spiffworkflow-backend/conftest.py index 9d05dfe5..4e902e22 100644 --- a/spiffworkflow-backend/conftest.py +++ b/spiffworkflow-backend/conftest.py @@ -19,8 +19,6 @@ from spiffworkflow_backend.services.process_instance_service import ( ) from spiffworkflow_backend.services.process_model_service import ProcessModelService -# from tests.spiffworkflow_backend.helpers.test_data import load_test_spec - # We need to call this before importing spiffworkflow_backend # otherwise typeguard cannot work. hence the noqa: E402 diff --git a/spiffworkflow-backend/poetry.lock b/spiffworkflow-backend/poetry.lock index b96b8d78..ef67a53e 100644 --- a/spiffworkflow-backend/poetry.lock +++ b/spiffworkflow-backend/poetry.lock @@ -1895,7 +1895,7 @@ lxml = "*" type = "git" url = "https://github.com/sartography/SpiffWorkflow" reference = "main" -resolved_reference = "3c3345c85dd7f3b7112ad04aaa6487abbd2e9414" +resolved_reference = "62454c99c3a711c38f4249a3b5e7215d42037d72" [[package]] name = "SQLAlchemy" diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/routes/openid_blueprint/static/login.css b/spiffworkflow-backend/src/spiffworkflow_backend/routes/openid_blueprint/static/login.css index 15b093f6..94d1e057 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/routes/openid_blueprint/static/login.css +++ b/spiffworkflow-backend/src/spiffworkflow_backend/routes/openid_blueprint/static/login.css @@ -2,7 +2,7 @@ margin: 0; padding: 0; background-color:white; - font-family: 'Arial'; + font-family: 'Arial, sans-serif'; } header { width: 100%; diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/routes/openid_blueprint/templates/login.html b/spiffworkflow-backend/src/spiffworkflow_backend/routes/openid_blueprint/templates/login.html index 858355c3..815275d2 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/routes/openid_blueprint/templates/login.html +++ b/spiffworkflow-backend/src/spiffworkflow_backend/routes/openid_blueprint/templates/login.html @@ -1,12 +1,12 @@ - + Login Form
- + Small SpiffWorkflow logo

Login

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 7d33fc4e..99bcf697 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py @@ -1795,7 +1795,7 @@ class ProcessInstanceProcessor: ) task_model.start_in_seconds = time.time() - self.bpmn_process_instance.complete_task_from_id(spiff_task.id) + self.bpmn_process_instance.run_task_from_id(spiff_task.id) task_model.end_in_seconds = time.time() human_task.completed_by_user_id = user.id diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py index 37f77ac1..711ea0d8 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py @@ -157,8 +157,7 @@ class ProcessInstanceService: # navigation = processor.bpmn_process_instance.get_deep_nav_list() # ProcessInstanceService.update_navigation(navigation, processor) process_model_service = ProcessModelService() - process_model = process_model_service.get_process_model(processor.process_model_identifier) - process_model.display_name if process_model else "" + process_model_service.get_process_model(processor.process_model_identifier) process_instance_api = ProcessInstanceApi( id=processor.get_process_instance_id(), status=processor.get_status(), diff --git a/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx b/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx index 870dc440..81b644d1 100644 --- a/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx +++ b/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx @@ -36,6 +36,8 @@ import { getProcessModelFullIdentifierFromSearchParams, modifyProcessIdentifierForPathParam, refreshAtInterval, + REFRESH_INTERVAL_SECONDS, + REFRESH_TIMEOUT_SECONDS, } from '../helpers'; import { useUriListForPermissions } from '../hooks/UriListForPermissions'; @@ -68,9 +70,6 @@ import useAPIError from '../hooks/UseApiError'; import { usePermissionFetcher } from '../hooks/PermissionService'; import { Can } from '../contexts/Can'; -const REFRESH_INTERVAL = 5; -const REFRESH_TIMEOUT = 600; - type OwnProps = { filtersEnabled?: boolean; processModelFullIdentifier?: string; @@ -389,8 +388,8 @@ export default function ProcessInstanceListTable({ checkFiltersAndRun(); if (autoReload) { return refreshAtInterval( - REFRESH_INTERVAL, - REFRESH_TIMEOUT, + REFRESH_INTERVAL_SECONDS, + REFRESH_TIMEOUT_SECONDS, checkFiltersAndRun ); } diff --git a/spiffworkflow-frontend/src/components/TaskListTable.tsx b/spiffworkflow-frontend/src/components/TaskListTable.tsx index 1951b4cc..b6901f73 100644 --- a/spiffworkflow-frontend/src/components/TaskListTable.tsx +++ b/spiffworkflow-frontend/src/components/TaskListTable.tsx @@ -9,14 +9,14 @@ import { getPageInfoFromSearchParams, modifyProcessIdentifierForPathParam, refreshAtInterval, + REFRESH_INTERVAL_SECONDS, + REFRESH_TIMEOUT_SECONDS, } from '../helpers'; import HttpService from '../services/HttpService'; import { PaginationObject, ProcessInstanceTask } from '../interfaces'; import TableCellWithTimeAgoInWords from './TableCellWithTimeAgoInWords'; const PER_PAGE_FOR_TASKS_ON_HOME_PAGE = 5; -const REFRESH_INTERVAL = 5; -const REFRESH_TIMEOUT = 600; type OwnProps = { apiPath: string; @@ -89,7 +89,11 @@ export default function TaskListTable({ }; getTasks(); if (autoReload) { - return refreshAtInterval(REFRESH_INTERVAL, REFRESH_TIMEOUT, getTasks); + return refreshAtInterval( + REFRESH_INTERVAL_SECONDS, + REFRESH_TIMEOUT_SECONDS, + getTasks + ); } return undefined; }, [ diff --git a/spiffworkflow-frontend/src/helpers.tsx b/spiffworkflow-frontend/src/helpers.tsx index 88ab1522..273e12ae 100644 --- a/spiffworkflow-frontend/src/helpers.tsx +++ b/spiffworkflow-frontend/src/helpers.tsx @@ -270,3 +270,11 @@ export const encodeBase64 = (data: string) => { export const decodeBase64 = (data: string) => { return Buffer.from(data, 'base64').toString('ascii'); }; + +const MINUTES_IN_HOUR = 60; +const SECONDS_IN_MINUTE = 60; +const SECONDS_IN_HOUR = MINUTES_IN_HOUR * SECONDS_IN_MINUTE; +const FOUR_HOURS_IN_SECONDS = SECONDS_IN_HOUR * 4; + +export const REFRESH_INTERVAL_SECONDS = 5; +export const REFRESH_TIMEOUT_SECONDS = FOUR_HOURS_IN_SECONDS; diff --git a/spiffworkflow-frontend/src/routes/MyTasks.tsx b/spiffworkflow-frontend/src/routes/MyTasks.tsx index 3daaaef6..810c811b 100644 --- a/spiffworkflow-frontend/src/routes/MyTasks.tsx +++ b/spiffworkflow-frontend/src/routes/MyTasks.tsx @@ -8,6 +8,8 @@ import { getPageInfoFromSearchParams, modifyProcessIdentifierForPathParam, refreshAtInterval, + REFRESH_INTERVAL_SECONDS, + REFRESH_TIMEOUT_SECONDS, } from '../helpers'; import HttpService from '../services/HttpService'; import { @@ -19,8 +21,6 @@ import { import ProcessInstanceRun from '../components/ProcessInstanceRun'; const PER_PAGE_FOR_TASKS_ON_HOME_PAGE = 5; -const REFRESH_INTERVAL = 5; -const REFRESH_TIMEOUT = 600; export default function MyTasks() { const [searchParams] = useSearchParams(); @@ -46,7 +46,11 @@ export default function MyTasks() { }; getTasks(); - refreshAtInterval(REFRESH_INTERVAL, REFRESH_TIMEOUT, getTasks); + refreshAtInterval( + REFRESH_INTERVAL_SECONDS, + REFRESH_TIMEOUT_SECONDS, + getTasks + ); }, [searchParams]); const processInstanceRunResultTag = () => {