OPALE - Utilisation - Ordre de priorités des règles sur le moteur de règles MAPPING IBM-i/en

Différence entre versions

De MappingDoc
(Page créée avec « When a rule is found, the action defined for this rule will be executed. »)
(Page créée avec « ==Remarks== ===The generic names=== We can also use generic names. We just need to indicate INV* in the spooled file name parameter. This criteria can match all the spoole... »)
Ligne 17 : Ligne 17 :
 
When a rule is found, the action defined for this rule will be executed.
 
When a rule is found, the action defined for this rule will be executed.
  
==Remarques==
+
==Remarks==
===Les noms génériques===
+
===The generic names===
On peut utiliser des noms génériques. Il suffit d’indiquer FAC* dans le nom du fichier spool pour correspondre à tous les fichiers spool commençant par FAC.
+
We can also use generic names. We just need to indicate INV* in the spooled file name parameter. This criteria can match all the spooled file starting with INV (Example : INVOICE, INVENTORY, etc)
Les noms génériques peuvent aussi être indiqués dans les autres critères, sauf la largeur du spool.
+
The generic names can also be used for the other criterias (except for the width of the spooled file)
  
 
===Les groupes===
 
===Les groupes===

Version du 9 juin 2020 à 07:27

Autres langues :
English • ‎français

Introduction

When we release a spooled file into an OUTQ monitored by MAPPING, the program search in the association between spooled files and actions settings which action must be executed.

This documentation describes the priority order of the execution of those rules.

Details

  1. The engine search first in the rules associated the full name of the spooled file.
    MATCH --> We look for the other parameters (user, job, reference, formtype, etc) the values different from *ALL and compare their values. Those which will have the more matching criterias with values different from *ALL will be executed. (Priority to the most selective rule). In the event where multiple rules have those same criterias, the first in the list will be taken and executed.
    NO MATCH --> Go to point 2
  1. The engine search in the rules associated another match with the other parameters (Please note that the partiel name has the same effect as the other parameters. Example : INV* for INVOICE. Indeed there is no priority on the partiel spooled file name) .
    MATCH --> We look for the other parameters (user, job, reference, formtype, etc) the values different from *ALL and compare their values. Those which will have the more matching criterias with values different from *ALL will be executed. (Priority to the most selective rule). In the event where multiple rules have those same criterias, the first in the list will be taken and executed.
    NO MATCH --> The default rule the rule with all criterias set to *ALL (if existing) will then be executed. (If not existing, a non visible error message in the MAPPING robot log will be risen and no action will be executed)

When a rule is found, the action defined for this rule will be executed.

Remarks

The generic names

We can also use generic names. We just need to indicate INV* in the spooled file name parameter. This criteria can match all the spooled file starting with INV (Example : INVOICE, INVENTORY, etc) The generic names can also be used for the other criterias (except for the width of the spooled file)

Les groupes

On peut définir une règle en utilisant un groupe. Pour créer un groupe, positionner le curseur sur le champ à définir, et utiliser la touche F4. Indiquer l’option 1 pour sélectionner un groupe. Sur la fenêtre qui s’affiche, la touche F6 permet de créer un nouveau groupe et l’option 5 sur le groupe permet de définir les valeurs du groupe. Par exemple, créer un groupe COMPTA puis indiquer les différents utilisateurs du groupe. Dans le paramétrage des règles, il suffit alors d’indiquer *COMPTA pour correspondre au groupe compta. Cela évite de devoir créer une règle pour chaque utilisateur comptable.

sélection de la meilleure règle

Le programme passe en revue les différentes règles. Si une valeur ne correspond pas au fichier spool, la règle est éliminée. Mais que ce passe-t-il lorsque plusieurs règles sont acceptables ? Et bien, c’est la première règle ayant le plus de critères différents de *ALL qui sera utilisée.

Exemples

Exemple 1

F. Spool   Utilis.    Travail    Référence  Imprimé    Action
FAC* *ALL *ALL *ALL *ALL ACTION1
FAC* *CPT FACTURES *ALL *ALL ACTION2
FACT* *CPT *ALL *ALL *ALL ACTION3
FACTEXP *ALL FACTURES *ALL *ALL ACTION4


Cas 1

Fichier spool libéré : FACTURE, utilisateur QPGMR, travail FACTURES.

L’action exécutée sera ACTION1

Explication

Le programme recherche une règle FACTURE. Il n’y en a pas, il recherche dans les autres lignes.
La ligne 1 correspond pour 1 critère (Nom du spool)
La ligne 2 ne correspond pas (QPGMR ne fait pas partie du groupe CPT)
La ligne 3 non plus
La ligne 4 non plus (Nom du fichier spool)

Cas 2

Fichier spool libéré : FACTURE, utilisateur QPGMR, travail FACTURES.

L’action exécutée sera ACTION2

Explication

Le programme recherche une règle FACTURE. Il n’y en a pas, il recherche dans les autres lignes.
La ligne 1 correspond pour 1 critère (Nom du spool)
La ligne 2 correspond pour 3 critères (Nom du spool, utilisateur (Dumoulin fait partie du groupe), travail)
La ligne 3 correspond pour 2 critères (Nom du spool, utilisateur)
La ligne 4 non plus (Nom du fichier spool)


Cas 3

Fichier spool libéré : FACTEXP, utilisateur DUMOULIN, travail FACTURES.

L’action exécutée sera ACTION4

Explication

Le programme a trouvé une règle pour FACTEXP. C’est elle qui prime. Les lignes FAC* et FACT* ne seront même pas traitées

Remarque : Notez que même si FACT* est plus précis que FAC*, la ligne sera analysée après les lignes FAC* et ne sera donc exécutée que si plus de critères (autres que *ALL) sont indiqués que pour FAC*.


Exemple 2

F. Spool   Utilis.    Travail    Référence  Imprimé    Action
FACTURE    *ALL       *ALL       *ALL       *STD       ACTION1
FACTURE    *ALL       FACTURES   *ALL       *ALL       ACTION2
FACTURE    *CPT       *ALL       *ALL       *ALL       ACTION3
FACTEXP    *ALL       FACTURES   *ALL       *ALL       ACTION4


Fichier spool libéré : FACTURE, utilisateur *CPT, travail FACTURES, imprimé*STD.

L’action exécutée sera ACTION1

Explication

Nous avons 3 lignes qui correspondent, et toutes les 3 ont le même nombre de critères valides (2 critères)
De ce fait la première dans la liste sera exécutée, soit ACTION1