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 « ==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 w... »)
 
(30 révisions intermédiaires par 2 utilisateurs non affichées)
Ligne 3 : Ligne 3 :
 
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.
 
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.
  
Cette documentation décrit les règle d'ordre de priorités d'exécutions des règles.
+
This documentation describes the priority order of the execution of those rules.
  
==Détails==
+
==Details==
  
#<span style="color:red">Le moteur cherche d’abord dans les règles associées '''le nom du fichier spool complet'''.</span>
+
#<span style="color:red">The engine search first in the rules associated the '''full name of the spooled file'''.</span>
#: '''<u>MATCH</u>''' --> On recherche dans les autres paramètres (utilisateur, travail, référence, formtype, etc ) les valeurs différentes de *ALL et compare les valeurs. '''Celle qui aura le plus de critères qui match avec pour valeur différent de *ALL sera alors exécutée''' (priorité à la règle la plus sélective).Dans le cas où plusieurs règles respectent ces même critères, la première de la liste sera alors exécutée.
+
#: '''<u>MATCH</u>''' --> 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.
#: '''<u>PAS DE MATCH</u>''' --> On passe au point 2
+
#: '''<u>NO MATCH</u>''' --> Go to point 2
#<span style="color:red">Le moteur cherche ensuite dans les règles associées '''le nom du fichier spool partiel''' (avec l'utilisation des étoiles)</span>
 
#: '''<u>MATCH</u>''' --> On recherche dans les autres paramètres (utilisateur, travail, référence, formtype, etc …) les valeurs différentes de *ALL et compare les valeurs. '''Celle qui aura le plus de critères qui match avec pour valeur différent de *ALL sera alors exécutée''' (priorité à la règle la plus sélective).Dans le cas où plusieurs règles respectent ces même critères, la première de la liste sera alors exécutée.
 
#: '''<u>PAS DE MATCH</u>''' --> <span>'''Passage au point 3'''</span>
 
#<span style="color:red">Le moteur cherche ensuite dans les règles associées '''Si il y a un match au niveau des autres critères''' (utilisateur, travail, référence, formtype, etc …).</span>
 
#: '''<u>MATCH</u>''' --> On recherche dans les autres critères(utilisateur, travail, référence, formtype, etc …) les valeurs différentes de *ALL et compare les valeurs. '''Celle qui aura le plus de critères qui match avec pour valeur différent de *ALL sera alors exécutée''' (priorité à la règle la plus sélective).Dans le cas où plusieurs règles respectent ces même critères, la première de la liste sera alors exécutée.
 
#: '''<u>PAS DE MATCH</u>''' --> <span>La règle '''par défaut en *ALL pour tous les critères''' (si existante) sera alors '''exécutée''' (si celle-ci n'est pas existante, une erreur non visible dans la log du robot sera alors levée)</span>
 
  
Lorsque la règle est trouvée, l'action définie pour cette règle sera alors exécutée.
+
#<span style="color:red">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) .</span>
 +
#: '''<u>MATCH</u>''' --> 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.
 +
#: '''<u>NO MATCH</u>''' -->  <span>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)</span>
  
==Remarques==
+
When a rule is found, the action defined for this rule will be executed.
===Les noms génériques===
 
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.
 
Les noms génériques peuvent aussi être indiqués dans les autres critères, sauf la largeur du spool.
 
  
===Les groupes===
+
==Remarks==
On peut définir une règle en utilisant un groupe.
+
===The generic names===
Pour créer un groupe, positionner le curseur sur le champ à définir, et utiliser la touche F4.
+
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)
Indiquer l’option 1 pour sélectionner un groupe.
+
The generic names can also be used for the other criterias (except for the width of the spooled file)
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===
+
===The groups===
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.
+
We can define a rule using a group.
 +
To create a group, put the cursor in the parameter to be defined, '''press F4'''. Select '''option 1 to select a group'''.
 +
You can also press '''F6 to create a new group'''.  
 +
'''The option 5 on a group''' is used to defined the values of the group.
 +
<u>For instance</u> : Create a group ACCOUNT (for ACCOUNTING) then indicate the different users of the group.
 +
In the settings of the rules, you simply need to specify *ACCOUNT to refer to the ACCOUNT group. This will allow you not to have to create a rule per person of the accounting department.
  
==Exemples==
+
===Best rule selection===
===Exemple 1===
+
The program goes through all the different rules. If one does not match the incoming spooled file, the rule is ignore. But what is happening when multiple rules match with the same priority?
  F. Spool  Utilis.    Travail    Référence  Imprimé    Action<br>
+
Answer : The first rule with the more parameter different from *ALL will be used.
FAC*      *ALL       *ALL      *ALL      *ALL      ACTION1<br>
 
