OPALE - Utilization

MAPPING IBM-i rules priority order

De MappingDoc
Cette page est une version traduite de la page OPALE:Utilisation:Ordre de priorités des règles sur le moteur de règles MAPPING IBM-i et la traduction est complétée à 96 %.

Les traductions désuètes sont identifiées ainsi.
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