def getActionReflexRules(self, analysis, wf_action):
        """
        This function returns a list of dictionaries with the rules to be done
        for the analysis service.
        :analysis: the analysis full object which we want to obtain the
            rules for.
        :wf_action: it is the workflow action that the analysis is doing, we
            have to act in consideration of the action_set 'trigger' variable
        :returns: [{'action': 'duplicate', ...}, {,}, ...]
        """
        # Setting up the analyses catalog
        self.analyses_catalog = getToolByName(self, CATALOG_ANALYSIS_LISTING)
        # Getting the action sets, those that contain action rows
        action_sets = self.getReflexRules()
        rules_list = []
        condition = False
        for action_set in action_sets:
            # Validate the trigger
            if action_set.get('trigger', '') == wf_action:
                # Getting the conditions resolution
                condition = self._areConditionsMet(action_set, analysis)
                if condition:
                    actions = action_set.get('actions', [])
                    for act in actions:
                        # Adding the rule number inside each action row because
                        # need to get the rule number from a row action later.
                        # we will need to get the rule number from a row
                        # action later.
                        act['rulenumber'] = action_set.get('rulenumber', '0')
                        act['rulename'] = self.Title()
                        rules_list.append(act)
        return rules_list
def getActionReflexRules ( self , analysis , wf_action ) : self . analyses_catalog = getToolByName ( self , CATALOG_ANALYSIS_LISTING ) action_sets = self . getReflexRules ( ) rules_list = [ ] condition = False for action_set in action_sets : if action_set . get ( 'trigger' , '' ) == wf_action : condition = self . _areConditionsMet ( action_set , analysis ) if condition : actions = action_set . get ( 'actions' , [ ] ) for act in actions : act [ 'rulenumber' ] = action_set . get ( 'rulenumber' , '0' ) act [ 'rulename' ] = self . Title ( ) rules_list . append ( act ) return rules_list
This function returns a list of dictionaries with the rules to be done
        for the analysis service.
        :analysis: the analysis full object which we want to obtain the
            rules for.
        :wf_action: it is the workflow action that the analysis is doing, we
            have to act in consideration of the action_set 'trigger' variable
        :returns: [{'action': 'duplicate', ...}, {,}, ...]