FAC*      *CPT      FACTURES  *ALL      *ALL      ACTION2<br>
 
FACT*      *CPT      *ALL      *ALL      *ALL      ACTION3<br>
 
FACTEXP    *ALL      FACTURES  *ALL      *ALL      ACTION4<br>
 
  
 +
==Examples==
 +
===Example 1===
 +
F. Spool  User.    Job.    Reference  Print    Action<br>
 +
INV*      *ALL      *ALL      *ALL      *ALL      ACTION1<br>
 +
INV*      *CPT      INVOICES  *ALL      *ALL      ACTION2<br>
 +
INVO*      *CPT      *ALL      *ALL      *ALL      ACTION3<br>
 +
INVOIEXP    *ALL      INVOICES  *ALL      *ALL      ACTION4<br>
  
====Cas 1====
 
  
Fichier spool libéré : '''FACTURE''', utilisateur '''QPGMR''', travail '''FACTURES'''.<br><br>
+
====Case 1====
L’action exécutée sera '''ACTION1'''<br>
 
  
<u>Explication</u><br><br>
+
Spooled file released : '''INVOICE''', utilisateur '''QPGMR''', travail '''INVOICES'''.<br><br>
Le programme recherche une règle FACTURE. Il n’y en a pas, il recherche dans les autres lignes.<br>
+
Executed action :  '''ACTION1'''<br>
La ligne 1 correspond pour 1 critère (Nom du spool)<br>
 
La ligne 2 ne correspond pas (QPGMR ne fait pas partie du groupe CPT)<br>
 
La ligne 3 non plus<br>
 
La ligne 4 non plus (Nom du fichier spool)<br>
 
  
====Cas 2====
+
<u>Explanation</u><br><br>
 +
The program will look for a rule with spooled file name equals to INVOICE. The is not such rule. It then search on the other rules.<br>
 +
Line 1 matches one criteria (Spooled file name)<br>
 +
Line 2 does not match (QPGMR is not part if the CPT group)<br>
 +
Neither line 3<br>
 +
Neither line 4 (wrong spooled file name)<br>
  
Fichier spool libéré : '''FACTURE''', utilisateur '''QPGMR''', travail '''FACTURES'''.<br><br>
+
====Case 2====
L’action exécutée sera '''ACTION2'''<br>
 
  
<u>Explication</u><br><br>
+
Spooled file released : '''INVOICE''', utilisateur '''DUMOULIN''', travail '''INVOICES'''.<br><br>
Le programme recherche une règle FACTURE. Il n’y en a pas, il recherche dans les autres lignes.<br>
+
Executed action :  '''ACTION2'''<br>
La ligne 1 correspond pour 1 critère (Nom du spool)<br>
 
La ligne 2 correspond pour 3 critères (Nom du spool, utilisateur (Dumoulin fait partie du groupe), travail)<br>
 
La ligne 3 correspond pour 2 critères (Nom du spool, utilisateur)<br>
 
La ligne 4 non plus (Nom du fichier spool)<br>
 
  
 +
<div class="mw-translate-fuzzy">
 +
<u>Explanation</u><br><br>
 +
The program will look for a rule with spooled file name equals to INVOICE. The is not such rule. It then search on the other rules.<br>
 +
Line 1 matches 1 criteria (Spooled file name)<br>
 +
