def retract_item(item): schedule_feature = feature.get_feature(item, "schedule") if schedule_feature is None: return # take back to schedule pending wfc = IWorkflowController(item) for state in schedule_feature.get_param("schedulable_states"): transitions = wfc.getFireableTransitionIdsToward(state) if transitions: wfc.fireTransition(transitions[0]) break
def values(self): param_audit_actions = feature.get_feature(self.context, "audit").p.audit_actions return domain.get_changes(self.context, *param_audit_action)
def get_scheduled_states(type_key): schedule_feature = feature.get_feature(type_key, "schedule") if schedule_feature: return schedule_feature.get_param("scheduled_states") return []