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 - name: process_status
in: query in: query
required: false 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: schema:
type: string type: string
# process_instance_list # process_instance_list

View File

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

View File

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

View File

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

View File

@ -64,7 +64,7 @@ class ProcessInstanceService:
processor.do_engine_steps(save=True) processor.do_engine_steps(save=True)
except Exception as e: except Exception as e:
db.session.rollback() # in case the above left the database with a bad transaction 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.add(process_instance)
db.session.commit() db.session.commit()
error_message = ( error_message = (

View File

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

View File

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

View File

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