Line 2 matches 3 criterias (Spooled file name, user (Dumoulin belong to the group), job<br>
 +
Line 3 matches 2 criterias (Spooled file name, user<br>
 +
Line 4 does not match a rule (wrong spooled file name)<br>
 +
</div>
  
====Cas 3====
+
====Case 3====
  
Fichier spool libéré : '''FACTEXP''', utilisateur '''DUMOULIN''', travail '''FACTURES'''.<br><br>
+
Spooled file released : '''INVOIEXP''', utilisateur '''DUMOULIN''', travail '''INVOICES'''.<br><br>
L’action exécutée sera '''ACTION4'''<br>
+
Executed action :  '''ACTION4'''<br>
  
<u>Explication</u><br><br>
+
<u>Explanation</u><br><br>
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
+
The program found a rule for '''INVOIEXP'''. This one is taken. The lines INV* and INVO* are not executed.
  
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*.
+
Remark : Note that even if INVO* is more precise than INV*, the line will be analysed after the line FAC* and therefore  be executed only if more matching criterias (other than *ALL) found than for the INV* line.
  
  
===Exemple 2===
+
===Example 2===
  F. Spool  Utilis.    Travail    Référence Imprimé   Action
+
  F. Spool  User.    Job  Reference Print   Action
  '''FACTURE'''    *ALL      *ALL      *ALL      '''*STD'''      ACTION1
+
  '''INVOICE'''    *ALL      *ALL      *ALL      '''*STD'''      ACTION1
  '''FACTURE'''    *ALL      '''FACTURES'''  *ALL      *ALL      ACTION2
+
  '''INVOICE'''    *ALL      '''INVOICES'''  *ALL      *ALL      ACTION2
  '''FACTURE'''    '''*CPT'''      *ALL      *ALL      *ALL      ACTION3
+
  '''INVOICE'''    '''*CPT'''      *ALL      *ALL      *ALL      ACTION3
  FACTEXP   *ALL      FACTURES   *ALL      *ALL      ACTION4
+
  INVOIEXP   *ALL      INVOICES   *ALL      *ALL      ACTION4
  
  
Fichier spool libéré : '''FACTURE''', utilisateur '''*CPT''', travail '''FACTURES''', imprimé'''*STD'''.<br><br>
+
Spooled file released : '''INVOICE''', utilisateur '''*CPT''', travail '''INVOICES'''.<br><br>
L’action exécutée sera '''ACTION1'''<br>
+
Executed action :  '''ACTION1'''<br>
  
<u>Explication</u><br><br>
+
<u>Explanation</u><br><br>
Nous avons 3 lignes qui correspondent, et toutes les 3 ont le même nombre de critères valides (2 critères)<br>
+
We have 3 matching lines and all the 3 have the same number of matching criterias.(2 criterias). The first in the list will be then executed, t herefore '''ACTION1'''
De ce fait la première dans la liste sera exécutée, soit '''ACTION1'''<br>
 

Version actuelle datée du 9 juin 2020 à 19:51

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)

The groups

We can define a rule using a group. To create a group, put the cursor in the parameter to be defined, press F4. Select option 1 to select a group. You can also press F6 to create a new group. The option 5 on a group is used to defined the values of the group. For instance : Create a group ACCOUNT (for ACCOUNTING) then indicate the different users of the group. In the settings of the rules, you simply need to specify *ACCOUNT to refer to the ACCOUNT group. This will allow you not to have to create a rule per person of the accounting department.

Best rule selection

The program goes through all the different rules. If one does not match the incoming spooled file, the rule is ignore. But what is happening when multiple rules match with the same priority? Answer : The first rule with the more parameter different from *ALL will be used.

Examples

Example 1

F. Spool   User.    Job.    Reference  Print    Action
INV* *ALL *ALL *ALL *ALL ACTION1
INV* *CPT INVOICES *ALL *ALL ACTION2
INVO* *CPT *ALL *ALL *ALL ACTION3
INVOIEXP *ALL INVOICES *ALL *ALL ACTION4


Case 1

Spooled file released : INVOICE, utilisateur QPGMR, travail INVOICES.

Executed action : ACTION1

Explanation

The program will look for a rule with spooled file name equals to INVOICE. The is not such rule. It then search on the other rules.
Line 1 matches one criteria (Spooled file name)
Line 2 does not match (QPGMR is not part if the CPT group)
Neither line 3
Neither line 4 (wrong spooled file name)

Case 2

Spooled file released : INVOICE, utilisateur DUMOULIN, travail INVOICES.

Executed action : ACTION2

Explanation

The program will look for a rule with spooled file name equals to INVOICE. The is not such rule. It then search on the other rules.
Line 1 matches 1 criteria (Spooled file name)
Line 2 matches 3 criterias (Spooled file name, user (Dumoulin belong to the group), job
Line 3 matches 2 criterias (Spooled file name, user
Line 4 does not match a rule (wrong spooled file name)

Case 3

Spooled file released : INVOIEXP, utilisateur DUMOULIN, travail INVOICES.

Executed action : ACTION4

Explanation

The program found a rule for INVOIEXP. This one is taken. The lines INV* and INVO* are not executed.

Remark : Note that even if INVO* is more precise than INV*, the line will be analysed after the line FAC* and therefore be executed only if more matching criterias (other than *ALL) found than for the INV* line.


Example 2

F. Spool   User.    Job  Reference  Print    Action
INVOICE    *ALL       *ALL       *ALL       *STD       ACTION1
INVOICE    *ALL       INVOICES   *ALL       *ALL       ACTION2
INVOICE    *CPT       *ALL       *ALL       *ALL       ACTION3
INVOIEXP    *ALL       INVOICES   *ALL       *ALL       ACTION4


Spooled file released : INVOICE, utilisateur *CPT, travail INVOICES.

Executed action : ACTION1

Explanation

We have 3 matching lines and all the 3 have the same number of matching criterias.(2 criterias). The first in the list will be then executed, t herefore ACTION1