Merge pull request #197 from sartography/feature/update-spiff-and-fix-broken-tests-in-ci

tests have been broken in ci, and this should fix it
This commit is contained in:
Kevin Burnett 2023-03-27 14:02:51 -07:00 committed by GitHub
commit 2222995ebd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 8 deletions

View File

@ -1895,7 +1895,7 @@ lxml = "*"
type = "git" type = "git"
url = "https://github.com/sartography/SpiffWorkflow" url = "https://github.com/sartography/SpiffWorkflow"
reference = "main" reference = "main"
resolved_reference = "f162aac43af3af18d1a55186aeccea154fb8b05d" resolved_reference = "3c3345c85dd7f3b7112ad04aaa6487abbd2e9414"
[[package]] [[package]]
name = "SQLAlchemy" name = "SQLAlchemy"

View File

@ -636,7 +636,7 @@ def _get_spiff_task_from_process_instance(
if processor is None: if processor is None:
processor = ProcessInstanceProcessor(process_instance) processor = ProcessInstanceProcessor(process_instance)
task_uuid = uuid.UUID(task_guid) task_uuid = uuid.UUID(task_guid)
spiff_task = processor.bpmn_process_instance.get_task(task_uuid) spiff_task = processor.bpmn_process_instance.get_task_from_id(task_uuid)
if spiff_task is None: if spiff_task is None:
raise ( raise (

View File

@ -1173,7 +1173,7 @@ class ProcessInstanceProcessor:
"""Mark the task complete optionally executing it.""" """Mark the task complete optionally executing it."""
spiff_tasks_updated = {} spiff_tasks_updated = {}
start_in_seconds = time.time() start_in_seconds = time.time()
spiff_task = self.bpmn_process_instance.get_task(UUID(task_id)) spiff_task = self.bpmn_process_instance.get_task_from_id(UUID(task_id))
event_type = ProcessInstanceEventType.task_skipped.value event_type = ProcessInstanceEventType.task_skipped.value
if execute: if execute:
current_app.logger.info( current_app.logger.info(

View File

@ -255,7 +255,7 @@ class TaskService:
task_data_dict = task_properties.pop("data") task_data_dict = task_properties.pop("data")
state_int = task_properties["state"] state_int = task_properties["state"]
spiff_task = spiff_workflow.get_task(UUID(task_id)) spiff_task = spiff_workflow.get_task_from_id(UUID(task_id))
task_model = TaskModel.query.filter_by(guid=task_id).first() task_model = TaskModel.query.filter_by(guid=task_id).first()
if task_model is None: if task_model is None:

View File

@ -114,7 +114,7 @@ class TestLoggingService(BaseTest):
process_instance = ProcessInstanceModel.query.filter_by(id=process_instance.id).first() process_instance = ProcessInstanceModel.query.filter_by(id=process_instance.id).first()
processor = ProcessInstanceProcessor(process_instance) processor = ProcessInstanceProcessor(process_instance)
human_task_one = process_instance.active_human_tasks[0] human_task_one = process_instance.active_human_tasks[0]
spiff_manual_task = processor.bpmn_process_instance.get_task(UUID(human_task_one.task_id)) spiff_manual_task = processor.bpmn_process_instance.get_task_from_id(UUID(human_task_one.task_id))
ProcessInstanceService.complete_form_task(processor, spiff_manual_task, {}, initiator_user, human_task_one) ProcessInstanceService.complete_form_task(processor, spiff_manual_task, {}, initiator_user, human_task_one)
headers = self.logged_in_headers(with_super_admin_user) headers = self.logged_in_headers(with_super_admin_user)

View File

@ -305,10 +305,10 @@ class TestProcessInstanceProcessor(BaseTest):
# process_instance = ProcessInstanceModel.query.filter_by(id=process_instance.id).first() # process_instance = ProcessInstanceModel.query.filter_by(id=process_instance.id).first()
# processor = ProcessInstanceProcessor(process_instance) # processor = ProcessInstanceProcessor(process_instance)
# human_task_one = process_instance.active_human_tasks[0] # human_task_one = process_instance.active_human_tasks[0]
# spiff_manual_task = processor.bpmn_process_instance.get_task(UUID(human_task_one.task_id)) # spiff_manual_task = processor.bpmn_process_instance.get_task_from_id(UUID(human_task_one.task_id))
# ProcessInstanceService.complete_form_task(processor, spiff_manual_task, {}, initiator_user, human_task_one) # ProcessInstanceService.complete_form_task(processor, spiff_manual_task, {}, initiator_user, human_task_one)
# human_task_one = process_instance.active_human_tasks[0] # human_task_one = process_instance.active_human_tasks[0]
# spiff_manual_task = processor.bpmn_process_instance.get_task(UUID(human_task_one.task_id)) # spiff_manual_task = processor.bpmn_process_instance.get_task_from_id(UUID(human_task_one.task_id))
# ProcessInstanceService.complete_form_task(processor, spiff_manual_task, {}, initiator_user, human_task_one) # ProcessInstanceService.complete_form_task(processor, spiff_manual_task, {}, initiator_user, human_task_one)
def test_properly_saves_tasks_when_running( def test_properly_saves_tasks_when_running(
@ -356,7 +356,7 @@ class TestProcessInstanceProcessor(BaseTest):
process_instance = ProcessInstanceModel.query.filter_by(id=process_instance.id).first() process_instance = ProcessInstanceModel.query.filter_by(id=process_instance.id).first()
processor = ProcessInstanceProcessor(process_instance) processor = ProcessInstanceProcessor(process_instance)
human_task_one = process_instance.active_human_tasks[0] human_task_one = process_instance.active_human_tasks[0]
spiff_manual_task = processor.bpmn_process_instance.get_task(UUID(human_task_one.task_id)) spiff_manual_task = processor.bpmn_process_instance.get_task_from_id(UUID(human_task_one.task_id))
ProcessInstanceService.complete_form_task(processor, spiff_manual_task, {}, initiator_user, human_task_one) ProcessInstanceService.complete_form_task(processor, spiff_manual_task, {}, initiator_user, human_task_one)
# recreate variables to ensure all bpmn json was recreated from scratch from the db # recreate variables to ensure all bpmn json was recreated from scratch from the db