use error as a status instead of faulted w/ burnettk

This commit is contained in:
jasquat 2022-11-10 15:55:17 -05:00
parent 1bd671fe3c
commit 8ae9179a64
8 changed files with 11 additions and 11 deletions

View File

@ -413,7 +413,7 @@ paths:
- name: process_status
in: query
required: false
description: For filtering - not_started, user_input_required, waiting, complete, faulted, or suspended
description: For filtering - not_started, user_input_required, waiting, complete, error, or suspended
schema:
type: string
# process_instance_list

View File

@ -61,7 +61,7 @@ class ProcessInstanceStatus(SpiffEnum):
user_input_required = "user_input_required"
waiting = "waiting"
complete = "complete"
faulted = "faulted"
error = "error"
suspended = "suspended"
terminated = "terminated"

View File

@ -24,7 +24,7 @@ def load_acceptance_test_fixtures() -> list[ProcessInstanceModel]:
# user_input_required - 2 hours ago
# waiting - 3 hourse ago
# complete - 4 hours ago
# faulted - 5 hours ago
# error - 5 hours ago
# suspended - 6 hours ago
process_instances = []
for i in range(len(statuses)):

View File

@ -46,7 +46,7 @@ class ErrorHandlingService:
# fault is the default
self.set_instance_status(
_processor.process_instance_model.id,
ProcessInstanceStatus.faulted.value,
ProcessInstanceStatus.error.value,
)
if len(process_model.exception_notification_addresses) > 0:

View File

@ -64,7 +64,7 @@ class ProcessInstanceService:
processor.do_engine_steps(save=True)
except Exception as e:
db.session.rollback() # in case the above left the database with a bad transaction
process_instance.status = ProcessInstanceStatus.faulted.value
process_instance.status = ProcessInstanceStatus.error.value
db.session.add(process_instance)
db.session.commit()
error_message = (

View File

@ -1716,7 +1716,7 @@ class TestProcessApi(BaseTest):
.first()
)
assert process is not None
assert process.status == "faulted"
assert process.status == "error"
def test_error_handler_suspend(
self,
@ -1827,7 +1827,7 @@ class TestProcessApi(BaseTest):
.first()
)
assert process is not None
assert process.status == "faulted"
assert process.status == "error"
def test_process_model_file_create(
self,

View File

@ -12,7 +12,7 @@ export const PROCESS_STATUSES = [
'user_input_required',
'waiting',
'complete',
'faulted',
'error',
'suspended',
];

View File

@ -206,7 +206,7 @@ export default function ProcessInstanceShow() {
statusIcon = <Checkmark />;
} else if (processInstanceToUse.status === 'terminated') {
statusIcon = <StopOutline />;
} else if (processInstanceToUse.status === 'faulted') {
} else if (processInstanceToUse.status === 'error') {
statusIcon = <Warning />;
}
@ -262,7 +262,7 @@ export default function ProcessInstanceShow() {
const terminateButton = (processInstanceToUse: any) => {
if (
['complete', 'terminated', 'faulted'].indexOf(
['complete', 'terminated', 'error'].indexOf(
processInstanceToUse.status
) === -1
) {
@ -283,7 +283,7 @@ export default function ProcessInstanceShow() {
const suspendButton = (processInstanceToUse: any) => {
if (
['complete', 'terminated', 'faulted', 'suspended'].indexOf(
['complete', 'terminated', 'error', 'suspended'].indexOf(
processInstanceToUse.status
) === -1
) {