using new spiff api to get info about events. w/ elizabeth

This commit is contained in:
burnettk 2023-07-18 14:35:56 -04:00
parent ce23480872
commit b3033ceb81
No known key found for this signature in database
1 changed files with 3 additions and 2 deletions

View File

@ -144,6 +144,7 @@ class ProcessInstanceService:
db.session.add(cycle)
db.session.commit()
# TODO: test me
@classmethod
def waiting_event_can_be_skipped(cls, waiting_event: dict[str, Any], now_in_utc: datetime) -> bool:
#
@ -152,9 +153,9 @@ class ProcessInstanceService:
#
# example: {'event_type': 'Duration Timer', 'name': None, 'value': '2023-04-27T20:15:10.626656+00:00'}
#
spiff_event_type = waiting_event.get("event_type")
spiff_event_type = waiting_event.event_type
if spiff_event_type == "DurationTimerEventDefinition":
event_value = waiting_event.get("value")
event_value = waiting_event.value
if event_value is not None:
event_datetime = TimerEventDefinition.get_datetime(event_value)
return event_datetime > now_in_utc # type: ignore