more event props from spiff (#2013)

* more event props from spiff

* lint

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
This commit is contained in:
Kevin Burnett 2024-07-30 16:13:31 +00:00 committed by GitHub
parent 9277218ec0
commit 56efd4c8c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 1 deletions

View File

@ -81,7 +81,19 @@ class SpiffLogHandler(SocketHandler):
if not hasattr(record, "process_model_identifier"):
data["process_model_identifier"] = process_model_identifier
for attr in ["workflow_spec", "task_spec", "task_id", "task_type"]:
task_properties_from_spiff = [
"worflow_spec",
"task_spec",
"task_id",
"task_type",
"state",
"last_state_change",
"elapsed",
"parent",
]
workflow_properties_from_spiff = ["completed", "success"]
properties_from_spiff = task_properties_from_spiff + workflow_properties_from_spiff
for attr in properties_from_spiff:
if hasattr(record, attr):
data[attr] = str(getattr(record, attr))
else: