OPALE - Utilisation - Ordre de priorités des règles sur le moteur de règles MAPPING IBM-i/en
Différence entre versions
(Page créée avec « <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 m... ») |
(Page créée avec « ====Case 2==== ») |
||
Ligne 55 : | Ligne 55 : | ||
Neither line 4 (wrong spooled file name)<br> | Neither line 4 (wrong spooled file name)<br> | ||
− | ==== | + | ====Case 2==== |
Fichier spool libéré : '''FACTURE''', utilisateur '''QPGMR''', travail '''FACTURES'''.<br><br> | Fichier spool libéré : '''FACTURE''', utilisateur '''QPGMR''', travail '''FACTURES'''.<br><br> |
Version du 9 juin 2020 à 07:43
Sommaire
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
- 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
- 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
FAC* *ALL *ALL *ALL *ALL ACTION1
FAC* *CPT FACTURES *ALL *ALL ACTION2
FACT* *CPT *ALL *ALL *ALL ACTION3
FACTEXP *ALL FACTURES *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
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