review_history = list(workflow.getInfoFor(obj, "review_history")) review_history.reverse() for event in review_history: if event.get("action") == action_id: return event.get("actor") return '' except WorkflowException as e: message = str(e) logger.error("Cannot retrieve review_history on {}: {}".format( obj, message)) return '' # Enumeration of the available status flows StateFlow = enum(review='review_state', inactive='inactive_state', cancellation='cancellation_state') # Enumeration of the different available states from the inactive flow InactiveState = enum(active='active') # Enumeration of the different states can have a batch BatchState = enum(open='open', closed='closed', cancelled='cancelled') BatchTransitions = enum(open='open', close='close') CancellationState = enum(active='active', cancelled='cancelled') CancellationTransitions = enum(cancel='cancel', reinstate='reinstate')
"workflow history is inexplicably missing." " https://jira.bikalabs.com/browse/LIMS-2242") return users # invert the list, so we always see the most recent matching event review_history.reverse() for event in review_history: if event.get('action', '') == action_id: value = event.get('actor', '') users.append(value) if last_user: return users return users # Enumeration of the available status flows StateFlow = enum(review='review_state', inactive='inactive_state', cancellation='cancellation_state') # Enumeration of the different available states from the inactive flow InactiveState = enum(active='active') # Enumeration of the different states can have a batch BatchState = enum(open='open', closed='closed', cancelled='cancelled') BatchTransitions = enum(open='open', close='close') CancellationState = enum(active='active', cancelled='cancelled')