fix more bs errors

This commit is contained in:
Elizabeth Esswein 2022-12-20 11:10:59 -05:00
parent c219b057c7
commit 9f19c46945
2 changed files with 5 additions and 5 deletions

View File

@ -2290,7 +2290,7 @@ def send_bpmn_event(
process_instance_id: str,
body: Dict,
) -> Response:
"""Send a bpmn event to a workflow"""
"""Send a bpmn event to a workflow."""
process_instance = ProcessInstanceModel.query.filter(
ProcessInstanceModel.id == int(process_instance_id)
).first()
@ -2315,7 +2315,7 @@ def mark_task_complete(
task_id: str,
body: Dict,
) -> Response:
"""Mark a task complete without executing it"""
"""Mark a task complete without executing it."""
process_instance = ProcessInstanceModel.query.filter(
ProcessInstanceModel.id == int(process_instance_id)
).first()

View File

@ -705,13 +705,13 @@ class ProcessInstanceProcessor:
db.session.commit()
def serialize_task_spec(self, task_spec: SpiffTask) -> Any:
"""Get a serialized version of a task spec"""
"""Get a serialized version of a task spec."""
# The task spec is NOT actually a SpiffTask, it is the task spec attached to a SpiffTask
# Not sure why mypy accepts this but whatever.
return self._serializer.spec_converter.convert(task_spec)
def send_bpmn_event(self, event_data: dict[str, Any]) -> None:
"""Send an event to the workflow"""
"""Send an event to the workflow."""
payload = event_data.pop("payload", None)
event_definition = self._event_serializer.restore(event_data)
if payload is not None:
@ -723,7 +723,7 @@ class ProcessInstanceProcessor:
self.do_engine_steps(save=True)
def mark_task_complete(self, task_id: str) -> None:
"""Mark the task complete without executing it"""
"""Mark the task complete without executing it."""
spiff_task = self.bpmn_process_instance.get_task(UUID(task_id))
spiff_task._set_state(TaskState.COMPLETED)
self.bpmn_process_instance.last_task = spiff_task