I just cant figure out how to do this.
I am currently trying to do this in an event handler
<subscriber
for="*
Products.DCWorkflow.interfaces.IBeforeTransitionEvent"
handler=".subscribers.last_state"
/>
From there, I have access to object and event
event has 'last_state', but that will be the 'the current state'
From object, I can get workflow_history
object.workflow_history
But I dont get how to list / find the last state from there dir(object.workflow_history)
['_MutableMapping__marker',
'_PersistentMapping__super_clear',
'_PersistentMapping__super_delitem',
'_PersistentMapping__super_pop',
'_PersistentMapping__super_popitem',
'_PersistentMapping__super_setdefault',
'_PersistentMapping__super_setitem',
'_PersistentMapping__super_update',
'__abstractmethods__',
'__class__',
'__class_getitem__',
'__class_init__',
'__contains__',
'__copy__',
'__delattr__',
'__delitem__',
'__dict__',
'__dir__',
'__doc__',
'__eq__',
'__format__',
'__ge__',
'__getattribute__',
'__getitem__',
'__getstate__',
'__gt__',
'__hash__',
'__implemented__',
'__init__',
'__init_subclass__',
'__ior__',
'__iter__',
'__le__',
'__len__',
'__lt__',
'__module__',
'__ne__',
'__new__',
'__or__',
'__providedBy__',
'__provides__',
'__reduce__',
'__reduce_ex__',
'__repr__',
'__reversed__',
'__ror__',
'__setattr__',
'__setitem__',
'__setstate__',
'__sizeof__',
'__slotnames__',
'__slots__',
'__str__',
'__subclasshook__',
'__weakref__',
'_abc_impl',
'_p_activate',
'_p_changed',
'_p_deactivate',
'_p_delattr',
'_p_estimated_size',
'_p_getattr',
'_p_invalidate',
'_p_jar',
'_p_mtime',
'_p_oid',
'_p_serial',
'_p_setattr',
'_p_state',
'_p_status',
'_p_sticky',
'clear',
'copy',
'data',
'fromkeys',
'get',
'items',
'keys',
'pop',
'popitem',
'setdefault',
'update',
'values']